Add PMSH documentation
[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 CLAMP.
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 CLAMP 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 |
21 +------------------+--------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------+
22 | replicas         | Number of instances.                                                     | integer | True     | 1                                                                             |
23 +------------------+--------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------+
24 | subscriber_topic | The topic that PMSH will subscribe to.                                   | string  | True     | AAI-EVENT                                                                     |
25 +------------------+--------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------+
26 | publisher_topic  | The topic that PMSH will publish to, and which policy will subscribe to. | string  | True     | org.onap.dmaap.mr.PM_SUBSCRIPTIONS                                            |
27 +------------------+--------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------+
28 | client_role      | Client role to request secure access to topic.                           | string  | True     |                                                                               |
29 +------------------+--------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------+
30 | client_id        | Client id for given AAF client.                                          | string  | True     | dcae@dcae.onap.org                                                            |
31 +------------------+--------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------+
32 | client_password  | Password for AAF client provided as client_id.                           | string  | True     |                                                                               |
33 +------------------+--------------------------------------------------------------------------+---------+----------+-------------------------------------------------------------------------------+
34
35 Subscription configuraton
36 """""""""""""""""""""""""
37
38 The subscription is configured within the monitoring policy in CLAMP. The subscription model schema is as follows:
39
40 **subscription**
41
42 ::
43
44          {
45            "subscription": {
46              "subscriptionName": "someExtraPM-AllKista-gNB-R2B",
47              "administrativeState": "UNLOCKED",
48              "fileBasedGP": 15,
49              "fileLocation": "/pm/pm.xml",
50              "nfTypeModelInvariantId": "2829292",
51              "nfFilter": {
52                "swVersions": [
53                  "1.0.0",
54                  "1.0.1"
55                ],
56                "nfNames": [
57                  "ABC",
58                  "DEF",
59                  "foo.*"
60                ]
61              },
62              "measurementGroup": {
63                "measurementTypes": [
64                  {
65                    "measurementType": "EutranCell.*"
66                  },
67                  {
68                    "measurementType": "EutranCellRelation.pmCounter1"
69                  },
70                  {
71                    "measurementType": "EutranCellRelation.pmCounter2"
72                  }
73                ],
74                "managedObjectDNsBasic": [
75                  {
76                    "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1"
77                  },
78                  {
79                    "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2"
80                  },
81                  {
82                    "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3"
83                  }
84                ]
85              }
86            }
87          }
88
89 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
90 | Field                  | Description                                                                                                                                                                | Type | Required | Values |
91 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
92 | subscriptionName       | Name of the subscription                                                                                                                                                   |      |          |        |
93 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
94 | administrativeState    | Setting a subscription to UNLOCKED will apply the subscription to the NF instances immediately. If it is set to LOCKED, it will not be applied until it is later unlocked. |      |          |        |
95 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
96 | fileBasedGP            | The frequency at which measurements are produced.                                                                                                                          |      |          |        |
97 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
98 | fileLocation           | Location of Report Output Period file.                                                                                                                                     |      |          |        |
99 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
100 | nfTypeModelInvariantId | The invariant ID will be used to filter nf's if a list of nf names is not provided, or if regex is used to specify all nf's of a specific type.                            |      |          |        |
101 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
102 | nfFilter               | The network function filter will be used to filter the list of nf's stored in A&AI to produce a subset.                                                                    |      |          |        |
103 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
104 | measurementGroup       | List of measurement types and managed object distinguished names                                                                                                           |      |          |        |
105 +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+--------+
106
107 **nfFilter**
108
109 The ``nfFilter`` will be used in order to filter the list of NF's retrieved from A&AI. It will filter on the names
110 specified in the ``nfNames`` field, which can also contain regex as seen below.
111
112 ::
113
114         "nfFilter": {
115             "swVersions": [
116                 "1.0.0",
117                 "1.0.1"
118             ],
119             "nfNames": [
120                 "ABC",
121                 "DEF",
122                 "foo.*"
123             ]
124         }
125
126 +------------+-----------------------------------------------------------------------------+------+----------+
127 | Field      | Description                                                                 | Type | Required |
128 +============+=============================================================================+======+==========+
129 | swVersions | List of software versions                                                   | list | True     |
130 +------------+-----------------------------------------------------------------------------+------+----------+
131 | nfNames    | List of NF names. These names are regexes, which will be parsed by the PMSH | list | True     |
132 +------------+-----------------------------------------------------------------------------+------+----------+
133
134 **measurementGroup**
135
136 ``measurementGroup`` is used to specify the group of measurements that will be collected.
137
138 ::
139
140          "measurementGroup": {
141            "measurementTypes": [
142              {
143                "measurementType": "EutranCell.*"
144              },
145              {
146                "measurementType": "EutranCellRelation.pmCounter1"
147              },
148              {
149                "measurementType": "EutranCellRelation.pmCounter2"
150              }
151            ],
152            "managedObjectDNsBasic": [
153              {
154                "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1"
155              },
156              {
157                "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter2"
158              },
159              {
160                "DN": "ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1, EUtranCellRelation=CityCenter3"
161              }
162            ]
163          }
164
165 +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+
166 | Field                 | Description                                                                                                                                       | Type | Required |
167 +=======================+===================================================================================================================================================+======+==========+
168 | 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     |
169 +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+
170 | managedObjectDNsBasic | List of managed object distinguished names.                                                                                                       | list | True     |
171 +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------+----------+
172
173 .. _Topics:
174
175 MR Topics
176 """""""""""""""""""""
177
178 Subscriber:
179 ^^^^^^^^^^^
180
181 ::
182
183         AAI-EVENT
184
185 This topic is used so that the PMSH can listen for new NFs getting registered. If the NF matches the NF filter (See
186 :ref:`Configuration<Configuration>`) it will be added to the relevant subscription. This topic is **AAI_EVENT**.
187
188 ::
189
190         org.onap.dmaap.mr.PM_SUBSCRIPTION_EVENTS
191
192 This topic is used for locking and unlocking events. i.e if a user has previously created a locked
193 subscription, they can publish an event to this topic to unlock it, or vice versa.
194
195 Publisher:
196 ^^^^^^^^^^
197
198 ::
199
200         org.onap.dmaap.mr.PM_SUBSCRIPTIONS
201
202 The PMSH publishes subscriptions to this topic. They will be consumed by a policy which will make a request to CDS to
203 unlock the subscription.