Merge "Add Helm installation guide for son-handler"
[dcaegen2.git] / docs / sections / services / pm-subscription-handler / configuration.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 .. Configuration:
5
6 Configuration
7 =============
8
9 The PMSH is configured and deployed via the DCAE dashboard.
10
11 Application specific configuration
12 """"""""""""""""""""""""""""""""""
13
14 The application config is the basic information that PMSH needs to run. The following parameters are required, they are
15 specified in the dashboard deployment GUI.
16
17 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
18 | Field                       | Description                                                                            | Type    | Required | Default                                                                             |
19 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
20 | tag_version                 | Docker image to be used.                                                               | string  | True     | nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-subscription-handler:1.0.3 |
21 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
22 | replicas                    | Number of instances.                                                                   | integer | True     | 1                                                                                   |
23 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
24 | pm_publish_topic_name       | The topic that PMSH will publish to, and which policy will subscribe to.               | string  | True     | unauthenticated.DCAE_CL_OUTPUT                                                      |
25 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
26 | policy_feedback_topic_name  | The topic that PMSH will subscribe to, and which policy will publish to.               | string  | True     | unauthenticated.PMSH_CL_INPUT                                                       |
27 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
28 | aai_notification_topic_name | The topic that PMSH will subscribe to, and which AAI will publish change events to.    | string  | True     | AAI-EVENT                                                                           |
29 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
30 | publisher_client_role       | The client role used to publish to the topic that policy will subscribe to.            | string  | True     | org.onap.dcae.pmPublisher                                                           |
31 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
32 | 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                                                          |
33 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
34 | dcae_location               | Location of the DCAE cluster.                                                          | string  | True     | san-francisco                                                                       |
35 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
36 | cpu_limit                   | CPU limit for the PMSH service.                                                        | string  | True     | 1000m                                                                               |
37 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
38 | cpu_request                 | Requested CPU for the PMSH service.                                                    | string  | True     | 1000m                                                                               |
39 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
40 | memory_limit                | Memory limit for the PMSH service.                                                     | string  | True     | 1024Mi                                                                              |
41 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
42 | memory_request              | Requested Memory for the PMSH service.                                                 | string  | True     | 1024Mi                                                                              |
43 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
44 | pgaas_cluster_name          | Cluster name for Postgres As A Service.                                                | string  | True     | dcae-pg-primary.onap                                                                |
45 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
46 | enable_tls                  | Boolean flag to toggle HTTPS cert auth support.                                        | boolean | True     | true                                                                                |
47 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
48 | protocol                    | HTTP protocol for PMSH. If 'enable_tls' is false, protocol must be set to http.        | string  | True     | https                                                                               |
49 +-----------------------------+----------------------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------------+
50
51 .. _Subscription:
52
53 Subscription configuration
54 """"""""""""""""""""""""""
55
56 The subscription is configured within the monitoring policy. The subscription model schema is as follows:
57
58 **subscription**
59
60 .. code-block:: json
61
62     {
63        "subscription":{
64           "subscriptionName":"someExtraPM-All-gNB-R2B",
65           "operationalPolicyName":"operational-policy-name",
66           "controlLoopName":"controlLoop-name",
67           "nfFilter":{
68              "nfNames":[
69                 "^pnf1.*"
70              ],
71              "modelInvariantIDs":[
72                 "5845y423-g654-6fju-po78-8n53154532k6",
73                 "7129e420-d396-4efb-af02-6b83499b12f8"
74              ],
75              "modelVersionIDs":[
76                 "e80a6ae3-cafd-4d24-850d-e14c084a5ca9"
77              ],
78             "modelNames": [
79                 "pnf102"
80             ]
81           },
82           "measurementGroups":[
83              {
84                 "measurementGroup":{
85                    "measurementGroupName":"msgroupname",
86                    "administrativeState":"UNLOCKED",
87                    "fileBasedGP":15,
88                    "fileLocation":"/pm/pm.xml",
89                    "measurementTypes":[
90                       {
91                          "measurementType":"EutranCell.*"
92                       },
93                       {
94                          "measurementType":"EutranCellRelation.pmCounter1"
95                       },
96                       {
97                          "measurementType":"EutranCellRelation.pmCounter2"
98                       }
99                    ],
100                    "managedObjectDNsBasic":[
101                       {
102                          "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1"
103                       },
104                       {
105                          "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2"
106                       },
107                       {
108                          "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3"
109                       }
110                    ]
111                 }
112              }
113           ]
114        }
115     }
116
117
118 +-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
119 | Field                 | Description                                                                                             | Type   | Required | Values                   |
120 +-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
121 | subscriptionName      | Name of the subscription.                                                                               | string | True     | subscriptionName         |
122 +-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
123 | operationalPolicyName | Name of the operational policy to be executed.                                                          | string | True     | operationalPolicyName    |
124 +-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
125 | controlLoopName       | Name of the control loop.                                                                               | string | True     | controlLoopName          |
126 +-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
127 | 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    |                          |
128 +-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
129 | measurementGroups     | List containing measurementGroup.                                                                       |  list  | True     | List of measurementGroup |
130 +-----------------------+---------------------------------------------------------------------------------------------------------+--------+----------+--------------------------+
131
132 .. note::
133   Since release Istanbul of ONAP, PMSH Subscriptions model schema is updated.
134   Subscription model is centric to ``measurementGroup``, for instance any update on attributes administrativeState, fileBasedGP,
135   fileLocation, nfFilter will be applicable to only individual measurementGroup object.
136
137 **nfFilter**
138
139 The ``nfFilter`` will be used in order to filter the list of NF's retrieved from A&AI. There are four criteria that
140 can be filtered on, nfNames, modelInvariantIDs, modelVersionIDs and/or modelNames.  All 4 of these are optional fields but at
141 least 1 must be present for the filter to work.
142
143 .. code-block:: json
144
145     "nfFilter": {
146         "nfNames":[
147            "^pnf.*",
148            "^vnf.*"
149         ],
150         "modelInvariantIDs": [
151            "5845y423-g654-6fju-po78-8n53154532k6",
152            "7129e420-d396-4efb-af02-6b83499b12f8"
153         ],
154         "modelVersionIDs": [
155            "e80a6ae3-cafd-4d24-850d-e14c084a5ca9"
156         ],
157         "modelNames": [
158             "pnf102"
159         ]
160     }
161
162 +------------------------+-----------------------------------------------------------------------------------------------+------+----------+
163 | Field                  | Description                                                                                   | Type | Required |
164 +========================+===============================================================================================+======+==========+
165 | nfNames                | List of NF names. These names are regexes, which will be parsed by the PMSH.                  | list | False    |
166 +------------------------+-----------------------------------------------------------------------------------------------+------+----------+
167 | modelInvariantIDs      | List of modelInvariantIDs. These UUIDs will be checked for exact matches with AAI entities.   | list | False    |
168 +------------------------+-----------------------------------------------------------------------------------------------+------+----------+
169 | modelVersionIDs        | List of modelVersionIDs. These IDs will be checked for exact matches with AAI entities.       | list | False    |
170 +------------------------+-----------------------------------------------------------------------------------------------+------+----------+
171 | modelNames             | List of modelNames. These names will be checked for exact matches with AAI entities.          | list | False    |
172 +------------------------+-----------------------------------------------------------------------------------------------+------+----------+
173
174 **measurementGroup**
175
176 ``measurementGroup`` is used to specify the group of measurements that will be collected.
177
178 .. code-block:: json
179
180     "measurementGroup": {
181        "measurementGroupName":"msgroupname",
182        "administrativeState":"UNLOCKED",
183        "fileBasedGP":15,
184        "fileLocation":"/pm/pm.xml",
185        "measurementTypes": [
186          {
187            "measurementType": "EutranCell.*"
188          },
189          {
190            "measurementType": "EutranCellRelation.pmCounter1"
191          },
192          {
193            "measurementType": "EutranCellRelation.pmCounter2"
194          }
195        ],
196        "managedObjectDNsBasic": [
197          {
198            "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1"
199          },
200          {
201            "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2"
202          },
203          {
204            "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3"
205          }
206        ]
207     }
208
209 +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
210 | Field                 | Description                                                                                                                                                                            | Type | Required | Values |
211 +=======================+========================================================================================================================================================================================+======+==========+========+
212 | measurementGroupName  | Unique identifier for measurementGroup.                                                                                                                                                |      |          |        |
213 +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
214 | 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. |      |          |        |
215 +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
216 | fileBasedGP           | The frequency at which measurements are produced.                                                                                                                                      |      |          |        |
217 +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
218 | fileLocation          | Location of Report Output Period file.                                                                                                                                                 |      |          |        |
219 +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
220 | 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     |        |
221 +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
222 | managedObjectDNsBasic | List of managed object distinguished names.                                                                                                                                            | list | True     |        |
223 +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
224
225 .. _Topics:
226
227 MR Topics
228 """""""""
229
230 Subscriber:
231 ^^^^^^^^^^^
232
233 ::
234
235         AAI-EVENT
236
237 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
238 :ref:`Configuration<Configuration>`) it will be added to the relevant subscription.
239
240 ::
241
242         unauthenticated.PMSH_CL_INPUT
243
244 This topic enables the operational policy to provide feedback on the status of a subscription attempt, back to
245 PMSH, with a message of either success or failed.
246
247 Example of successful CREATE event sent from policy:
248
249 .. code-block:: json
250
251     {
252         "name": "ResponseEvent",
253         "nameSpace": "org.onap.policy.apex.onap.pmcontrol",
254         "source": "APEX",
255         "target": "DCAE",
256         "version": "0.0.1",
257         "status": {
258             "subscriptionName": "subscriptiona",
259             "measurementGroupName":"msgroupname",
260             "nfName": "PNF104",
261             "changeType": "CREATE",
262             "message": "success"
263         }
264     }
265
266
267 Publisher:
268 ^^^^^^^^^^
269
270 .. _DCAE_CL_OUTPUT_Topic:
271
272 ::
273
274         unauthenticated.DCAE_CL_OUTPUT
275
276 PMSH publishes subscriptions to this topic. They will be consumed by an operational policy which will make a request to CDS to
277 change the state of the subscription.
278
279 .. note::
280   Since release Istanbul of ONAP, PMSH Publish Subscriptions event format is updated.
281   A new attribute ``measurementGroupName`` is added as a unique identifier for ``measurementGroup`` and a single ``measurementGroup`` is associated with
282   PMSH Subscription event.
283
284 Example event sent from PMSH:
285
286 .. code-block:: json
287
288     {
289        "nfName":"PNF104",
290        "ipv4Address": "10.12.13.12",
291        "policyName":"operational-policy-name",
292        "closedLoopControlName":"controlLoop-name",
293        "blueprintName":"pm_control",
294        "blueprintVersion":"1.2.4",
295        "changeType":"CREATE",
296        "subscription":{
297           "administrativeState":"UNLOCKED",
298           "subscriptionName":"subscriptiona",
299           "fileBasedGP":15,
300           "fileLocation":"/pm/pm.xml",
301           "measurementGroup":{
302              "measurementGroupName":"msgroupname",
303              "measurementTypes":[
304                 {
305                    "measurementType":"countera"
306                 },
307                 {
308                    "measurementType":"counterb"
309                 }
310              ],
311              "managedObjectDNsBasic":[
312                 {
313                    "DN":"dna"
314                 },
315                 {
316                    "DN":"dnb"
317                 }
318              ]
319           }
320        }
321     }