Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Participant Registration. This capability allows participants to register and deregister with CLAMP. The post condition for an execution of this capability is that a participant is available for participation in a control loop.
  2. Control Loop Commissioning. This capability allows version controlled Control Loops to be taken from the Control Loop Design Time Catalogue and be placed in the Control Loop Run Time Inventory. It also allows configuration of parameters that apply to the Control Loop Type, that is parameters that will apply to all control loop instances. Further, it allows control loop types to be commissioned on participants. Data that applies to all instances of a control loop type on a participant is sent to a participant. The participant can then take whatever actions it need to do to support the control loop type in question. The post condition for an execution of this capability is that the Control Loop definition is in the Control Loop Run Time Catalogue Inventory and all participants in this control loop type are commissioned, that is they are prepared to run instances of this control loop type.
  3. Control Instantiation. This capability allows an instance of a control loop to be created. The control loop definition is read from the Control Loop Run Time Inventory and values are assigned to the parameters defined for the control loop in the same manner as the existing CLAMP client does. A control loop that has been created but has not yet been sent to participants is in state UNINITIALIZED. The control loop instance parameters can be revised and updated as often as the user requires. Once the user is happy with the parameters, the control loop instance is sent to participants and the control loop instance elements on each participant are started by participants using the control loop metadata. Once the control loop is instantiated on each participant, the Control Loop instance is set as being in state PASSIVE in the Control Loop Run Time Inventory. The user can now order the participants to change the state of the control loop to state RUNNING. Each participant begins accepting and processing control loop events and the control loop is set to state RUNNING in the control loop inventory. The post condition for an execution of this capability is that the Control Loop instance is running on participants and is processing events.
  4. Control Loop Monitoring. This capability allows control loops to be monitored. Users can check the status of a control loop instances and the status of each participant in a control loop instance. Control loop participants report their overall status and domain status periodically to CLAMP. Clamp aggregates these status reports into an aggregated control loop instance status record, which is available for monitoring. The post condition for an execution of this capability is that control loop instances are being monitored.

...

Composed Control Loops are commissioned on the run time part of the system, where they are stored in the run time catalogue inventory and are available for instantiation.

...

Code Block
languageyml
titleExample Control Loop
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_3
capability_types:
  org.onap.EventProducer:
    properties:
      carrier_protocol_type:
        type: string
        required: true
        constraints:
        - valid_values:
          - DMAAP_message_router
          - SOMETHING_ELSE
          - REST
      data_format:
        type: string
        required: true
        constraints:
        - valid_values:
          - JSON
          - YAML
          - JMS
      event_format:
        type: string
        required: true
      event_format_version:
        type: string
        required: false
      config_keys:
        type: list
        required: false
        entry_schema:
          type: string
          constraints:
          - valid_values:
            - all valid values should be added here
            - if not specified, events of any config key may be generated
            - 'examples for config_key: ves-measurement, ves-syslog, tca_handle_out,
              etc.'
    version: 0.0.1
    derived_from: tosca.capabilities.Root
  org.onap.EventConsumer:
    properties:
      responding_capability:
        type: string
        required: false
      carrier_protocol_type:
        type: string
        required: true
        constraints:
        - valid_values:
          - DMAAP_message_router
          - SOMETHING_ELSE
          - REST
      data_format:
        type: string
        required: true
        constraints:
        - valid_values:
          - JSON
          - YAML
          - JMS
          - all valid values should be added here
      event_format:
        type: string
        description: 'examples for event_format: Ves_specification, LinkUp, VnfConfigured,
          etc.'
        required: true
      event_format_version:
        type: string
        description: 'examples for event_format_version: 5.28.4, 7.30.1, etc.'
        required: false
      config_keys:
        type: list
        required: false
        entry_schema:
          type: string
          constraints:
          - valid_values:
            - all valid values should be added here
            - if not specified, events of any config key may be generated
            - 'examples for config_key: ves-measurement, ves-syslog, tca_handle_out,
              etc.'
    version: 0.0.1
    derived_from: tosca.capabilities.Root
node_types:
  org.onap.DynamicConfig:
    properties:
      application_name:
        type: string
        description: Value used to tie the config to an application ? should we be
          using a relationship here instead?
        required: true
      application_version:
        type: string
        required: true
      application_provider:
        type: string
        required: false
      data_types:
        type: object
        required: false
      schema:
        type: object
        required: false
    version: 0.0.1
    derived_from: tosca.nodes.Root
  org.onap.APP:
    properties:
      application_name:
        type: string
        description: Human readable name for the application Product
        required: false
      provider:
        type: string
        description: Provider of the application and of the descriptor
        required: true
      application_version:
        type: string
        description: Software version of the application
        required: true
      blueprint_id:
        type: string
        description: A reference to the app blueprint
        required: false
      monitoring_policy:
        type: string
        description: A reference to the monitoring policy
        required: false
    requirements:
    - receive:
        capability: org.onap.EventProducer
        relationship: org.onap.PropagateEvent
        occurrences:
        - 0.0
        - UNBOUNDED
    - send:
        capability: org.onap.EventConsumer
        relationship: org.onap.PropagateEvent
        occurrences:
        - 0.0
        - UNBOUNDED
    version: 0.0.1
    derived_from: tosca.nodes.Root
  org.onap.EventRelay:
    properties:
      event_format:
        type: string
        description: 'examples for event_format: Ves_specification, etc.'
        required: true
      event_format_version:
        type: string
        description: 'examples for event_format_version: 5.28.4, 7.30.1, etc.'
        required: true
      config_keys:
        type: list
        required: false
        entry_schema:
          type: string
          constraints:
          - valid_values:
            - all valid values should be added here
            - if not specified, events of any config key is relayed
            - 'examples for config_key: ves-measurement, ves-syslog, tca_handle_out,
              etc.'
      supported_carrier_protocols:
        type: map
        description: 'A map describing supported carrier protocols and translations.
          The tuples define what protocol combinations are supported on the producer
          and consumer side: e.g. { REST: REST, DMAAP: REST, DMAAP: DMAAP}'
        required: true
        key_schema:
          type: string
          constraints:
          - valid_values:
            - DMAAP_message_router
            - SOMETHING_ELSE
            - REST
            - all valid values should be added here
        entry_schema:
          type: string
          constraints:
          - valid_values:
            - DMAAP_message_router
            - SOMETHING_ELSE
            - REST
            - all valid values should be added here
      supported_data_formats:
        type: map
        description: 'Is a map describing supported data formats and translation.
          The tuples define what protocol combinations are supported on the producer
          and consumer side: e.g. { JSON: JSON, JMS: JSON, YAML:YAML }'
        required: true
        key_schema:
          type: string
          constraints:
          - valid_values:
            - JSON
            - JMS
            - YAML
            - etc
            - all valid values should be added here
        entry_schema:
          type: string
          constraints:
          - valid_values:
            - JSON
            - JMS
            - YAML
            - etc
            - all valid values should be added here
    requirements:
    - receive:
        capability: org.onap.EventProducer
        relationship: org.onap.PropagateEvent
        occurrences:
        - 0.0
        - UNBOUNDED
    - send:
        capability: org.onap.EventConsumer
        relationship: org.onap.PropagateEvent
        occurrences:
        - 0.0
        - UNBOUNDED
    version: 0.0.1
    derived_from: tosca.nodes.Root
relationship_types:
  org.onap.PropagateEvent:
    properties:
      config_keys:
        type: list
        description: The relationship type used on requirements to org.onap.EventProducer
          and org.onap.EventConsumer capabilities. Filters events by specific config_keys
          to be transferred by this relationship. That is, any event with a specific
          config_key found in the list is transferred. If list is not defined or is
          empty, events with all config_keys are transferred.
        required: false
        entry_schema:
          type: string
    version: 0.0.1
    derived_from: tosca.relationships.Root
topology_template:
  inputs:
    pm_subscription_topic:
      type: string
    pm_subscription_response_topic:
      type: string
    pm_subscription_handler_blueprint_id:
      type: string
    pm_subscription_operational_policy_id:
      type: string
    pm_subscription_cds_blueprint_id:
      type: string
    enable_tls:
      type: string
  node_templates:
    org.onap.PM_Subscription_Handler:
      type: org.onap.APP
      properties:
        application_name: PM Subscription Handler
        provider: Ericsson
        application_version: 1.0.0
        artifact_id:
          get_input: pm_subscription_handler_blueprint_id
          description: Is this a reference to the DCAE Cloudify Blueprint that is
            already stored(or will be stored before CL configuration & instatiation)
            in DCAE Inventory?
        artifact_config:
          enable_tls:
            get_input: enable_tls
          pmsh_publish_topic_name:
            get_input: pm_subscription_topic
      capabilities:
        pm-subscription-event-publisher:
          properties:
            carrier_protocol_type: DMAAP_message_router
            data_format: JSON
            event_format: pm-subscription-event-format
            event_format_version: 1.0.0
          attributes:
            type: org.onap.EventProducer
          occurrences:
          - 0.0
          - UNBOUNDED
        pm-subscription-event-receiver:
          properties:
            carrier_protocol_type: DMAAP_message_router
            data_format: JSON
            event_format: pm-subscription-event-response-format
            event_format_version: 1.0.0
            relationships:
            - type: tosca.relationships.DependsOn
            - description: any ideas on a better realtionship ? or is it better to
                just use the root realtionship ?
            - target: org.onap.PM_Monitoring_Policy
          attributes:
            type: org.onap.EventConsumer
          occurrences:
          - 0.0
          - UNBOUNDED
    org.onap.PM_Monitoring_Policy:
      type: org.onap.DynamicConfig
      properties:
        application_name: PM Subscription Handler
        application_version: 1.0.0
        provider: Ericsson
        data_types:
          measurementType:
            type: string
          DN:
            type: string
          nfFilter:
            properties:
              nfNames:
                type: list
                entry_schema: string
              modelInvariantIDs:
                type: list
                entry_schema:
                  type: string
              modelVersionIDs:
                type: list
                entry_schema:
                  type: string
          measurementGroup:
            properties:
              masurementTypes:
                type: list
                entry_schema:
                  type: measurementType
              managedObjectDNsBasic:
                type: list
                entry_schema:
                  type: DN
        schema:
          subscription:
            subscriptionName:
              type: string
              required: true
            administrativeState:
              type: string
              required: true
            filebasedGP:
              type: integer
              required: true
            fileLocation:
              type: string
              required: true
            nfFilter:
              type: nfFilter
            measurementGroups:
              type: list
              entry_schema:
                type: measurementGroup
      description: Should I be showing a dependency between PM Subscription Handler
        and the PM Monitoring Policy
    org.onap.PM_Policy:
      type: org.onap.APP
      properties:
        application_name: PM Subscription Operational Policy
        provider: Ericsson
        application_version: 1.0.0
        artifact_id:
          get_input: pm_subscription_operational_policy_id
        artifact_config: NOT_DEFINED
      requirements:
      - receive_0:
          capability: pm-subscription-event-publisher
          node: org.onap.PM_Subscription_Handler
          relationship: NOT_DEFINED
          properties:
            config_keys:
            - topic_name:
                get_input: pm_subscription_topic
      - send_0:
          capability: cds-rest-receive
          node: org.onap.CDS
      - receive_1:
          capability: cds-rest-response
          node: org.onap.CDS
      - send_1:
          capability: pm-subscription-event-receiver
          node: org.onap.PM_Subscription_Handler
          relationship: NOT_DEFINED
          properties:
            config_keys:
            - topic_name:
                get_input: pm_subscription_response_topic
      capabilities:
        pm-subscription-response-event-publisher:
          properties:
            type: org.onap.EventProducer
            carrier_protocol_type: DMAAP_message_router
            data_format: JSON
            event_format: pm-subscription-event-response-format
            event_format_version: 1.0.0
          occurrences:
          - 0.0
          - UNBOUNDED
    org.onap.PM_CDS_Blueprint:
      type: org.onap.APP
      properties:
        application_name: PM Subscription CDS Blueprint
        provider: Ericsson
        application_version: 1.0.0
        artifact_id:
          get_input: pm_subscription_cds_blueprint_id
      capabilities:
        cds-rest-receive:
          properties:
            type: org.onap.EventConsumer
            protocol_type: REST
            data_format: JSON
            event_format: cds_action_format
            event_format_version: 1.0.0
            responding_capability: cds-rest-response
          occurrences:
          - 0.0
          - UNBOUNDED
        cds-rest-response:
          properties:
            type: org.onap.EventProducer
            protocol_type: REST
            data_format: JSON
            event_format: cds_action_response_format
            event_format_version: 1.0.0
          occurrences:
          - 0.0
    org.onap.controlloop0:
      type: org.onap.APP
      properties:
        application_name: Test Control Loop
        provider: Ericsson
        application_version: 1.0.0
        status: NOT_DEPLOYED



2.2: Modelling from TOSCA to Commissioned Data in Run

...

Time Inventory

draw.io Diagram
bordertrue
diagramNameInteractions
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth1081
revision1

2.3: Modelling from TOSCA to Instance Data Run

...

Time Inventory

3: APIs and Sequence Diagrams

...

A Client, in this case CLAMP, can perform CRUD operations or can commission ControlLoops from DesignTime to RunTime Catalogue Inventory Database.

DesignTime/RunTime Catalogue/Inventory Database stores ControlLoop definitions, CRUD operations on database supported by REST Endpoints like Get, Delete, Create allowing selection of a particular ControlLoop to be addressed, below sequence diagram will help you understand flow how a client(Clamp) application can initiate Rest call for performing different operations on Database.

...

The commissioning of ControlLoops definition from DesignTime Catalogue to RunTime Catalogue Inventory Database can we achived using the commissioning Rest Endpoint, in this process when a rest request is initiated from a client(Clamp) the API_Gateway Service take cares of fetching ControlLoops metadata from DesignTime and creates in RunTime Catalogue Inventory Database, Commissioning API ControlLoop Sequence diagram will help you understand the flow.

...

Code Block
languageyml
themeEclipse
titleInitial Swagger Draft for Deployment API
linenumberstrue
collapsetrue
openapi: 3.0.3
info:
  description: >-
    The ControlLoop Commissioning API allows users to search and perform
    CRUD action on Controlloop Tosca exported data sets.
  version: 1.0.0
  title: Control Loop Commissioning API
  license:
    name: Apache 2.0
    url: 'http://www.apache.org/licenses/LICENSE-2.0'
  contact:
    email: lego@est.tech
servers:
  - url: '{scheme}://onap/controlloop/v2/'
    variables:
      scheme:
        description: 'The Data Set API is accessible via https and http'
        enum:
          - 'https'
          - 'http'
        default: 'http'
tags:
  - name: Control Loop 
    description: Commissioning API
  - name: design-catalogue
    description: CRUD actions on an designtime Control Loop data sets.
  - name: runtime-catalogueinventory
    description: CRUD actions on an runtime Control Loop data sets.
paths:
  /design-catalogue/loops:
    get:
      tags:
        - design-catalogue
      operationId: getAllLoopsUsingGET
      summary: Returns a list of all available Control Loops.
      responses:
        '200':
          description: OK
          content:
            application/yaml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ControlLoop'
                  
  /design-catalogue/loop/{controlLoopId}:
    get:
      tags:
        - design-catalogue
      summary: >-
        Returns a specific control loop.
      description: >-
        This GET API returns a specific control loop.
      operationId: getLoopByIdUsingGET
      parameters:
        - name: controlLoopId
          in: path
          description: 'Id of the control loop.'
          required: true
          example: "org.onap.PM_CDS_Blueprint"
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/ControlLoop'
  
    delete:
      tags:
        - design-catalogue
      summary: Delete a specific Control Loop by ID.
      operationId: deleteLoopByIdUsingDELETE
      parameters:
        - name: controlLoopId
          in: path
          description: Identity for the control loop
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: OK
        '404':
          description: Control Loop not present

    post:
      tags:
        - design-catalogue
      summary: >-
        Accepts a Tosca Service Template representing a Control Loop.
      description: >-
        This API Create a Control Loop.
      operationId: createLoopWithIDUsingPOST
      parameters:
        - name: controlLoopId
          in: path
          description: Identity for the control loop
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: OK
        '409':
          description: Control Loop already exist.
     
    put:
      tags:
        - design-catalogue
      summary: Updates a Control Loop.
      operationId: updateLoopWithIDUsingPUT
      parameters:
        - name: controlLoopId
          in: path
          description: Identity for the control loop
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: OK
        '404':
          description: Control Loop not found
          
  /runtime-catalogueinventory/commission:
    post:
      tags:
        - runtime-catalogueinventory
      summary: >-
        Commissions Tosca Service Template in RunTime CatalogueInventory.
      description: >-
        This API commissions Tosca Service Template in RunTime CatalogueInventory DB.
      operationId: commissionLoopWithPOST
      responses:
        '200':
          description: OK
        '404':
          description: No matching record found for the given criteria.
          
  /runtime-catalogueinventory/loop/{controlLoopId}:
    get:
      tags:
        - runtime-catalogueinventory
      summary: >-
        Returns a specific control loop.
      description: >-
        This GET API returns a specific control loop.
      operationId: getLoopByIdUsing
      parameters:
        - name: controlLoopId
          in: path
          description: 'Id of the control loop.'
          required: true
          example: "org.onap.PM_CDS_Blueprint"
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/yaml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ControlLoop'
  
    delete:
      tags:
        - runtime-catalogueinventory
      summary: Delete a specific Control Loop by ID.
      operationId: deleteLoopByIdUsing
      parameters:
        - name: controlLoopId
          in: path
          description: Identity for the control loop
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: OK
        '404':
          description: Control Loop not present

    post:
      tags:
        - runtime-catalogueinventory
      summary: >-
        Accepts a Tosca Service Template representing a Control Loop.
      description: >-
        This API Create a Control Loop.
      operationId: createLoopWithIDUsing
      parameters:
        - name: controlLoopId
          in: path
          description: Identity for the control loop
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: OK
        '409':
          description: Control Loop already exist.
     
    put:
      tags:
        - runtime-catalogueinventory
      summary: Updates a Control Loop.
      operationId: updateLoopWithIDUsing
      parameters:
        - name: controlLoopId
          in: path
          description: Identity for the control loop
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: OK
        '404':
          description: Control Loop not found

components:
  schemas:
    ControlLoop:
      title: ControlLoop
      type: object
      properties:
        id:
          type: string
        ControlLoop:
          type: string

...

  1. GET, DELETE, CREATE API ControlLoop Sequence Diagram

    PlantUML Macro
    titleGET, DELETE, CREATE API Sequence Diag
    @startuml
    
    actor CLAMP
    participant API_Gateway
    database Database
    note over Database: It can be DesiginTime Catalogue Or RuntTimeRunTime CatalogueInventory Database
    
    
    CLAMP -> API_Gateway: Rest API Request (JSON/Yaml)
    API_Gateway -> Database: Get, Delete Or Create ControlLoops
    activate API_Gateway
    note over API_Gateway,Database: Pull, Delete existing Or Create New ControlLoops in Database
    
    alt successful case
    
        Database -> API_Gateway : Return List of ControlLoops Or able to Delete, Create ControlLoop in Database
        API_Gateway -> CLAMP: Return Success
    
    else failure case
    
        API_Gateway <- Database: Return either Empty List for Get ControlLoops Or Failure Status for Delete, Create Request
    	deactivate API_Gateway
        note over Database: No ControlLoops exist Or Failed in Deleting, Creating ControlLoops
        API_Gateway -> CLAMP : Return Failure
    
    end
    @enduml



  2. Commission API ControlLoop Sequence Diagram 

    PlantUML Macro
    titleDeploy API ControlLoop Sequence Diag
    @startuml
    
    actor CLAMP
    participant API_Gateway
    database DesignTime_Catalogue_Database
    database RunTime_CatalogueInventory_Database
    participant Dmaap
    collections Participants
    
    CLAMP -> API_Gateway: Rest Commission API Request (JSON/Yaml)
    API_Gateway -> DesignTime_Catalogue_Database: Fetch ControlLoop from DesignTime Catalogue Database
    activate API_Gateway
    note over API_Gateway,DesignTime_Catalogue_Database: Fetch existing ControlLoops from DesignTime Catalogue Database
    
    alt successful case
        DesignTime_Catalogue_Database -> API_Gateway : Return List of existing ControlLoops from DesignTime Catalogue Database
        note over DesignTime_Catalogue_Database, RunTime_CatalogueInventory_Database: Populate RunTime CatalogueInventory with ControlLoops existing in DesignTime Catalogue Database
        API_Gateway -> RunTime_CatalogueInventory_Database: Push ControlLoop to RunTime CatalogueInventory Database
        note over Dmaap: Putting ControlLoop Metadata for individual Participant
        API_Gateway -> Dmaap: Push ControlLoop to individual Participants(App) over Dmaap
        note over Dmaap,Participants: Asynchronous communication
        Dmaap -> Participants
        API_Gateway -> CLAMP: Return Success
    
    else failure case
    
        API_Gateway <- DesignTime_Catalogue_Database: Return Empty ControlLoop List, No ControlLoop exist in DesignTime Catalogue
    	deactivate API_Gateway
        note over API_Gateway, DesignTime_Catalogue_Database: DesignTime Catalogue Database is Empty, cannot commission ControLoop in RunTime CatalogueInventory Database 
        API_Gateway -> CLAMP : Return Failure
    
    end
    @enduml


...

Code Block
languageyml
titleInitial Swagger for Initiation API
collapsetrue
openapi: 3.0.3
info:
  title: Swagger Control Loop Instantiation
  description: ""
  version: 1.0.0
servers:
  - url: '{scheme}://onap/controlloop/v2/'
    variables:
      scheme:
        description: 'The Data Set API is accessible via https and http'
        enum:
          - 'https'
          - 'http'
        default: 'http'
tags:
- name: instantiate
  description: Control Loop Instantiation
paths:
  /runtime-catalogueinventory/instantiate:
    post:
      tags:
      - instantiate
      summary: Instantiate a commissioned control loop
      operationId: instantiateLoop
      requestBody:
        description: Control loop that is to be instantiated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ControlLoop'
        required: true
      responses:
        200:
          description: OK
          content:            
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiResponse'
        404:
          description: No Control Loop found
        405:
          description: Invalid input
  /runtime-catalogueinventory/loops/instantiated:
    get:
      tags:
      - instantiate
      summary: Get a list of instantiated control loops
      responses:
        200:
          description: Success
          content:            
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ControlLoop'
        404:
          description: No instantiated control loops found
  /runtime-catalogueinventory/loops/instantiated/{loop-id}:
    get:
      tags:
      - instantiate
      summary: Get an instantiated control loop by id
      parameters:
      - name: loop-id
        in: path
        description: ID of instantiated loop to return
        required: true
        schema:
          type: string
      responses:
        200:
          description: OK
          content:            
            application/json:
              schema:
                $ref: '#/components/schemas/ControlLoop'
        404:
          description: Control Loop not found
    put:
      tags:
      - instantiate
      summary: Update an instantiated control loop
      parameters:
      - name: loop-id
        in: path
        description: ID of instantiated loop
        required: true
        schema:
          type: string
      requestBody:
        description: Control loop to be updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ControlLoop'
        required: true
        
      responses:
        200:
          description: OK
          content:            
            application/json:
              schema:
                $ref: '#/components/schemas/ControlLoop'
        404:
          description: Control Loop not found
    delete:
      tags:
      - instantiate
      summary: Delete an instantiated control loop
      parameters:
      - name: loop-id
        in: path
        description: ID of instantiated loop
        required: true
        schema:
          type: string
      responses:
        200:
          description: OK
        404:
          description: Control Loop not found
components:
  schemas:
    ControlLoop:
      title: ControlLoop
      type: object
      properties:
        id:
          type: string
        controlLoopTosca:
          type: string
    ApiResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
        status:
          type: string

...

Code Block
languageyml
titleInitial Swagger for Monitoring API
collapsetrue
openapi: 3.0.3
info:
  title: Swagger Control Loop Monitoring
  description: ""
  version: 1.0.0
servers:
  - url: '{scheme}://onap/controlloop/v2/'
    variables:
      scheme:
        description: 'The Data Set API is accessible via https and http'
        enum:
          - 'https'
          - 'http'
        default: 'http'
tags:
- name: monitoring
  description: Control Loop Monitoring
paths:
  /runtime-catalogueinventory/monitoring:
    post:
      tags:
      - monitoring
      summary: Input monitoring data into the database
      requestBody:
        description: Monitoring data to be input
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitoringData'
        required: true
      responses:
        200:
          description: OK
        405:
          description: Invalid input
    get:
      tags:
      - monitoring
      summary: Get monitoring data for all participants
      responses:
        200:
          description: Success
          content:            
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MonitoringData'
        404:
          description: No monitoring data found
  /runtime-catalogueinventory/monitoring/{participant-id}:
    get:
      tags:
      - monitoring
      summary: Get monitoring data for a participant by participant id
      parameters:
      - name: participant-id
        in: path
        description: ID of a participant 
        required: true
        schema:
          type: string
      responses:
        200:
          description: OK
          content:            
            application/json:
              schema:
                $ref: '#/components/schemas/MonitoringData'
        404:
          description: Monitoring data for the participant not found
    put:
      tags:
      - monitoring
      summary: Update monitoring data for a participant by participant id
      parameters:
      - name: participant-id
        in: path
        description: ID of a participant
        required: true
        schema:
          type: string
      requestBody:
        description: Monitoring data to be updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitoringData'
        required: true
      responses:
        200:
          description: OK
          content:            
            application/json:
              schema:
                $ref: '#/components/schemas/MonitoringData'
        404:
          description: Monitoring data for the participant not found
    delete:
      tags:
      - monitoring
      summary: Delete monitoring data for a participant by participant id
      parameters:
      - name: participant-id
        in: path
        description: ID of a participant
        required: true
        schema:
          type: string
      responses:
        200:
          description: OK
        404:
          description: Monitoring data for the participant not found
components:
  schemas:
    MonitoringData:
      properties:
        participant-id:
          type: string
        control-loops:
          type: array
          items:
            properties:
              cl-instance-id:
                type: string
              applications:
                type: array
                items:
                  properties:
                    application-id:
                      type: string
                    status:
                      type: string
                      enum:
                        - INSTANTIATION_STARTED
                        - INSTANTIATED_RUNNING
                        - INSTANTIATED_FAILED
                    other-data:
                      type: string

...