summaryrefslogtreecommitdiffstats
path: root/docs/sections/services/pm-subscription-handler/installation.rst
blob: d0a6e4049087f57607e846e9559a50362311b91b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /*
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2022 Nordix Foundation


Installation and Configuration
==============================

PM Subscription Handler (PMSH) microservice can be deployed using helm charts in oom repository.


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 | False    | 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  | True     |                          |
+-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
| 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 | True     |
+------------------------+-----------------------------------------------------------------------------------------------+------+----------+
| modelInvariantIDs      | List of modelInvariantIDs. These UUIDs will be checked for exact matches with AAI entities.   | list | True     |
+------------------------+-----------------------------------------------------------------------------------------------+------+----------+
| modelVersionIDs        | List of modelVersionIDs. These IDs will be checked for exact matches with AAI entities.       | list | True     |
+------------------------+-----------------------------------------------------------------------------------------------+------+----------+
| modelNames             | List of modelNames. These names will be checked for exact matches with AAI entities.          | list | True     |
+------------------------+-----------------------------------------------------------------------------------------------+------+----------+

**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.                                                                                                                                                |      | True     |        |
+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
| 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. |      | True     |        |
+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
| fileBasedGP           | The frequency at which measurements are produced.                                                                                                                                      |      | True     |        |
+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
| fileLocation          | Location of Report Output Period file.                                                                                                                                                 |      | True     |        |
+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
| 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 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"
                }
             ]
          }
       }
    }