aboutsummaryrefslogtreecommitdiffstats
path: root/dpo
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2019-04-12 19:56:25 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2019-04-15 15:49:27 +0530
commit282711996763df7e081f3e41f42f8d475f14625c (patch)
treeba753b1bdd26999b973cb4c28ad300032c133fa6 /dpo
parent2896a24832902865313cd16081bba8b2d079748f (diff)
Implement DMaaP message handling from policy
Handling of dmaap response from policy implemented Blueprint updated for config policy fetch Fix sonar issues Change-Id: I7a8a54b5d62e5db94ea2bc2d28805d8f5680d579 Issue-ID: DCAEGEN2-1427 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Diffstat (limited to 'dpo')
-rw-r--r--dpo/blueprints/k8s-sonhms-inputs.yaml7
-rw-r--r--dpo/blueprints/k8s-sonhms.yaml30
-rw-r--r--dpo/data-formats/dmaap_son.json13
-rw-r--r--dpo/data-formats/oofToSonAsyncResp-dataformat.json192
-rw-r--r--dpo/data-formats/policyToSonDmaap-dataformat.json58
-rw-r--r--dpo/data-formats/sonToOofReq-dataformat.json237
-rw-r--r--dpo/spec/sonhandler-componentspec.json14
7 files changed, 359 insertions, 192 deletions
diff --git a/dpo/blueprints/k8s-sonhms-inputs.yaml b/dpo/blueprints/k8s-sonhms-inputs.yaml
index 052f0b9..e417c01 100644
--- a/dpo/blueprints/k8s-sonhms-inputs.yaml
+++ b/dpo/blueprints/k8s-sonhms-inputs.yaml
@@ -36,9 +36,10 @@ buffer_time: 60
cg: sonhms-cg
cid: sonhms-cid
config_db: http://sdnc.onap:8181
-oof: http://oof-osdf.onap:8080
+oof: http://oof-osdf.onap:8699
pci_optimizer: pci
log_path: /dockerdata-nfs/son-handler
+policy_id: com.Config_PCIMS_CONFIG_POLICY.1.xml
topic00_location: onap
topic00_client_role: son-subscriber
topic00_client_id: sdnr-son-1
@@ -55,3 +56,7 @@ topic03_location: onap
topic03_client_role: son-subscriber
topic03_client_id: sdnr-son-1
topic03_url: https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_OUTPUT
+topic04_location: onap
+topic04_client_role: son-subscriber
+topic04_client_id: sdnr-son-1
+topic04_url: https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP
diff --git a/dpo/blueprints/k8s-sonhms.yaml b/dpo/blueprints/k8s-sonhms.yaml
index 9d4e0db..d77f0fc 100644
--- a/dpo/blueprints/k8s-sonhms.yaml
+++ b/dpo/blueprints/k8s-sonhms.yaml
@@ -21,6 +21,7 @@ imports:
- "http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"
- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.5/k8splugin_types.yaml
- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/pgaas/1.1.0/pgaas_types.yaml
+ - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml
inputs:
replicas:
type: integer
@@ -77,7 +78,7 @@ inputs:
description: threshold for poor neighbors
default: 70
namespace:
- type: String
+ type: string
description: namespace
default: onap
dmaap:
@@ -110,22 +111,30 @@ inputs:
type: string
description: log location in host
default: /dockerdata-nfs/son-handler
+ policy_id:
+ type: string
+ description: policy id for config policy
topic00_location:
topic01_location:
topic02_location:
topic03_location:
+ topic04_location:
topic00_client_role:
topic01_client_role:
topic02_client_role:
topic03_client_role:
+ topic04_client_role:
topic00_client_id:
topic01_client_id:
topic02_client_id:
topic03_client_id:
+ topic04_client_id:
topic00_url:
topic01_url:
topic02_url:
topic03_url:
+ topic04_url:
+
node_templates:
pgaasvm:
@@ -191,6 +200,15 @@ node_templates:
client_id: { get_input: topic02_client_id }
topic_url: { get_input: topic02_url }
type: message-router
+ dcae_cl_response_topic:
+ aaf_username: { get_input: aaf_username }
+ aaf_password: { get_input: aaf_password }
+ dmaap_info:
+ location: { get_input: topic04_location }
+ client_role: { get_input: topic04_client_role }
+ client_id: { get_input: topic04_client_id }
+ topic_url: { get_input: topic04_url }
+ type: message-router
streams_publishes:
CL_topic:
aaf_username: { get_input: aaf_username }
@@ -234,7 +252,15 @@ node_templates:
relationships:
- type: cloudify.relationships.depends_on
target: pgaasvm
-
+ - type: cloudify.relationships.depends_on
+ target: son_policy
+
+ son_policy:
+ type: dcae.nodes.policy
+ properties:
+ policy_id:
+ get_input: policy_id
+
diff --git a/dpo/data-formats/dmaap_son.json b/dpo/data-formats/dmaap_son.json
index 7e4a950..af5fc83 100644
--- a/dpo/data-formats/dmaap_son.json
+++ b/dpo/data-formats/dmaap_son.json
@@ -42,5 +42,16 @@
"location": "onap",
"topic_url": "https://HOSTNAME:3905/events/DCAE_CL_OUTPUT"
}
- }
+ },
+ "CL_RSP_topic": {
+ "type": "message_router",
+ "aaf_username": "",
+ "aaf_password": "",
+ "dmaap_info": {
+ "client_role": "son-subscriber",
+ "client_id": "policy-son-1",
+ "location": "onap",
+ "topic_url": "https://HOSTNAME:3905/events/DCAE_CL_RSP"
+ }
+ }
}
diff --git a/dpo/data-formats/oofToSonAsyncResp-dataformat.json b/dpo/data-formats/oofToSonAsyncResp-dataformat.json
index bf99528..4eb8f5a 100644
--- a/dpo/data-formats/oofToSonAsyncResp-dataformat.json
+++ b/dpo/data-formats/oofToSonAsyncResp-dataformat.json
@@ -1,91 +1,105 @@
{
- "dataformatversion": "1.0.0",
- "jsonschema": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "additionalproperties": true,
- "description": "",
- "properties": {
- "requestId": {
- "description": "",
- "type": "string"
- },
- "requestStatus": {
- "description": "",
- "type": "string"
- },
- "solutions": {
- "description": "",
- "items": {
- "additionalproperties": true,
- "description": "",
- "properties": {
- "finishTime": {
- "description": "",
- "type": "string"
- },
- "networkId": {
- "description": "",
- "type": "string"
- },
- "pciSolutions": {
- "description": "",
- "items": {
- "additionalproperties": true,
- "description": "",
- "properties": {
- "cellId": {
- "description": "",
- "type": "string"
- },
- "pci": {
- "description": "",
- "type": "string"
- }
- },
- "required": [
- "cellId",
- "pci"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "startTime": {
- "description": "",
- "type": "string"
- }
- },
- "required": [
- "finishTime",
- "networkId",
- "pciSolutions",
- "startTime"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "statusMessage": {
- "description": "",
- "type": "string"
- },
- "transactionId": {
- "description": "",
- "type": "string"
- }
- },
- "required": [
- "requestId",
- "requestStatus",
- "solutions",
- "statusMessage",
- "transactionId"
- ],
- "type": "object"
- },
- "self": {
- "description": "",
- "name": "SON_OOF_ASYNC_RESP",
- "version": "1.0.0"
- }
+ "dataformatversion": "1.0.0",
+ "jsonschema": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "requestId": {
+ "description": "",
+ "type": "string"
+ },
+ "requestStatus": {
+ "description": "",
+ "type": "string"
+ },
+ "solutions": {
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "anrSolutions": {
+ "description": "",
+ "items": {
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "cellId": {
+ "description": "",
+ "type": "string"
+ },
+ "removeableNeighbors": {
+ "description": "",
+ "items": {
+ "description": "",
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "cellId",
+ "removeableNeighbors"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "networkId": {
+ "description": "",
+ "type": "string"
+ },
+ "pciSolutions": {
+ "description": "",
+ "items": {
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "cellId": {
+ "description": "",
+ "type": "string"
+ },
+ "pci": {
+ "description": "",
+ "type": "string"
+ }
+ },
+ "required": [
+ "cellId",
+ "pci"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "anrSolutions",
+ "networkId",
+ "pciSolutions"
+ ],
+ "type": "object"
+ },
+ "statusMessage": {
+ "description": "",
+ "type": "string"
+ },
+ "transactionId": {
+ "description": "",
+ "type": "string"
+ }
+ },
+ "required": [
+ "requestId",
+ "requestStatus",
+ "solutions",
+ "statusMessage",
+ "transactionId"
+ ],
+ "type": "object"
+ },
+ "self": {
+ "description": "",
+ "name": "SON_OOF_ASYNC_RESP",
+ "version": "1.0.0"
+ }
}
diff --git a/dpo/data-formats/policyToSonDmaap-dataformat.json b/dpo/data-formats/policyToSonDmaap-dataformat.json
new file mode 100644
index 0000000..28588a1
--- /dev/null
+++ b/dpo/data-formats/policyToSonDmaap-dataformat.json
@@ -0,0 +1,58 @@
+{
+ "dataformatversion": "1.0.0",
+ "jsonschema": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "closedLoopControlName": {
+ "description": "",
+ "type": "string"
+ },
+ "from": {
+ "description": "",
+ "type": "string"
+ },
+ "payload": {
+ "description": "",
+ "type": "string"
+ },
+ "policyName": {
+ "description": "",
+ "type": "string"
+ },
+ "policyVersion": {
+ "description": "",
+ "type": "string"
+ },
+ "requestID": {
+ "description": "",
+ "type": "string"
+ },
+ "target": {
+ "description": "",
+ "type": "string"
+ },
+ "version": {
+ "description": "",
+ "type": "string"
+ }
+ },
+ "required": [
+ "closedLoopControlName",
+ "from",
+ "payload",
+ "policyName",
+ "policyVersion",
+ "requestID",
+ "target",
+ "version"
+ ],
+ "type": "object"
+ },
+ "self": {
+ "description": "",
+ "name": "POLICY_TO_SON_DMAAP",
+ "version": "1.0.0"
+ }
+}
diff --git a/dpo/data-formats/sonToOofReq-dataformat.json b/dpo/data-formats/sonToOofReq-dataformat.json
index e686dd1..d91edae 100644
--- a/dpo/data-formats/sonToOofReq-dataformat.json
+++ b/dpo/data-formats/sonToOofReq-dataformat.json
@@ -1,97 +1,144 @@
{
- "dataformatversion": "1.0.0",
- "jsonschema": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "additionalproperties": true,
- "description": "",
- "properties": {
- "cellInfo": {
- "additionalproperties": true,
- "description": "",
- "properties": {
- "cellIdList": {
- "description": "",
- "items": {
- "description": "",
- "type": "string"
- },
- "type": "array"
- },
- "networkId": {
- "description": "",
- "type": "string"
- }
- },
- "required": [
- "cellIdList",
- "networkId"
- ],
- "type": "object"
- },
- "requestInfo": {
- "additionalproperties": true,
- "description": "",
- "properties": {
- "callbackUrl": {
- "description": "",
- "type": "string"
- },
- "numSolutions": {
- "description": "",
- "type": "integer"
- },
- "optimizers": {
- "description": "",
- "items": {
- "description": "",
- "type": "string"
- },
- "type": "array"
- },
- "requestId": {
- "description": "",
- "type": "string"
- },
- "requestType": {
- "description": "",
- "type": "string"
- },
- "sourceId": {
- "description": "",
- "type": "string"
- },
- "timeout": {
- "description": "",
- "type": "integer"
- },
- "transactionId": {
- "description": "",
- "type": "string"
- }
- },
- "required": [
- "callbackUrl",
- "numSolutions",
- "optimizers",
- "requestId",
- "requestType",
- "sourceId",
- "timeout",
- "transactionId"
- ],
- "type": "object"
- }
- },
- "required": [
- "cellInfo",
- "requestInfo"
- ],
- "type": "object"
- },
- "self": {
- "description": "",
- "name": "SON_TO_OOF_REST_REQ",
- "version": "1.0.0"
- }
+ "dataformatversion": "1.0.0",
+ "jsonschema": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "cellInfo": {
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "anrInputList": {
+ "description": "",
+ "items": {
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "cellId": {
+ "description": "",
+ "type": "string"
+ },
+ "removeableNeighbors": {
+ "description": "",
+ "items": {
+ "description": "",
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "cellId",
+ "removeableNeighbors"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "cellIdList": {
+ "description": "",
+ "items": {
+ "description": "",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "networkId": {
+ "description": "",
+ "type": "integer"
+ },
+ "trigger": {
+ "description": "",
+ "type": "string"
+ }
+ },
+ "required": [
+ "anrInputList",
+ "cellIdList",
+ "networkId",
+ "trigger"
+ ],
+ "type": "object"
+ },
+ "requestInfo": {
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "callbackHeader": {
+ "additionalproperties": true,
+ "description": "",
+ "properties": {
+ "blob": {
+ "description": "",
+ "type": "string"
+ }
+ },
+ "required": [
+ "blob"
+ ],
+ "type": "object"
+ },
+ "callbackUrl": {
+ "description": "",
+ "type": "string"
+ },
+ "numSolutions": {
+ "description": "",
+ "type": "integer"
+ },
+ "optimizers": {
+ "description": "",
+ "items": {
+ "description": "",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "requestId": {
+ "description": "",
+ "type": "string"
+ },
+ "requestType": {
+ "description": "",
+ "type": "string"
+ },
+ "sourceId": {
+ "description": "",
+ "type": "string"
+ },
+ "timeout": {
+ "description": "",
+ "type": "integer"
+ },
+ "transactionId": {
+ "description": "",
+ "type": "string"
+ }
+ },
+ "required": [
+ "callbackHeader",
+ "callbackUrl",
+ "numSolutions",
+ "optimizers",
+ "requestId",
+ "requestType",
+ "sourceId",
+ "timeout",
+ "transactionId"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "cellInfo",
+ "requestInfo"
+ ],
+ "type": "object"
+ },
+ "self": {
+ "description": "",
+ "name": "SON_TO_OOF_REST_REQ",
+ "version": "1.0.0"
+ }
}
-
diff --git a/dpo/spec/sonhandler-componentspec.json b/dpo/spec/sonhandler-componentspec.json
index 6fc51be..2d23fb8 100644
--- a/dpo/spec/sonhandler-componentspec.json
+++ b/dpo/spec/sonhandler-componentspec.json
@@ -30,7 +30,13 @@
"version": "1.0.0",
"route": "/callbackUrl",
"type": "http"
- }
+ },
+ {
+ "format": "POLICY_TO_SON_DMAAP",
+ "version": "1.0.0",
+ "config_key": "CL_RSP_topic",
+ "type": "message router"
+ }
],
"publishes": [
{
@@ -267,9 +273,9 @@
"designer_editable": false
},
{
- "name": "sonhandler.callbackUrl",
- "value": "http://sonhms.onap:8080/callbackUrl",
- "description": "sonhms callback url",
+ "name": "sonhandler.namespace",
+ "value": "onap",
+ "description": "namespace where MS will be deployed",
"sourced_at_deployment": false,
"policy_editable": false,
"designer_editable": false