aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INFO.yaml8
-rw-r--r--doc/dosc_A1_PE_PoC.rst113
-rw-r--r--doc/files/A1-PE-CLOSED-LOOP.postman_collection.json474
3 files changed, 571 insertions, 24 deletions
diff --git a/INFO.yaml b/INFO.yaml
index 458b0fa..e836442 100644
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -109,11 +109,6 @@ committers:
company: 'T-Mobile'
id: 'elihalych'
timezone: 'Europe/Warsaw'
- - name: 'Bartosz Gardziejewski'
- email: 'bartosz.gardziejewski@nokia.com'
- company: 'Nokia'
- id: 'BartoszG'
- timezone: 'Europe/Warsaw'
- name: 'Alexander Mazuruk'
email: 'a.mazuruk@samsung.com'
company: 'Samsung'
@@ -135,3 +130,6 @@ tsc:
- type: 'Deletion'
name: 'Marcin Przybysz'
link: 'https://lists.onap.org/g/onap-tsc/message/7893'
+ - type: 'Deletion'
+ name: 'Bartosz Gardziejewski'
+ link: 'https://lists.onap.org/g/onap-tsc/message/8286'
diff --git a/doc/dosc_A1_PE_PoC.rst b/doc/dosc_A1_PE_PoC.rst
index 4d4ff3b..1875a53 100644
--- a/doc/dosc_A1_PE_PoC.rst
+++ b/doc/dosc_A1_PE_PoC.rst
@@ -111,6 +111,16 @@ Following steps are needed to setup Postman:
.. note:: The port number 30499 is used in included Postman collection
+::
+
+ kubectl edit -n onap svc consul-server-ui
+ - .spec.type: ClusterIP
+ + .spec.type: NodePort
+ + .spec.ports[0].nodePort: 32749
+
+.. note:: The port number 32749 is used in included Postman collection
+
+
**Postman variables:**
Most of the Postman variables are automated by Postman scripts and environment file provided, but there are few mandatory variables that need to be setup by user.
@@ -194,7 +204,24 @@ Like before, following steps are needed to setup Postman:
CNF post-instantiation steps
++++++++++++++++++++++++++++
-1. Register CNF as a RIC in onap-a1policymanagement
+**Register CNF as a RIC in onap-a1policymanagement**
+
+ONAP Policy Management Service support two ways of updating configuration.
+
+Updating configuration is needed to provide information about the new RIC which was deployed.
+
+In our case we must provide information about the new A1 Policy Enforcement Simulator that was deployed by ONAP.
+PMS will be used this information to periodically check the healthiness of this Simulator
+and be able to create new A1 Policy Instances into A1 Policy Enforcement by using A1-P OSC_2.1.0 API.
+
+1. REST request to update PMS configuration (PREFERRED)
+
+::
+
+ [CONFIGURE-STEP 0] Register A1 PE SIM as a Near-RT RIC
+ [TEST] Check if A1 PE SIM register in ONAP-PMS
+
+2. Register CNF as a RIC in onap-a1policymanagement
::
@@ -285,6 +312,90 @@ Output
dep-rapp-sleepingcelldetector-589647c4c5-rbrw9 1/1 Running 0 4m
+3. Deploy/Configure Datafile collector and PM mapper
+
+Deploy Datafile collector and PM mapper MS by using the DCAE Dashboard or Cloudify command line.
+
+- Datafile collector deployment: https://wiki.onap.org/pages/viewpage.action?pageId=60891239#DataFileCollector(5GUsecase)-DeploymentSteps
+- PMMapper deployment: https://wiki.onap.org/pages/viewpage.action?pageId=60891174#PMMapper(5GUsecase)-DeploymentSteps
+
+Next you can execute the postman collection to check that the proper consul entry exits:
+
+::
+ [TEST] Check CONSUL PM Mapper key entry
+
+Next, update datafile configuration with feed information (where this MS should publishing uploaded files).
+
+::
+
+ Postman -> A1-PE-CLOSED-LOOP -> [CONFIGURE-STEP 1] Check datafile CONSUL key value
+ Postman -> A1-PE-CLOSED-LOOP -> [CONFIGURE-STEP 2] Update feed DATAFILE-COLLECTOR configuration
+
+Also updated publisher's ID and password to feed 1 of Data Router:
+
+::
+
+ Postman -> A1-PE-CLOSED-LOOP -> [CONFIGURE-STEP 3] Updated publisher's DMaaP feed
+
+Without this update we have Error 403 - FORBIDDEN when trying to upload file to DR.
+Subscribe PM Mapper to Data Router to receive published files:
+
+::
+
+ Postman -> A1-PE-CLOSED-LOOP -> [CONFIGURE-STEP 4] Subscribe PM Mapper to DMaaP feed
+
+Response will return subscription ID, 8 in that example:
+
+::
+
+ {
+ "suspend":false,
+ "delivery":{
+ "use100":true,
+ "password":"demo123456!",
+ "user":"dcae@dcae.onap.org",
+ "url":"https://dcae-pm-mapper:8443/delivery"
+ },
+ "subscriber":"dcaecm",
+ "groupid":29,
+ "metadataOnly":false,
+ "privilegedSubscriber":false,
+ "follow_redirect":false,
+ "decompress":true,
+ "aaf_instance":"legacy",
+ "links":{
+ "feed":"https://dmaap-dr-prov/feed/1",
+ "log":"https://dmaap-dr-prov/sublog/8",
+ "self":"https://dmaap-dr-prov/subs/8"
+ },
+ "created_date":1634290495896,
+ "decompress": true
+ }
+
+
+This ID will be use to update the PM Mapper configuration:
+
+::
+
+ [CONFIGURE-STEP 5] Update feed PM Mapper configuration
+ [TEST] Check PM Mapper CONSUL configuration
+
+
+4. Update AAF permission
+
+Before updating AAF permission the PMMapper microservice must be deploy, because during this process
+:topic.org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS permission instance will be created.
+
+Next go to AAF webconsole under https://aaf.api.simpledemo.onap.org:30251/gui/cui and login as a dcae@dcae.onap.org with password demo123456!.
+Execute below command:
+
+::
+
+ perm grant org.onap.dmaap.mr.topic :topic.org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS sub org.onap.dcae.pmPublisher
+
+To add sub action to org.onap.dcae.pmPublisher role that dcae@dcae.onap.org user can use to read information from
+*PERFORMANCE_MEASUREMENTS* topic.
+
Executing the A1 PE Closed-loop
+++++++++++++++++++++++++++++++
diff --git a/doc/files/A1-PE-CLOSED-LOOP.postman_collection.json b/doc/files/A1-PE-CLOSED-LOOP.postman_collection.json
index bb686d7..6fe7a94 100644
--- a/doc/files/A1-PE-CLOSED-LOOP.postman_collection.json
+++ b/doc/files/A1-PE-CLOSED-LOOP.postman_collection.json
@@ -6,6 +6,460 @@
},
"item": [
{
+ "name": "[CONFIGURE-STEP 0] Register A1 PE SIM as a Near-RT RIC",
+ "request": {
+ "method": "PUT",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"config\": {\r\n \"controller\": [\r\n {\r\n \"name\": \"controller1\",\r\n \"baseUrl\": \"https://sdnc.onap:8443\",\r\n \"userName\": \"admin\",\r\n \"password\": \"Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U\"\r\n }\r\n ],\r\n \"ric\": [\r\n {\r\n \"name\": \"ric1\",\r\n \"baseUrl\": \"http://{{k8s}}:32766/v1\",\r\n \"controller\": \"controller1\",\r\n \"managedElementIds\": []\r\n }\r\n ],\r\n \"streams_publishes\": {\r\n \"dmaap_publisher\": {\r\n \"type\": \"message_router\",\r\n \"dmaap_info\": {\r\n \"topic_url\": \"http://message-router:3904/events/A1-POLICY-AGENT-WRITE\"\r\n }\r\n }\r\n },\r\n \"streams_subscribes\": {\r\n \"dmaap_subscriber\": {\r\n \"type\": \"message_router\",\r\n \"dmaap_info\": {\r\n \"topic_url\": \"http://message-router:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100\"\r\n }\r\n }\r\n }\r\n }\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "https://{{k8s}}:30294/a1-policy/v2/configuration",
+ "protocol": "https",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "30294",
+ "path": [
+ "a1-policy",
+ "v2",
+ "configuration"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[TEST] Check if A1 PE SIM register in ONAP-PMS",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "a1_pe_sim__ric_name = \"ric1\"\r",
+ "a1_pe_sim__node_port = \"32766\"\r",
+ "\r",
+ "register_rics = pm.response.json()[\"config\"][\"ric\"]\r",
+ "\r",
+ "pm.test(\"Check if A1 PE SIM register in ONAP-PMS\", function () {\r",
+ " for (ric of register_rics) {\r",
+ " pm.expect(ric.name).not.to.be.null;\r",
+ " pm.expect(ric.controller).not.to.be.null;\r",
+ "\r",
+ " if (ric[\"name\"] === a1_pe_sim__ric_name) {\r",
+ " if (ric[\"baseUrl\"].includes(`:${a1_pe_sim__node_port}/v1`)) {\r",
+ " pm.expect(true).to.eql(true);\r",
+ " return;\r",
+ " }\r",
+ "\r",
+ " pm.expect(true).to.eql(false);\r",
+ " }\r",
+ " }\r",
+ " \r",
+ " pm.expect(true).to.eql(false)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://{{k8s}}:30294/a1-policy/v2/configuration",
+ "protocol": "https",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "30294",
+ "path": [
+ "a1-policy",
+ "v2",
+ "configuration"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[TEST] Check CONSUL PM Mapper key entry",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "consul_pm_mapper_key__constants_str = \"dcae-pm-mapper:dmaap\"\r",
+ "\r",
+ "pm.test(\"Check CONSUL PM Mapper key entry (PM Mapper is deploy?)\", function () {\r",
+ " exist = false\r",
+ " pm.response.json().forEach((key) => {\r",
+ " if (key === consul_pm_mapper_key__constants_str) {\r",
+ " exist = true\r",
+ " return\r",
+ " }\r",
+ " }\r",
+ " )\r",
+ " \r",
+ " pm.expect(exist).to.eql(true)\r",
+ "})"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "http://{{k8s}}:32749/v1/kv/?keys",
+ "protocol": "http",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "32749",
+ "path": [
+ "v1",
+ "kv",
+ ""
+ ],
+ "query": [
+ {
+ "key": "keys",
+ "value": null
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[CONFIGURE-STEP 1] Check datafile CONSUL key value",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "consul_datafile_dmaap_key__constants_str = \"datafile-collector:dmaap\"\r",
+ "\r",
+ "pm.response.json().forEach((key) => {\r",
+ " if (key.includes(consul_datafile_dmaap_key__constants_str)) {\r",
+ " pm.environment.set(\"consul-datafile-dmaap-key\", key);\r",
+ " }\r",
+ " }\r",
+ ")"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "http://{{k8s}}:32749/v1/kv/?keys",
+ "protocol": "http",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "32749",
+ "path": [
+ "v1",
+ "kv",
+ ""
+ ],
+ "query": [
+ {
+ "key": "keys",
+ "value": null
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[CONFIGURE-STEP 2] Update feed DATAFILE-COLLECTOR configuration",
+ "request": {
+ "method": "PUT",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"feed0\":{\r\n \"publisher_id\":\"4.307w\",\r\n \"location\":\"loc00\",\r\n \"publish_url\":\"https://dmaap-dr-prov/publish/1\",\r\n \"log_url\":\"https://dmaap-dr-prov/feedlog/1\",\r\n \"username\":\"dcaecm\",\r\n \"password\":\"dcaecm\"\r\n }\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "http://{{k8s}}:32749/v1/kv/{{consul-datafile-dmaap-key}}",
+ "protocol": "http",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "32749",
+ "path": [
+ "v1",
+ "kv",
+ "{{consul-datafile-dmaap-key}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[CONFIGURE-STEP 3] Updated publisher's DMaaP feed",
+ "protocolProfileBehavior": {
+ "disabledSystemHeaders": {
+ "content-type": true
+ }
+ },
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "X-DMAAP-DR-ON-BEHALF-OF",
+ "value": "dcaecm",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/vnd.dmaap-dr.feed",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"name\": \"bulk_pm_feed\",\r\n \"groupid\":0,\r\n \"description\":\"Updated config\",\r\n \"authorization\":{\r\n \"endpoint_addrs\":[\r\n ],\r\n \"classification\":\"unclassified\",\r\n \"endpoint_ids\":[\r\n {\r\n \"password\":\"dcaecm\",\r\n \"id\":\"dcaecm\"\r\n }\r\n ]\r\n }\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "https://{{k8s}}:30269/feed/1",
+ "protocol": "https",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "30269",
+ "path": [
+ "feed",
+ "1"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[CONFIGURE-STEP 4] Subscribe PM Mapper to DMaaP feed",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "\r",
+ "self = pm.response.json()[\"links\"][\"self\"].split('/')\r",
+ "pm.environment.set(\"feed_subscription_id\", self[self.length - 1])"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "protocolProfileBehavior": {
+ "disabledSystemHeaders": {
+ "content-type": true
+ }
+ },
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "X-DMAAP-DR-ON-BEHALF-OF",
+ "value": "dcaecm",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/vnd.dmaap-dr.subscription",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"delivery\":{\r\n \"url\":\"https://dcae-pm-mapper:8443/delivery\",\r\n \"user\":\"dcae@dcae.onap.org\",\r\n \"password\":\"demo123456!\",\r\n \"use100\":true\r\n },\r\n \"metadataOnly\":false,\r\n \"suspend\":false,\r\n \"groupid\":29,\r\n \"subscriber\":\"dradmin\",\r\n \"decompress\": true\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "https://{{k8s}}:30269/subscribe/1",
+ "protocol": "https",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "30269",
+ "path": [
+ "subscribe",
+ "1"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[CONFIGURE-STEP 5] Update feed PM Mapper configuration",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ ""
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "protocolProfileBehavior": {
+ "disabledSystemHeaders": {
+ "content-type": true
+ }
+ },
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "X-DMAAP-DR-ON-BEHALF-OF",
+ "value": "dcaecm",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/vnd.dmaap-dr.subscription",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"pm-feed\":{\r\n \"subscriber_id\":\"{{feed_subscription_id}}\",\r\n \"location\":\"san-francisco\",\r\n \"delivery_url\":\"https://dcae-pm-mapper:8443/delivery\",\r\n \"username\":\"dcae@dcae.onap.org\",\r\n \"password\":\"demo123456!\",\r\n \"decompress\":true,\r\n \"privilegedSubscriber\":true\r\n },\r\n \"pm-topic\":{\r\n \"topic_url\":\"http://message-router:3904/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS\",\r\n \"client_id\":\"1635166161294\",\r\n \"location\":\"san-francisco\",\r\n \"client_role\":\"org.onap.dcae.pmPublisher\"\r\n }\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "http://{{k8s}}:32749/v1/kv/dcae-pm-mapper:dmaap",
+ "protocol": "http",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "32749",
+ "path": [
+ "v1",
+ "kv",
+ "dcae-pm-mapper:dmaap"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[TEST] Check PM Mapper CONSUL configuration",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm_mapper_consul = JSON.parse(atob(pm.response.json()[0][\"Value\"]));\r",
+ "\r",
+ "pm.test(\"Check PM Mapper CONSUL configuration\", function () {\r",
+ " feed_subscription_id__set = pm.environment.get(\"feed_subscription_id\")\r",
+ " feed_subscription_id__consul = pm_mapper_consul[\"pm-feed\"][\"subscriber_id\"]\r",
+ " pm.expect(feed_subscription_id__consul).to.eql(feed_subscription_id__set)\r",
+ "})"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "protocolProfileBehavior": {
+ "disableBodyPruning": true,
+ "disabledSystemHeaders": {
+ "content-type": true
+ }
+ },
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "X-DMAAP-DR-ON-BEHALF-OF",
+ "value": "dcaecm",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/vnd.dmaap-dr.subscription",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "http://{{k8s}}:32749/v1/kv/dcae-pm-mapper:dmaap",
+ "protocol": "http",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "32749",
+ "path": [
+ "v1",
+ "kv",
+ "dcae-pm-mapper:dmaap"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "[CLEANUP] Delete topic - fix redeployment datafile collector issue",
+ "request": {
+ "method": "DELETE",
+ "header": [],
+ "url": {
+ "raw": "https://{{k8s}}:30242/webapi/topics/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS",
+ "protocol": "https",
+ "host": [
+ "{{k8s}}"
+ ],
+ "port": "30242",
+ "path": [
+ "webapi",
+ "topics",
+ "org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
"name": "[TEST] Get cells",
"request": {
"method": "GET",
@@ -174,7 +628,7 @@
"method": "GET",
"header": [],
"url": {
- "raw": "http://{{k8s}}:30980/v1/pm/events/aggregatedmetrics/?slot=10&count=5&startTime=2021-06-22T16:35:00%2B01:00",
+ "raw": "http://{{k8s}}:30980/v1/pm/ues",
"protocol": "http",
"host": [
"{{k8s}}"
@@ -183,23 +637,7 @@
"path": [
"v1",
"pm",
- "events",
- "aggregatedmetrics",
- ""
- ],
- "query": [
- {
- "key": "slot",
- "value": "10"
- },
- {
- "key": "count",
- "value": "5"
- },
- {
- "key": "startTime",
- "value": "2021-06-22T16:35:00%2B01:00"
- }
+ "ues"
]
}
},