diff options
author | egernug <gerard.nugent@est.tech> | 2022-02-01 13:10:10 +0000 |
---|---|---|
committer | egernug <gerard.nugent@est.tech> | 2022-02-02 10:27:10 +0000 |
commit | 5e6b6e66351ec305dbac99594067b930170fb987 (patch) | |
tree | 9059237ea40b3644bc3869cb92a878b9fe414e0e | |
parent | 9e518b9899dd7986c54d27618f0f55194b6be951 (diff) |
[PMSH] Update API Docs
Updating of PMSH documentation for early image release
Issue-ID: DCAEGEN2-2816
Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: Ic6cd69c63242a3f9631ec7690d3038e7401d2522
5 files changed, 500 insertions, 367 deletions
diff --git a/docs/sections/services/pm-subscription-handler/configuration.rst b/docs/sections/services/pm-subscription-handler/configuration.rst deleted file mode 100644 index 0be8b61f..00000000 --- a/docs/sections/services/pm-subscription-handler/configuration.rst +++ /dev/null @@ -1,321 +0,0 @@ -.. This work is licensed under a Creative Commons Attribution 4.0 International License. -.. http://creativecommons.org/licenses/by/4.0 - -.. Configuration: - -Configuration -============= - -The PMSH is configured and deployed via the DCAE dashboard. - -Application specific configuration -"""""""""""""""""""""""""""""""""" - -The application config is the basic information that PMSH needs to run. The following parameters are required, they are -specified in the dashboard deployment GUI. - -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| Field | Description | Type | Required | Default | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| tag_version | Docker image to be used. | string | True | nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-subscription-handler:1.0.3 | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| replicas | Number of instances. | integer | True | 1 | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| pm_publish_topic_name | The topic that PMSH will publish to, and which policy will subscribe to. | string | True | unauthenticated.DCAE_CL_OUTPUT | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| policy_feedback_topic_name | The topic that PMSH will subscribe to, and which policy will publish to. | string | True | unauthenticated.PMSH_CL_INPUT | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| aai_notification_topic_name | The topic that PMSH will subscribe to, and which AAI will publish change events to. | string | True | AAI-EVENT | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| publisher_client_role | The client role used to publish to the topic that policy will subscribe to. | string | True | org.onap.dcae.pmPublisher | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| subscriber_client_role | The client role used to subscribe to the topic that AAI will publish change events to. | string | True | org.onap.dcae.pmSubscriber | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| dcae_location | Location of the DCAE cluster. | string | True | san-francisco | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| cpu_limit | CPU limit for the PMSH service. | string | True | 1000m | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| cpu_request | Requested CPU for the PMSH service. | string | True | 1000m | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| memory_limit | Memory limit for the PMSH service. | string | True | 1024Mi | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| memory_request | Requested Memory for the PMSH service. | string | True | 1024Mi | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| pgaas_cluster_name | Cluster name for Postgres As A Service. | string | True | dcae-pg-primary.onap | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| enable_tls | Boolean flag to toggle HTTPS cert auth support. | boolean | True | true | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ -| protocol | HTTP protocol for PMSH. If 'enable_tls' is false, protocol must be set to http. | string | True | https | -+-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+ - -.. _Subscription: - -Subscription configuration -"""""""""""""""""""""""""" - -The subscription is configured within the monitoring policy. The subscription model schema is as follows: - -**subscription** - -.. code-block:: json - - { - "subscription":{ - "subscriptionName":"someExtraPM-All-gNB-R2B", - "operationalPolicyName":"operational-policy-name", - "controlLoopName":"controlLoop-name", - "nfFilter":{ - "nfNames":[ - "^pnf1.*" - ], - "modelInvariantIDs":[ - "5845y423-g654-6fju-po78-8n53154532k6", - "7129e420-d396-4efb-af02-6b83499b12f8" - ], - "modelVersionIDs":[ - "e80a6ae3-cafd-4d24-850d-e14c084a5ca9" - ], - "modelNames": [ - "pnf102" - ] - }, - "measurementGroups":[ - { - "measurementGroup":{ - "measurementGroupName":"msgroupname", - "administrativeState":"UNLOCKED", - "fileBasedGP":15, - "fileLocation":"/pm/pm.xml", - "measurementTypes":[ - { - "measurementType":"EutranCell.*" - }, - { - "measurementType":"EutranCellRelation.pmCounter1" - }, - { - "measurementType":"EutranCellRelation.pmCounter2" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" - }, - { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2" - }, - { - "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3" - } - ] - } - } - ] - } - } - - -+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ -| Field | Description | Type | Required | Values | -+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ -| subscriptionName | Name of the subscription. | string | True | subscriptionName | -+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ -| operationalPolicyName | Name of the operational policy to be executed. | string | True | operationalPolicyName | -+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ -| controlLoopName | Name of the control loop. | string | True | controlLoopName | -+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ -| nfFilter | The network function filter will be used to filter the list of nf's stored in A&AI to produce a subset. | list | False | | -+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ -| measurementGroups | List containing measurementGroup. | list | True | List of measurementGroup | -+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ - -.. note:: - Since release Istanbul of ONAP, PMSH Subscriptions model schema is updated. - Subscription model is centric to ``measurementGroup``, for instance any update on attributes administrativeState, fileBasedGP, - fileLocation, nfFilter will be applicable to only individual measurementGroup object. - -**nfFilter** - -The ``nfFilter`` will be used in order to filter the list of NF's retrieved from A&AI. There are four criteria that -can be filtered on, nfNames, modelInvariantIDs, modelVersionIDs and/or modelNames. All 4 of these are optional fields but at -least 1 must be present for the filter to work. - -.. code-block:: json - - "nfFilter": { - "nfNames":[ - "^pnf.*", - "^vnf.*" - ], - "modelInvariantIDs": [ - "5845y423-g654-6fju-po78-8n53154532k6", - "7129e420-d396-4efb-af02-6b83499b12f8" - ], - "modelVersionIDs": [ - "e80a6ae3-cafd-4d24-850d-e14c084a5ca9" - ], - "modelNames": [ - "pnf102" - ] - } - -+------------------------+-----------------------------------------------------------------------------------------------+------+----------+ -| Field | Description | Type | Required | -+========================+===============================================================================================+======+==========+ -| nfNames | List of NF names. These names are regexes, which will be parsed by the PMSH. | list | False | -+------------------------+-----------------------------------------------------------------------------------------------+------+----------+ -| modelInvariantIDs | List of modelInvariantIDs. These UUIDs will be checked for exact matches with AAI entities. | list | False | -+------------------------+-----------------------------------------------------------------------------------------------+------+----------+ -| modelVersionIDs | List of modelVersionIDs. These IDs will be checked for exact matches with AAI entities. | list | False | -+------------------------+-----------------------------------------------------------------------------------------------+------+----------+ -| modelNames | List of modelNames. These names will be checked for exact matches with AAI entities. | list | False | -+------------------------+-----------------------------------------------------------------------------------------------+------+----------+ - -**measurementGroup** - -``measurementGroup`` is used to specify the group of measurements that will be collected. - -.. code-block:: json - - "measurementGroup": { - "measurementGroupName":"msgroupname", - "administrativeState":"UNLOCKED", - "fileBasedGP":15, - "fileLocation":"/pm/pm.xml", - "measurementTypes": [ - { - "measurementType": "EutranCell.*" - }, - { - "measurementType": "EutranCellRelation.pmCounter1" - }, - { - "measurementType": "EutranCellRelation.pmCounter2" - } - ], - "managedObjectDNsBasic": [ - { - "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" - }, - { - "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2" - }, - { - "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3" - } - ] - } - -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ -| Field | Description | Type | Required | Values | -+=======================+========================================================================================================================================================================================+======+==========+========+ -| measurementGroupName | Unique identifier for measurementGroup. | | | | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ -| administrativeState | Setting a measurementGroup to UNLOCKED will apply the subscription changes to the NF instances immediately. If it is set to LOCKED, it will not be applied until it is later unlocked. | | | | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ -| fileBasedGP | The frequency at which measurements are produced. | | | | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ -| fileLocation | Location of Report Output Period file. | | | | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ -| measurementTypes | List of measurement types. These are regexes, and it is expected that either the CDS blueprint, or NF can parse them. As the PMSH will not do so. | list | True | | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ -| managedObjectDNsBasic | List of managed object distinguished names. | list | True | | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ - -.. _Topics: - -MR Topics -""""""""" - -Subscriber: -^^^^^^^^^^^ - -:: - - AAI-EVENT - -This topic is used so that the PMSH can listen for new NFs getting added or deleted. If the NF matches the NF filter (See -:ref:`Configuration<Configuration>`) it will be added to the relevant subscription. - -:: - - unauthenticated.PMSH_CL_INPUT - -This topic enables the operational policy to provide feedback on the status of a subscription attempt, back to -PMSH, with a message of either success or failed. - -Example of successful CREATE event sent from policy: - -.. code-block:: json - - { - "name": "ResponseEvent", - "nameSpace": "org.onap.policy.apex.onap.pmcontrol", - "source": "APEX", - "target": "DCAE", - "version": "0.0.1", - "status": { - "subscriptionName": "subscriptiona", - "measurementGroupName":"msgroupname", - "nfName": "PNF104", - "changeType": "CREATE", - "message": "success" - } - } - - -Publisher: -^^^^^^^^^^ - -.. _DCAE_CL_OUTPUT_Topic: - -:: - - unauthenticated.DCAE_CL_OUTPUT - -PMSH publishes subscriptions to this topic. They will be consumed by an operational policy which will make a request to CDS to -change the state of the subscription. - -.. note:: - Since release Istanbul of ONAP, PMSH Publish Subscriptions event format is updated. - A new attribute ``measurementGroupName`` is added as a unique identifier for ``measurementGroup`` and a single ``measurementGroup`` is associated with - PMSH Subscription event. - -Example event sent from PMSH: - -.. code-block:: json - - { - "nfName":"PNF104", - "ipv4Address": "10.12.13.12", - "policyName":"operational-policy-name", - "closedLoopControlName":"controlLoop-name", - "blueprintName":"pm_control", - "blueprintVersion":"1.2.4", - "changeType":"CREATE", - "subscription":{ - "administrativeState":"UNLOCKED", - "subscriptionName":"subscriptiona", - "fileBasedGP":15, - "fileLocation":"/pm/pm.xml", - "measurementGroup":{ - "measurementGroupName":"msgroupname", - "measurementTypes":[ - { - "measurementType":"countera" - }, - { - "measurementType":"counterb" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"dna" - }, - { - "DN":"dnb" - } - ] - } - } - }
\ No newline at end of file diff --git a/docs/sections/services/pm-subscription-handler/delivery.rst b/docs/sections/services/pm-subscription-handler/delivery.rst index 2412f548..b4b2bf51 100644 --- a/docs/sections/services/pm-subscription-handler/delivery.rst +++ b/docs/sections/services/pm-subscription-handler/delivery.rst @@ -1,5 +1,6 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2022 Nordix Foundation .. _Delivery: @@ -13,4 +14,4 @@ The PMSH is delivered as a docker image that can be downloaded from ONAP docker :: - nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-subscription-handler:1.0.3 + nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-subscription-handler:2.0.0 diff --git a/docs/sections/services/pm-subscription-handler/index.rst b/docs/sections/services/pm-subscription-handler/index.rst index bac35c87..76a6c7f4 100644 --- a/docs/sections/services/pm-subscription-handler/index.rst +++ b/docs/sections/services/pm-subscription-handler/index.rst @@ -1,5 +1,6 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2022 Nordix Foundation PM Subscription Handler @@ -14,5 +15,5 @@ PM Subscription Handler ./delivery.rst ./logging.rst ./installation.rst - ./configuration.rst + ./offeredapi.rst ./troubleshooting.rst diff --git a/docs/sections/services/pm-subscription-handler/installation.rst b/docs/sections/services/pm-subscription-handler/installation.rst index ea55256a..66e5c9fb 100644 --- a/docs/sections/services/pm-subscription-handler/installation.rst +++ b/docs/sections/services/pm-subscription-handler/installation.rst @@ -1,72 +1,323 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2022 Nordix Foundation -.. _pmsh-installation: -Installation -============ +Installation and Configuration +============================== + +PM Subscription Handler (PMSH) microservice can be deployed using helm charts in oom repository. -In Guilin, the PMSH can be deployed using the DCAE Dashboard or via CLI. Steps to deploy using CLI will be shown -below. Deployment Prerequisites -^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~ + +- PMSH service requires config-binding-service, policy, dmaap, cds, aai and aaf components to be running. + + + + +Deployment Steps +~~~~~~~~~~~~~~~~ + +- Default app config values can be updated in oom/kubernetes/dcaegen2-services/components/dcae-pmsh/values.yaml + + +- Enable PMSH component in oom/kubernetes/dcaegen2-services/values.yaml + + .. code-block:: bash + + dcae-pmsh: + enabled: true + +- Make the chart and deploy using the following command: + + .. code-block:: bash + + cd oom/kubernetes/ + make dcaegen2-services + helm install dev-dcaegen2-services dcaegen2-services --namespace <namespace> --set global.masterPassword=<password> + +- To deploy only PMSH: + + .. code-block:: bash + + helm install dev-pmsh dcaegen2-services/components/dcae-pmsh --namespace <namespace> --set global.masterPassword=<password> + +- To uninstall: + + .. code-block:: bash + + helm uninstall dev-pmsh + + +.. _Subscription: + +Subscription configuration +"""""""""""""""""""""""""" + +The subscription is configured within the monitoring policy. The subscription model schema is as follows: + +**subscription** + +.. code-block:: json + + { + "subscription":{ + "subscriptionName":"someExtraPM-All-gNB-R2B", + "operationalPolicyName":"operational-policy-name", + "controlLoopName":"controlLoop-name", + "nfFilter":{ + "nfNames":[ + "^pnf1.*" + ], + "modelInvariantIDs":[ + "5845y423-g654-6fju-po78-8n53154532k6", + "7129e420-d396-4efb-af02-6b83499b12f8" + ], + "modelVersionIDs":[ + "e80a6ae3-cafd-4d24-850d-e14c084a5ca9" + ], + "modelNames": [ + "pnf102" + ] + }, + "measurementGroups":[ + { + "measurementGroup":{ + "measurementGroupName":"msgroupname", + "administrativeState":"UNLOCKED", + "fileBasedGP":15, + "fileLocation":"/pm/pm.xml", + "measurementTypes":[ + { + "measurementType":"EutranCell.*" + }, + { + "measurementType":"EutranCellRelation.pmCounter1" + }, + { + "measurementType":"EutranCellRelation.pmCounter2" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" + }, + { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2" + }, + { + "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3" + } + ] + } + } + ] + } + } + + ++-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ +| Field | Description | Type | Required | Values | ++-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ +| subscriptionName | Name of the subscription. | string | True | subscriptionName | ++-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ +| operationalPolicyName | Name of the operational policy to be executed. | string | True | operationalPolicyName | ++-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ +| controlLoopName | Name of the control loop. | string | True | controlLoopName | ++-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ +| nfFilter | The network function filter will be used to filter the list of nf's stored in A&AI to produce a subset. | list | False | | ++-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ +| measurementGroups | List containing measurementGroup. | list | True | List of measurementGroup | ++-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+ + +.. note:: + Since release Istanbul of ONAP, PMSH Subscriptions model schema is updated. + Subscription model is centric to ``measurementGroup``, for instance any update on attributes administrativeState, fileBasedGP, + fileLocation, nfFilter will be applicable to only individual measurementGroup object. + +**nfFilter** + +The ``nfFilter`` will be used in order to filter the list of NF's retrieved from A&AI. There are four criteria that +can be filtered on, nfNames, modelInvariantIDs, modelVersionIDs and/or modelNames. All 4 of these are optional fields but at +least 1 must be present for the filter to work. + +.. code-block:: json + + "nfFilter": { + "nfNames":[ + "^pnf.*", + "^vnf.*" + ], + "modelInvariantIDs": [ + "5845y423-g654-6fju-po78-8n53154532k6", + "7129e420-d396-4efb-af02-6b83499b12f8" + ], + "modelVersionIDs": [ + "e80a6ae3-cafd-4d24-850d-e14c084a5ca9" + ], + "modelNames": [ + "pnf102" + ] + } + ++------------------------+-----------------------------------------------------------------------------------------------+------+----------+ +| Field | Description | Type | Required | ++========================+===============================================================================================+======+==========+ +| nfNames | List of NF names. These names are regexes, which will be parsed by the PMSH. | list | False | ++------------------------+-----------------------------------------------------------------------------------------------+------+----------+ +| modelInvariantIDs | List of modelInvariantIDs. These UUIDs will be checked for exact matches with AAI entities. | list | False | ++------------------------+-----------------------------------------------------------------------------------------------+------+----------+ +| modelVersionIDs | List of modelVersionIDs. These IDs will be checked for exact matches with AAI entities. | list | False | ++------------------------+-----------------------------------------------------------------------------------------------+------+----------+ +| modelNames | List of modelNames. These names will be checked for exact matches with AAI entities. | list | False | ++------------------------+-----------------------------------------------------------------------------------------------+------+----------+ + +**measurementGroup** + +``measurementGroup`` is used to specify the group of measurements that will be collected. + +.. code-block:: json + + "measurementGroup": { + "measurementGroupName":"msgroupname", + "administrativeState":"UNLOCKED", + "fileBasedGP":15, + "fileLocation":"/pm/pm.xml", + "measurementTypes": [ + { + "measurementType": "EutranCell.*" + }, + { + "measurementType": "EutranCellRelation.pmCounter1" + }, + { + "measurementType": "EutranCellRelation.pmCounter2" + } + ], + "managedObjectDNsBasic": [ + { + "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1" + }, + { + "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2" + }, + { + "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3" + } + ] + } + ++-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ +| Field | Description | Type | Required | Values | ++=======================+========================================================================================================================================================================================+======+==========+========+ +| measurementGroupName | Unique identifier for measurementGroup. | | | | ++-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ +| administrativeState | Setting a measurementGroup to UNLOCKED will apply the subscription changes to the NF instances immediately. If it is set to LOCKED, it will not be applied until it is later unlocked. | | | | ++-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ +| fileBasedGP | The frequency at which measurements are produced. | | | | ++-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ +| fileLocation | Location of Report Output Period file. | | | | ++-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ +| measurementTypes | List of measurement types. These are regexes, and it is expected that either the CDS blueprint, or NF can parse them. As the PMSH will not do so. | list | True | | ++-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ +| managedObjectDNsBasic | List of managed object distinguished names. | list | True | | ++-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+ + +.. _Topics: -In order to successfully deploy the PMSH, one will need administrator access to the kubernetes cluster, as the following -procedure will be run from the dcae-bootstrap pod. -As well as this, the following components are required to be running. They can be verified by running the health checks. +MR Topics +""""""""" - - DCAE Platform - - DMaaP - - A&AI - - AAF +Subscriber: +^^^^^^^^^^^ -The robot healthcheck can be run from one of the Kubernetes controllers. +:: -.. code-block:: bash + AAI-EVENT - ./oom/kubernetes/robot/ete-k8s.sh onap health +This topic is used so that the PMSH can listen for new NFs getting added or deleted. If the NF matches the NF filter it will be added to the relevant subscription. -Deployment Procedure -^^^^^^^^^^^^^^^^^^^^ +:: -To deploy the PMSH in the Frankfurt release, the monitoring policy needs to be pushed directly to CONSUL. -To begin, kubectl exec on to the dcae-bootstrap pod and move to the /tmp directory. + unauthenticated.PMSH_CL_INPUT -.. code-block:: bash +This topic enables the operational policy to provide feedback on the status of a subscription attempt, back to +PMSH, with a message of either success or failed. - kubectl exec -itn <onap-namespace> onap-dcae-bootstrap bash +Example of successful CREATE event sent from policy: -For information on creating a monitoring policy see :ref:`Subscription configuration<Subscription>`. +.. code-block:: json -The following JSON is an example monitoring policy. + { + "name": "ResponseEvent", + "nameSpace": "org.onap.policy.apex.onap.pmcontrol", + "source": "APEX", + "target": "DCAE", + "version": "0.0.1", + "status": { + "subscriptionName": "subscriptiona", + "measurementGroupName":"msgroupname", + "nfName": "PNF104", + "changeType": "CREATE", + "message": "success" + } + } -.. literalinclude:: resources/monitoring-policy.json - :language: json -The monitoring-policy.json can then be PUT with the following curl request. +Publisher: +^^^^^^^^^^ -.. code-block:: bash +.. _DCAE_CL_OUTPUT_Topic: - curl -X PUT http://consul:8500/v1/kv/dcae-pmsh:policy \ - -H 'Content-Type: application/json' \ - -d @monitoring-policy.json +:: -To deploy the PMSH microservice using the deployment handler API, the ``serviceTypeId`` is needed. This can be retrieved -using the inventory API. + unauthenticated.DCAE_CL_OUTPUT -.. code-block:: bash +PMSH publishes subscriptions to this topic. They will be consumed by an operational policy which will make a request to CDS to +change the state of the subscription. - curl -k https://inventory:8080/dcae-service-types \ - | grep k8s-pmsh | jq '.items[] | select(.typeName == "k8s-pmsh") | .typeId' +.. note:: + Since release Istanbul of ONAP, PMSH Publish Subscriptions event format is updated. + A new attribute ``measurementGroupName`` is added as a unique identifier for ``measurementGroup`` and a single ``measurementGroup`` is associated with + PMSH Subscription event. -Finally, deploy the PMSH via dcae deployment handler. +Example event sent from PMSH: -.. code-block:: bash +.. code-block:: json - curl -k https://deployment-handler:8443/dcae-deployments/dcae-pmsh \ - -H 'Content-Type: application/json' \ - -d '{ - "inputs": (), - "serviceTypeId": "<k8s-pmsh-typeId>" - }' + { + "nfName":"PNF104", + "ipv4Address": "10.12.13.12", + "policyName":"operational-policy-name", + "closedLoopControlName":"controlLoop-name", + "blueprintName":"pm_control", + "blueprintVersion":"1.2.4", + "changeType":"CREATE", + "subscription":{ + "administrativeState":"UNLOCKED", + "subscriptionName":"subscriptiona", + "fileBasedGP":15, + "fileLocation":"/pm/pm.xml", + "measurementGroup":{ + "measurementGroupName":"msgroupname", + "measurementTypes":[ + { + "measurementType":"countera" + }, + { + "measurementType":"counterb" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"dna" + }, + { + "DN":"dnb" + } + ] + } + } + } diff --git a/docs/sections/services/pm-subscription-handler/offeredapi.rst b/docs/sections/services/pm-subscription-handler/offeredapi.rst new file mode 100644 index 00000000..3588036b --- /dev/null +++ b/docs/sections/services/pm-subscription-handler/offeredapi.rst @@ -0,0 +1,201 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2022 Nordix Foundation + + +API +=== + +GET /healthcheck +--------------------------------------------------- + +Description +~~~~~~~~~~~ + +This is the health check endpoint. If this returns a 200, the server is alive. + + +Responses +~~~~~~~~~ + ++-----------+--------------------------+ +| HTTP Code | Description | ++===========+==========================+ +| **200** | Successful response | ++-----------+--------------------------+ +| **503** | Service unavailable | ++-----------+--------------------------+ + + +POST /subscription +-------------------------------------------------- + +Description +~~~~~~~~~~~ + +Create a PM Subscription + + +Responses +~~~~~~~~~ + ++-----------+--------------------------------------+ +| HTTP Code | Description | ++===========+======================================+ +| **201** | Successfully created PM Subscription | ++-----------+--------------------------------------+ +| **400** | Invalid Input | ++-----------+--------------------------------------+ +| **409** | Duplicate Data | ++-----------+--------------------------------------+ + +Sample Subscription Body +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: http + + { + "subscription": { + "subscriptionName": "new_sub", + "policyName": "pmsh_policy", + "nfFilter": { + "nfNames": [ + "^pnf.*", + "^vnf.*" + ], + "modelInvariantIDs": [ + + ], + "modelVersionIDs": [ + + ], + "modelNames": [] + }, + "measurementGroups": [{ + "measurementGroup": { + "measurementGroupName": "msr_grp_name", + "fileBasedGP": 15, + "fileLocation": "\/pm\/pm.xml", + "administrativeState": "UNLOCKED", + "measurementTypes": [{ + "measurementType": "counter_a" + }], + "managedObjectDNsBasic": [{ + "DN": "string" + }] + } + }] + } + } + + +GET /subscription +-------------------------------------------------- + +Description +~~~~~~~~~~~ + +Get all the subscriptions from PMSH + + +Responses +~~~~~~~~~ + ++-----------+----------------------------------------+ +| HTTP Code | Description | ++===========+========================================+ +| **200** | Successfully fetched all subscriptions | ++-----------+----------------------------------------+ +| **500** | Exception occured when querying DB | ++-----------+----------------------------------------+ + + +GET /subscription/{subscription_name} +--------------------------------------------------- + +Description +~~~~~~~~~~~ + +Get the Subscription from PMSH specified by Name + +Responses +~~~~~~~~~ + ++-----------+--------------------------------------------+ +| HTTP Code | Description | ++===========+============================================+ +| **200** | OK; Requested Subscription was returned | ++-----------+--------------------------------------------+ +| **404** | Subscription with specified name not found | ++-----------+--------------------------------------------+ +| **500** | Exception occurred while querying database | ++-----------+--------------------------------------------+ + + +DELETE /subscription/{subscription_name} +--------------------------------------------------- + +Description +~~~~~~~~~~~ + +Deletes the Subscription from PMSH specified by Name + +Responses +~~~~~~~~~ + ++-----------+---------------------------------------------------------------------+ +| HTTP Code | Description | ++===========+=====================================================================+ +| **204** | Successfully deleted the subscription and returns NO Content | ++-----------+---------------------------------------------------------------------+ +| **404** | Subscription with specified name not found | ++-----------+---------------------------------------------------------------------+ +| **409** | Subscription could not be deleted as it contains measurement groups | +| | with state UNLOCKED OR state change to LOCKED was under process | ++-----------+---------------------------------------------------------------------+ +| **500** | Exception occurred on the server | ++-----------+---------------------------------------------------------------------+ + + +GET /subscription/{subscription_name}/measurementGroups/{measurement_group_name} +-------------------------------------------------------------------------------- + +Description +~~~~~~~~~~~ + +Get the measurement group and associated network functions from PMSH by using sub name and meas group name + +Responses +~~~~~~~~~ + ++-----------+---------------------------------------------------------------------+ +| HTTP Code | Description | ++===========+=====================================================================+ +| **200** | OK; Received requested measurement group with associated NF's | ++-----------+---------------------------------------------------------------------+ +| **404** | Measurement group with specified name not found | ++-----------+---------------------------------------------------------------------+ +| **500** | Exception occurred on the server | ++-----------+---------------------------------------------------------------------+ + + +PUT /subscription/{subscription_name}/measurementGroups/{measurement_group_name}/{administrativeState} +-------------------------------------------------------------------------------- + +Description +~~~~~~~~~~~ + +Update administrative state for a measurement group + +Responses +~~~~~~~~~ + ++-----------+---------------------------------------------------------------------+ +| HTTP Code | Description | ++===========+=====================================================================+ +| **201** | Successfully updated administrative state | ++-----------+---------------------------------------------------------------------+ +| **409** | Duplicate data | ++-----------+---------------------------------------------------------------------+ +| **500** | Invalid input | ++-----------+---------------------------------------------------------------------+ |