summaryrefslogtreecommitdiffstats
path: root/docs/sections/services/pm-subscription-handler/installation.rst
blob: 66e5c9fb1f2203044aaf4d149ecec48f9aba49a7 (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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
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


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 | 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 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"
                }
             ]
          }
       }
    }