XSKY vips API

VIPController API /vips

OpenAPI Specification

xsky-vips-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 vips API
  contact: {}
  license:
    name: Commercial
basePath: /v1
tags:
- name: vips
  description: 'VIPController API /vips

    '
paths:
  /vips/:
    get:
      tags:
      - vips
      description: List vips
      operationId: ListVIPs
      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: vip_group_id
        in: query
        description: vip_group id
        required: false
        type: integer
        format: int64
        x-exportParamName: VipGroupId
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/VIPsResp'
      security:
      - tokenInQuery: []
      - tokenInHeader: []
    post:
      tags:
      - vips
      description: Create a vip
      operationId: CreateVIP
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: vip
        description: vip info
        required: true
        schema:
          $ref: '#/definitions/VIPCreateReq'
        x-exportParamName: Vip
      responses:
        202:
          description: Accepted
          schema:
            $ref: '#/definitions/VIPResp'
        400:
          description: BadRequest
        409:
          description: Conflict
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
  /vips/{vip_id}:
    get:
      tags:
      - vips
      description: Get a vip
      operationId: GetVIP
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: vip_id
        in: path
        description: vip id
        required: true
        type: integer
        format: int64
        x-exportParamName: VipId
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/VIPResp'
        404:
          description: NotFound
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
    delete:
      tags:
      - vips
      description: Delete a vip
      operationId: DeleteVIP
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: vip_id
        in: path
        description: vip id
        required: true
        type: integer
        format: int64
        x-exportParamName: VipId
      responses:
        202:
          description: Accepted
          schema:
            $ref: '#/definitions/VIPResp'
        404:
          description: NotFound
        409:
          description: Conflict
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
    patch:
      tags:
      - vips
      description: Update a vip
      operationId: UpdateVIP
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: vip_id
        in: path
        description: vip id
        required: true
        type: integer
        format: int64
        x-exportParamName: VipId
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/VIPResp'
        400:
          description: BadRequest
        404:
          description: NotFound
        409:
          description: Conflict
        500:
          description: InternalServerError
      security:
      - tokenInQuery: []
      - tokenInHeader: []
definitions:
  VIP:
    type: object
    properties:
      action_status:
        type: string
      create:
        type: string
        format: date-time
      id:
        type: integer
        format: int64
      ip:
        type: string
      mac_address:
        type: string
      mask:
        type: integer
        format: int64
      status:
        type: string
      update:
        type: string
        format: date-time
      vip_group:
        $ref: '#/definitions/VIPGroup_Nestview'
      virtual_router_id:
        type: integer
        format: int64
    title: VIP
    description: VIP is a virtual IP provided access to resources.
  VIPCreateReq_VIP:
    type: object
    required:
    - ip
    - network_address_id
    - vip_group_id
    properties:
      ip:
        type: string
      mask:
        type: integer
        format: int64
      network_address_id:
        type: integer
        format: int64
      vip_group_id:
        type: integer
        format: int64
    title: VIPCreateReq_VIP
  VIPInstance_Nestview:
    type: object
    properties:
      id:
        type: integer
        format: int64
    title: VIPInstance_Nestview
  VIPGroup_Nestview:
    type: object
    properties:
      id:
        type: integer
        format: int64
      name:
        type: string
      network:
        type: string
      resource_id:
        type: integer
        format: int64
      resource_type:
        type: string
    title: VIPGroup_Nestview
  VIPCreateReq:
    type: object
    required:
    - vip
    properties:
      vip:
        $ref: '#/definitions/VIPCreateReq_VIP'
    title: VIPCreateReq
  VIPResp:
    type: object
    properties:
      vip:
        $ref: '#/definitions/VIPRecord'
    title: VIPResp
    example:
      vip: ''
  VIPsResp:
    type: object
    properties:
      vips:
        type: array
        items:
          $ref: '#/definitions/VIPRecord'
    title: VIPsResp
    example:
      vips:
      - ''
      - ''
  VIPRecord:
    title: VIPRecord
    allOf:
    - $ref: '#/definitions/VIP'
    - properties:
        current_vip_instance:
          $ref: '#/definitions/VIPInstance_Nestview'
        default_vip_instance:
          description: 'Copy these two fields from corresponding fields of VIP to avoid JSON marshal

            recursion.'
          $ref: '#/definitions/VIPInstance_Nestview'
    description: VIPRecord represents doc returned by API.
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