openapi: 3.0.0
info:
  title: Telco Cloud Automation Summary API.
  description: Telco Cloud Automation Summary 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: Summary
  description: Telco Cloud Automation Summary API
paths:
  /nfvo/summary/query:
    post:
      tags:
      - Summary
      summary: Query api to get the summary for Telco Cloud Automation
      description: Query api to get the summary for Telco Cloud Automation
      operationId: getSummary
      requestBody:
        description: Filter object.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/filter'
        required: true
      responses:
        "200":
          description: Successfully retrieved summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/summaryResponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
components:
  schemas:
    summaryResponse:
      type: object
      properties:
        vims:
          type: array
          items:
            $ref: '#/components/schemas/summaryResponse_vims'
        networkFunctions:
          $ref: '#/components/schemas/summaryResponse_networkFunctions'
        networkServices:
          $ref: '#/components/schemas/summaryResponse_networkServices'
        alarms:
          type: array
          items:
            $ref: '#/components/schemas/summaryResponse_alarms'
    filter:
      type: object
      properties:
        filter:
          $ref: '#/components/schemas/filter_filter'
    errorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    summaryResponse_stats_cpu:
      type: object
      properties:
        capacity:
          type: number
        used:
          type: number
        available:
          type: number
        unit:
          type: string
    summaryResponse_stats:
      type: object
      properties:
        cpu:
          $ref: '#/components/schemas/summaryResponse_stats_cpu'
        memory:
          $ref: '#/components/schemas/summaryResponse_stats_cpu'
        storage:
          $ref: '#/components/schemas/summaryResponse_stats_cpu'
    summaryResponse_connection:
      type: object
      properties:
        status:
          type: string
        remoteStatus:
          type: string
    summaryResponse_vims:
      type: object
      properties:
        vimType:
          type: string
        name:
          type: string
        stats:
          $ref: '#/components/schemas/summaryResponse_stats'
        connection:
          $ref: '#/components/schemas/summaryResponse_connection'
    summaryResponse_networkFunctions_instances:
      type: object
      properties:
        productName:
          type: string
        instantiationState:
          type: string
        name:
          type: string
        provider:
          type: string
        type:
          type: string
    summaryResponse_networkFunctions_catalogs:
      type: object
      properties:
        name:
          type: string
        productName:
          type: string
        provider:
          type: string
        type:
          type: string
        managedBy:
          type: string
        onboardingState:
          type: string
        operationalState:
          type: string
    summaryResponse_networkFunctions:
      type: object
      properties:
        instances:
          type: array
          items:
            $ref: '#/components/schemas/summaryResponse_networkFunctions_instances'
        catalogs:
          type: array
          items:
            $ref: '#/components/schemas/summaryResponse_networkFunctions_catalogs'
    summaryResponse_networkServices_instances:
      type: object
      properties:
        instantiationState:
          type: string
        name:
          type: string
    summaryResponse_networkServices_catalogs:
      type: object
      properties:
        name:
          type: string
        descriptorName:
          type: string
        descriptorDesigner:
          type: string
        onboardingState:
          type: string
        operationalState:
          type: string
        descriptorVersion:
          type: string
    summaryResponse_networkServices:
      type: object
      properties:
        instances:
          type: array
          items:
            $ref: '#/components/schemas/summaryResponse_networkServices_instances'
        catalogs:
          type: array
          items:
            $ref: '#/components/schemas/summaryResponse_networkServices_catalogs'
    summaryResponse_alarms:
      type: object
      properties:
        perceivedSeverity:
          type: string
        name:
          type: string
    filter_filter:
      type: object
      properties:
        id:
          type: array
          items:
            type: string
            enum:
            - Network Function
            - Network Service
            - Alarm
            - Virtual Infrastructure
  securitySchemes:
    x-hm-authorization:
      type: apiKey
      description: Obtained from /hybridity/api/session
      name: x-hm-authorization
      in: header
