...
A Client, in this case CLAMP, can perform CRUD operations or can deploy commission ControlLoops from DesignTime to RunTime Catalogue Database.
...
API_Gateway Service is for interacting to different database DesignTime/RunTime and should be responsible for responding success or failure status on different operations.
The deployment commissioning of ControlLoops definition from DesignTime to RunTime Catalogue Database can we achived using deploy 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 Database, Deploy Commissioning API ControlLoop Sequence diagram will help you understand the flow.
Warning |
---|
In future deploy commissioning Rest Endpoint might be updated to push ControlLoops not only in RunTime Database but to the participants involved in ControlLoop. |
3.1.1:
...
Commissioning REST API
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
openapi: 3.0.3 info: description: >- The ControlLoop DeploymentCommissioning API allows users to search and perform CRUD action on Controlloop Tosca exported data sets. version: 1.0.0 title: Control Loop DeploymentCommissioning 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: DeploymentCommissioning API - name: design-catalogue description: CRUD actions on an designtime Control Loop data sets. - name: runtime-catalogue 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-catalogue/deploycommission: post: tags: - runtime-catalogue summary: >- DeploysCommissions Tosca Service Template in RunTime Catalogue. description: >- This API Deployscommissions Tosca Service Template in RunTime Catalogue DB. operationId: deployLoopWithPOSTcommissionLoopWithPOST responses: '200': description: OK '404': description: No matching record found for the given criteria. /runtime-catalogue/loop/{controlLoopId}: get: tags: - runtime-catalogue 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-catalogue 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-catalogue 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-catalogue 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 |
3.1.2:
...
Commissioning Sequence Diagrams
GET, DELETE, CREATE API ControlLoop Sequence Diagram
PlantUML Macro title GET, DELETE, CREATE API Sequence Diag @startuml actor CLAMP participant API_Gateway database Database note over Database: It can be DesiginTime Or RuntTime Catalogue 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
Deploy API Commission API ControlLoop Sequence Diagram
PlantUML Macro title Deploy API ControlLoop Sequence Diag @startuml actor CLAMP participant API_Gateway database DesignTime_Catalogue_Database database RunTime_Catalogue_Database participant Dmaap collections Participants CLAMP -> API_Gateway: Rest DeployCommission 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_Catalogue_Database: Populate RunTime Catalogue with ControlLoops existing in DesignTime Catalogue Database API_Gateway -> RunTime_Catalogue_Database: Push ControlLoop to RunTime Catalogue 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 deploycommission ControLoop in RunTime Catalogue Database API_Gateway -> CLAMP : Return Failure end @enduml
...
This section refers to Instantiation of a Deployed Commissioned control loop. A client, in this case CLAMP (potentially DCAEMOD, etc in the future) will render the deployed commissioned control loops allowing selection of a particular control loop to be instantiated. User will then provide the configurations needed to instantiate the selected control loop which will be sent onto the CL_Instance_Control Service. The service will then distribute the configurations to DMaaP topic. Participants (agents) will pull the event containing the config and pick out their control loop components to be instantiated and start/set up those particular components. CL_Instance_Control Service will be waiting for a response back from all participants involved in the instantiation of the control loop, in regards to the state of instantiation. In successful response case the service will store the CL Instance LCM (Life Cycle management) data into the runtime DB as well as providing a message back to the client of the successful instantiation. In failure to receive the response case, a timeout will be called, which will result in a teardown event being sent to DMaaP. The participants will then receive the event and proceed to teardown the components that were instantiated or check that they have failed to instantiate in the first place and send a Teardown ACK back to the CL_Instance_Control Service. No CL Instance LCM data will be stored and a message indicating failure to instantiate the CL along side with the error will be sent back to the client (CLAMP).
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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-catalogue/instantiate: post: tags: - instantiate summary: Instantiate a deployedcommissioned 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-catalogue/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-catalogue/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 |
...
PlantUML Macro | ||
---|---|---|
| ||
@startuml actor CLAMP participant DeploymentCommissioning_API database Runtime_DB control CL_Instance_Control participant DmaaP collections Participants CLAMP -> DeploymentCommissioning_API : Fetch all DeployedCommissioned Control Loops DeploymentCommissioning_API -> Runtime_DB : Rest call to get the DeployedCommissioned Control Loops Runtime_DB -> DeploymentCommissioning_API : Return all DeployedCommissioned Loops which reside in the database DeploymentCommissioning_API -> CLAMP : Provide the data CLAMP -> CLAMP : Select Control Loop to be instantiated and provide configurations for it CLAMP -> CL_Instance_Control : Instantiate CL POST REST API call alt case where CLAMP sends deployedcommissioned CL id instead of the full CL in the body CL_Instance_Control -> Runtime_DB : Fetch the DeployedCommissioned Control Loop from Models table Runtime_DB -> CL_Instance_Control : Return the requested DeployedCommissioned Control Loop data end CL_Instance_Control -> DmaaP : INSTANTIATE Event (JSON/Yaml) note over CL_Instance_Control, DmaaP : List of Participant ID's containing Participant Metadata Blocks Participants -> DmaaP : Pulls its part of CL and tries to Instantiate alt failure case note over CL_Instance_Control : TIMEOUT, Instantiation ACK not received by monitoring service \nSupervision_Service requests a teardown CL_Instance_Control -> DmaaP : TEARDOWN Event (JSON/Yaml) Participants -> DmaaP : Pulls its part of CL and starts Teardown end @enduml |
...
PlantUML Macro | ||
---|---|---|
| ||
@startuml actor Client participant DeploymentCommissioning_API control CL_Instance_Control database Runtime_DB participant Supervision_Service participant Monitoring_Service participant DMaaP collections Participants ==Instantation== Client -> DeploymentCommissioning_API : Fetch all DeployedCommissioned Control Loops DeploymentCommissioning_API -> Runtime_DB : Rest call to get DeployedCommissioned Control Loops Runtime_DB -> DeploymentCommissioning_API : Return DeployedCommissioned Control Loops DeploymentCommissioning_API -> Client : Provide the data Client -> Client : Select CL for instantiation and provide config Client -> CL_Instance_Control : Instantiate CL POST REST API call alt case where Client sends deployedcommissioned CL id instead of the full CL in the body CL_Instance_Control -> Runtime_DB : Fetch the DeployedCommissioned Control Loop from Models table Runtime_DB -> CL_Instance_Control : Return the requested DeployedCommissioned Control Loop data end CL_Instance_Control -> DMaaP : INSTANTIATE Event (JSON/Yaml) note over CL_Instance_Control, DMaaP : List of Participant ID's containing Participant Metadata Blocks Participants -> DMaaP : Pulls its part of CL and tries to Instantiate ==Monitoring== Participants -> DMaaP : Starts sending monitoring events \nOnce instantiation of components begins note over DMaaP : Events are sent at set intervals, one per participant Monitoring_Service -> DMaaP : Consistently pulls events off the monitoring topic Monitoring_Service -> Runtime_DB : Puts and updates the monitoring data on the DB ==Supervision== Supervision_Service -> Runtime_DB : Periodic check on monitoring data alt CL successfully instantiated Supervision_Service -> Client : Return Instantiation Successful else CL failed to instantiate ... TIMEOUT CL state not changed to INSTANTIATED ... Supervision_Service -> CL_Instance_Control : Timeout, error occured CL_Instance_Control -> DMaaP : TEARDOWN Event (JSON/Yaml) Participants -> DMaaP : Pulls its part of CL and starts Teardown note over Monitoring_Service : Monitoring Service receives events and updates state note over Supervision_Service : Supervision Service finds that status has changed Supervision_Service -> Client : Return Instantiation Failed (http code and an error message) end @enduml |
...
- Upgrade and changes of the configuration data of participants
- Addition of or removal of participants in an Control Loop
- Upgrade of software in one or more participants in an Control Loop
- Maintenance of compatibility between participants when an update of more than one participant must be done together to ensure compatibility, for example, when a protocol being used by two participants to communicate is upgraded
5: Goals
5.1:
...
MVP
Jira | |||||
---|---|---|---|---|---|
|
- Design of Management Apps
- Specifying the source data
- Specifying the analytics, machine learning, and AI algorithms they want to use in their App
- Specifying the policies that govern the App
- Specifying the format, parameters, and mechanisms required to allow the App to autonomically adjust the network
- Preparing and specifying use cases to demonstrate the applicability of Management Apps
- Life cycle management of Management Apps
- Deployment of Apps
- Bringing the App itself and all its constituent components to life
- Stitching the data links between the components in the App together
- Initiating generation of the data that triggers the App to execute
- Updating of Management Apps
- Allowing the parameters, algorithms, policy, of controller configuration data to be modified on executing Apps
- Deletion of Apps
- Life cycle management is demonstrated using the use cases specified in the design phase
- Deployment of Apps
- Monitoring and analysis of Management Apps
- Specification of metrics for monitoring and analysis
- Allowing general App data and data specific to particular Apps to be collected at run time
- Storing of the monitored data
- Running general App algorithms or algorithms for specific components of Apps on the monitored data to ensure that the Apps are running correctly and optimally
- Feedback of App performance results to users
- Allowing the autonomic Apps themselves to have autonomic self-healing.
- Monitoring and analysis is demonstrated using the use cases developed in the project
5.2: MVP
Jira | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
- Design Time
- Support design of multiple control loops*
- Support design of individual control loop component**
- Support composition of control loops**
- Runtime
- Participant registration and participant deregistration
- Support deployments commissioning of control loops
- Ingestion with artifact references*
- Ingestion with artifact embedded**
- Support instantiation of control loop
- Support instantiation of control loop TOSCA to DMaaP MR*
- Support instantiation of config for the control loop*
- Support monitoring of control loops
- Receive control loop heartbeat events (heartbeat starts when component of control loop is running)*
- Support supervision of control loops
- Periodically check monitored data, and update state of control loop*
- Participants
- Agent library*
- Reference(test) participant*
- CDS participant*
- DCAE participant*
- Policy participant*
- Demo**
- Throwaway Monitoring/Control GUI
...