XSKY os-external-storage-classes API

OSExternalStorageClassController API /os-extertal-storage-classes.

OpenAPI Specification

xsky-os-external-storage-classes-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: XMS is the controller of distributed storage system
  version: SDS_4.2.000.0.200302
  title: XMS access-paths os-external-storage-classes API
  contact: {}
  license:
    name: Commercial
basePath: /v1
tags:
- name: os-external-storage-classes
  description: 'OSExternalStorageClassController API /os-extertal-storage-classes.

    '
paths:
  /os-external-storage-classes/:
    get:
      tags:
      - os-external-storage-classes
      description: List os external storage classes
      operationId: ListOSExternalStorageClasses
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: limit
        in: query
        description: paging param
        required: false
        type: integer
        format: int64
        x-exportParamName: Limit
      - name: offset
        in: query
        description: paging param
        required: false
        type: integer
        format: int64
        x-exportParamName: Offset
      - name: os_policy_id
        in: query
        description: os policy id
        required: false
        type: integer
        format: int64
        x-exportParamName: OsPolicyId
      - name: general_status
        in: query
        description: query records with active or error status
        required: false
        type: boolean
        x-exportParamName: GeneralStatus
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/OSExternalStorageClassesResp'
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
    post:
      tags:
      - os-external-storage-classes
      description: Create os external storage class
      operationId: CreateExternalStorageClass
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        description: external storage class info
        required: true
        schema:
          $ref: '#/definitions/OSExternalStorageClassCreateReq'
        x-exportParamName: Body
      responses:
        202:
          description: Accepted
          schema:
            $ref: '#/definitions/OSExternalStorageClassResp'
        400:
          description: BadRequest
        409:
          description: Conflict
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
  /os-external-storage-classes/{external_storage_class_id}:
    get:
      tags:
      - os-external-storage-classes
      description: Get a os external storage class
      operationId: GetOSExternalStorageClass
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: external_storage_class_id
        in: path
        description: external storage class id
        required: true
        type: integer
        format: int64
        x-exportParamName: ExternalStorageClassId
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/OSExternalStorageClassResp'
        404:
          description: NotFound
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
    delete:
      tags:
      - os-external-storage-classes
      description: Delete an os external storage class
      operationId: DeleteOSExternalStorageClass
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: external_storage_class_id
        in: path
        description: external storage class id
        required: true
        type: integer
        format: int64
        x-exportParamName: ExternalStorageClassId
      responses:
        202:
          description: Accepted
          schema:
            $ref: '#/definitions/OSExternalStorageClassResp'
        404:
          description: NotFound
        409:
          description: Conflict
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
    patch:
      tags:
      - os-external-storage-classes
      description: update os external storage class
      operationId: UpdateOSExternalStorageClass
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: external_storage_class_id
        in: path
        description: external storage class id
        required: true
        type: integer
        format: int64
        x-exportParamName: ExternalStorageClassId
      - in: body
        name: body
        description: external storage class info
        required: true
        schema:
          $ref: '#/definitions/OSExternalStorageClassUpdateReq'
        x-exportParamName: Body
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/OSExternalStorageClassResp'
        202:
          description: Accepted
          schema:
            $ref: '#/definitions/OSExternalStorageClassResp'
        400:
          description: BadRequest
        404:
          description: NotFound
        409:
          description: Conflict
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
definitions:
  OSExternalStorageClassUpdateReq:
    type: object
    properties:
      os_external_storage_class:
        $ref: '#/definitions/OSExternalStorageClassUpdateReq_ExternalStorageClass'
    title: OSExternalStorageClassUpdateReq
  SliceStringField:
    type: array
    description: A slice string field.
    items:
      type: string
  OSExternalStorageClassesResp:
    type: object
    properties:
      os_external_storage_classes:
        type: array
        items:
          $ref: '#/definitions/OSExternalStorageClass'
    title: OSExternalStorageClassesResp
    example:
      os_external_storage_classes:
      - platform_type: platform_type
        storage_pattern:
        - storage_pattern
        - storage_pattern
        external_storage_platforms:
        - secret_key: secret_key
          endpoint: endpoint
          access_key: access_key
          buckets:
          - name: name
            weight: 6
          - name: name
            weight: 6
          name: name
          create: '2000-01-23T04:56:07.000+00:00'
          weight: 5
          id: 1
          uuid: uuid
          status: status
        - secret_key: secret_key
          endpoint: endpoint
          access_key: access_key
          buckets:
          - name: name
            weight: 6
          - name: name
            weight: 6
          name: name
          create: '2000-01-23T04:56:07.000+00:00'
          weight: 5
          id: 1
          uuid: uuid
          status: status
        Create: '2000-01-23T04:56:07.000+00:00'
        name: name
        description: description
        id: 5
        class: 0
        os_policy_id: 2
        platform: platform
        status: status
      - platform_type: platform_type
        storage_pattern:
        - storage_pattern
        - storage_pattern
        external_storage_platforms:
        - secret_key: secret_key
          endpoint: endpoint
          access_key: access_key
          buckets:
          - name: name
            weight: 6
          - name: name
            weight: 6
          name: name
          create: '2000-01-23T04:56:07.000+00:00'
          weight: 5
          id: 1
          uuid: uuid
          status: status
        - secret_key: secret_key
          endpoint: endpoint
          access_key: access_key
          buckets:
          - name: name
            weight: 6
          - name: name
            weight: 6
          name: name
          create: '2000-01-23T04:56:07.000+00:00'
          weight: 5
          id: 1
          uuid: uuid
          status: status
        Create: '2000-01-23T04:56:07.000+00:00'
        name: name
        description: description
        id: 5
        class: 0
        os_policy_id: 2
        platform: platform
        status: status
  OSExternalStoragePlatformInfo:
    type: object
    properties:
      access_key:
        type: string
      buckets:
        type: array
        items:
          $ref: '#/definitions/OSExternalStorageBucketInfo'
      endpoint:
        type: string
      id:
        type: integer
        format: int64
      name:
        type: string
      secret_key:
        type: string
      weight:
        type: integer
        format: int64
    title: OSExternalStoragePlatformInfo
    description: OSExternalStoragePlatformInfo used for update os external storage class
  OSExternalStorageClassResp:
    type: object
    properties:
      os_external_storage_class:
        $ref: '#/definitions/OSExternalStorageClass'
    title: OSExternalStorageClassResp
    example:
      os_external_storage_class:
        platform_type: platform_type
        storage_pattern:
        - storage_pattern
        - storage_pattern
        external_storage_platforms:
        - secret_key: secret_key
          endpoint: endpoint
          access_key: access_key
          buckets:
          - name: name
            weight: 6
          - name: name
            weight: 6
          name: name
          create: '2000-01-23T04:56:07.000+00:00'
          weight: 5
          id: 1
          uuid: uuid
          status: status
        - secret_key: secret_key
          endpoint: endpoint
          access_key: access_key
          buckets:
          - name: name
            weight: 6
          - name: name
            weight: 6
          name: name
          create: '2000-01-23T04:56:07.000+00:00'
          weight: 5
          id: 1
          uuid: uuid
          status: status
        Create: '2000-01-23T04:56:07.000+00:00'
        name: name
        description: description
        id: 5
        class: 0
        os_policy_id: 2
        platform: platform
        status: status
  OSExternalStorageClassCreateReq:
    type: object
    properties:
      os_external_storage_class:
        $ref: '#/definitions/OSExternalStorageClass'
    title: OSExternalStorageClassCreateReq
  OSExternalStorageBucketInfo:
    type: object
    required:
    - name
    - weight
    properties:
      name:
        type: string
      weight:
        type: integer
        format: int64
    title: OSExternalStorageBucketInfo
    description: OSExternalStorageBucketInfo contains bucket info of external storage platform
    example:
      name: name
      weight: 6
  OSExternalStorageClassUpdateReq_ExternalStorageClass:
    type: object
    properties:
      description:
        type: string
      external_storage_platforms:
        type: array
        items:
          $ref: '#/definitions/OSExternalStoragePlatformInfo'
      name:
        type: string
      storage_pattern:
        $ref: '#/definitions/SliceStringField'
    title: OSExternalStorageClassUpdateReq_ExternalStorageClass
  OSExternalStoragePlatform:
    type: object
    properties:
      access_key:
        type: string
      buckets:
        type: array
        items:
          $ref: '#/definitions/OSExternalStorageBucketInfo'
      create:
        type: string
        format: date-time
      endpoint:
        type: string
      id:
        type: integer
        format: int64
      name:
        type: string
      secret_key:
        type: string
      status:
        type: string
      uuid:
        type: string
      weight:
        type: integer
        format: int64
    title: OSExternalStoragePlatform
    description: 'OSExternalStoragePlatform is the model of os_external_storage_platform

      +X:model:generate;with_detailed;order_by=ID'
    example:
      secret_key: secret_key
      endpoint: endpoint
      access_key: access_key
      buckets:
      - name: name
        weight: 6
      - name: name
        weight: 6
      name: name
      create: '2000-01-23T04:56:07.000+00:00'
      weight: 5
      id: 1
      uuid: uuid
      status: status
  OSExternalStorageClass:
    type: object
    required:
    - class
    - external_storage_platforms
    - name
    - os_policy_id
    - platform
    - platform_type
    properties:
      Create:
        type: string
        format: date-time
      class:
        type: integer
        format: int32
      description:
        type: string
      external_storage_platforms:
        type: array
        items:
          $ref: '#/definitions/OSExternalStoragePlatform'
      id:
        type: integer
        format: int64
      name:
        type: string
      os_policy_id:
        type: integer
        format: int64
      platform:
        type: string
      platform_type:
        type: string
      status:
        type: string
      storage_pattern:
        type: array
        items:
          type: string
    title: OSExternalStorageClass
    description: 'OSExternalStorageClass is the model of os external storage class

      +X:model:generate;plur=OSExternalStorageClasses;with_detailed'
    example:
      platform_type: platform_type
      storage_pattern:
      - storage_pattern
      - storage_pattern
      external_storage_platforms:
      - secret_key: secret_key
        endpoint: endpoint
        access_key: access_key
        buckets:
        - name: name
          weight: 6
        - name: name
          weight: 6
        name: name
        create: '2000-01-23T04:56:07.000+00:00'
        weight: 5
        id: 1
        uuid: uuid
        status: status
      - secret_key: secret_key
        endpoint: endpoint
        access_key: access_key
        buckets:
        - name: name
          weight: 6
        - name: name
          weight: 6
        name: name
        create: '2000-01-23T04:56:07.000+00:00'
        weight: 5
        id: 1
        uuid: uuid
        status: status
      Create: '2000-01-23T04:56:07.000+00:00'
      name: name
      description: description
      id: 5
      class: 0
      os_policy_id: 2
      platform: platform
      status: status
securityDefinitions:
  tokenInHeader:
    description: auth by token
    type: apiKey
    name: Xms-Auth-Token
    in: header
  tokenInQuery:
    description: auth by token
    type: apiKey
    name: token
    in: query