openapi: 3.0.0
info:
  title: Telco Cloud Automation Virtual Infrastructure Management API
  description: Telco Cloud Automation Virtual Infrastructure Management API
  termsOfService: https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/product/vmware-product-guide.pdf
  contact:
    name: VMware
  license:
    name: Copyright (c) 2020-2021 VMware, Inc. All rights reserved.
  version: "1.0"
servers:
- url: /hybridity/api
tags:
- name: VIM
  description: Telco Cloud Automation Virtual Infrastructure Management API
paths:
  /vims/v1/tenants:
    get:
      tags:
      - VIM
      description: Lists registered VIM
      operationId: getVims
      parameters:
      - name: view
        in: query
        description: view type ex. extended
        required: false
        style: form
        explode: true
        schema:
          type: string
      responses:
        "200":
          description: List registered VIM
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200'
    put:
      tags:
      - VIM
      description: Validates VIM
      operationId: validateVIM
      parameters:
      - name: action
        in: query
        description: action type ex. validate
        required: true
        style: form
        explode: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterVim'
      responses:
        "200":
          description: validate VIM response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateVimResponse'
    post:
      tags:
      - VIM
      description: Register VIM
      operationId: registerVIM
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterVim'
      responses:
        "200":
          description: register VIM response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterVimResponse'
  /vims/v1/tenants/{tenantId}:
    put:
      tags:
      - VIM
      description: Modifies registered VIM
      operationId: modifyVim
      parameters:
      - name: tenantId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterVim'
      responses:
        "200":
          description: modify VIM response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterVimResponse'
    delete:
      tags:
      - VIM
      description: Deletes registered VIM
      operationId: removeVim
      parameters:
      - name: tenantId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: remove VIM response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_1'
  /vims/v1/{vimId}/tenants:
    get:
      tags:
      - VIM
      description: Get tenants for the VIM
      operationId: getTenants
      responses:
        "200":
          description: Get tenants for the VIM
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tenant'
components:
  schemas:
    Tenant:
      type: object
      properties:
        cloud_owner:
          type: string
        cloud_region_id:
          type: string
        vimId:
          type: string
        vimName:
          type: string
        tenants:
          type: array
          items:
            $ref: '#/components/schemas/Vim'
    Vim:
      type: object
      properties:
        tenantId:
          type: string
        vimName:
          type: string
        tenantName:
          type: string
        hcxCloudUrl:
          type: string
        username:
          type: string
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Vim_tags'
        vimType:
          type: string
        vimUrl:
          type: string
        location:
          $ref: '#/components/schemas/Vim_location'
        vimId:
          type: string
        audit:
          $ref: '#/components/schemas/Vim_audit'
        connection:
          $ref: '#/components/schemas/Vim_connection'
        compatible:
          type: boolean
        vnfInstancesCounts:
          type: array
          items:
            $ref: '#/components/schemas/Vim_vnfInstancesCounts'
        stats:
          $ref: '#/components/schemas/Vim_stats'
        id:
          type: string
        name:
          type: string
    RegisterVim:
      type: object
      properties:
        hcxCloudUrl:
          type: string
        vimName:
          type: string
        tenantName:
          type: string
        username:
          type: string
        password:
          type: string
    RegisterVimResponse:
      type: object
      properties:
        tenantId:
          type: string
        vimName:
          type: string
        tenantName:
          type: string
        state:
          type: string
        hcxCloudUrl:
          type: string
        username:
          type: string
        password:
          type: string
        tags:
          type: array
          items: {}
        vimType:
          type: string
        vimUrl:
          type: string
        hcxUUID:
          type: string
        hcxTenantId:
          type: string
        organization:
          type: string
        enterprise:
          type: string
        location:
          $ref: '#/components/schemas/Vim_location'
        vimId:
          type: string
        audit:
          $ref: '#/components/schemas/RegisterVimResponse_audit'
    ValidateVimResponse:
      type: object
      properties:
        status:
          type: string
        statusCode:
          type: integer
        reason:
          type: string
        headers:
          type: array
          properties:
            Date:
              type: string
            Server:
              type: string
            x-hm-authorization:
              type: string
            auth_token_name:
              type: string
            x-vcloud-authorization:
              type: string
            x-transaction-id:
              type: string
            X-Content-Type-Options:
              type: string
            X-XSS-Protection:
              type: string
            Cache-Control:
              type: string
            Pragma:
              type: string
            Expires:
              type: string
            Strict-Transport-Security:
              type: string
            X-Frame-Options:
              type: string
            Content-Type:
              type: string
            Vary:
              type: string
            Set-Cookie:
              type: string
            Keep-Alive:
              type: string
            Connection:
              type: string
            Transfer-Encoding:
              type: string
          items: {}
        cookies:
          $ref: '#/components/schemas/ValidateVimResponse_cookies'
        result:
          type: string
    inline_response_200:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Vim'
    inline_response_200_1:
      type: object
      properties:
        jobId:
          type: string
    Vim_tags:
      type: object
      properties:
        name:
          type: object
        autoCreated:
          type: boolean
    Vim_location:
      type: object
      properties:
        city:
          type: string
        country:
          type: string
        cityAscii:
          type: string
        latitude:
          type: string
        longitude:
          type: string
    Vim_audit:
      type: object
      properties:
        creationUser:
          type: string
        creationTimestamp:
          type: string
    Vim_connection:
      type: object
      properties:
        status:
          type: string
        remoteStatus:
          type: string
    Vim_vnfInstancesCounts:
      type: object
      properties:
        totalSize:
          type: integer
        state:
          type: string
    Vim_stats_cpu:
      type: object
      properties:
        used:
          type: integer
        available:
          type: integer
        unit:
          type: string
        capacity:
          type: integer
    Vim_stats:
      type: object
      properties:
        cpu:
          $ref: '#/components/schemas/Vim_stats_cpu'
        memory:
          $ref: '#/components/schemas/Vim_stats_cpu'
        storage:
          $ref: '#/components/schemas/Vim_stats_cpu'
    RegisterVimResponse_audit:
      type: object
      properties:
        creationUser:
          type: string
        creationTimestamp:
          type: integer
    ValidateVimResponse_cookies:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
        domain:
          type: string
        path:
          type: string
        expiry:
          type: integer
  securitySchemes:
    x-hm-authorization:
      type: apiKey
      description: Obtained from /hybridity/api/session
      name: x-hm-authorization
      in: header
