From 03f38c6e5986cc2997e67d6b234902d8d25f2fcf Mon Sep 17 00:00:00 2001 From: shivasubedi Date: Tue, 16 Mar 2021 17:23:59 +0000 Subject: [PMSH] Update the data-format schema for events Issue-ID: DCAEGEN2-2533 Change-Id: Ie2cfa12faf66678749a071510b963eeb7bc5ee95 Signed-off-by: shivasubedi --- .../dpo/data-formats/dcae-cl-output.json | 146 +++++++++++++++ .../dpo/data-formats/pmsh-cl-input.json | 82 +++++++-- .../dpo/data-formats/pmsh-cl-output.json | 199 --------------------- 3 files changed, 218 insertions(+), 209 deletions(-) create mode 100755 components/pm-subscription-handler/dpo/data-formats/dcae-cl-output.json delete mode 100755 components/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json diff --git a/components/pm-subscription-handler/dpo/data-formats/dcae-cl-output.json b/components/pm-subscription-handler/dpo/data-formats/dcae-cl-output.json new file mode 100755 index 00000000..b5cfa8bf --- /dev/null +++ b/components/pm-subscription-handler/dpo/data-formats/dcae-cl-output.json @@ -0,0 +1,146 @@ +{ + "self": { + "name": "DCAE_CL_OUTPUT", + "version": "1.0.0", + "description": "The output format of PM Subscription CL event sent to Policy." + }, + "dataformatversion": "1.0.0", + "jsonSchema": { + "name": "PM Subscription CL event", + "version": "1.0.0", + "properties": { + "name": "PM Subscription CL event", + "version": "1.0.0", + "nfName": { + "type": "string", + "description": "The name of the nf in A&AI." + }, + "ipv4Address": { + "type": "string", + "description": "The ipv4address of the nf being targeted." + }, + "policyName": { + "type": "string", + "description": "The name of the Operational Policy driving the DCAE microservice." + }, + "closedLoopControlName": { + "type": "string", + "description": "This is the unique ID for the Control Loop. It is created by the CLAMP platform during Control Loop design." + }, + "blueprintName": { + "type": "string", + "description": "The name of the blueprint to be executed by CDS towards the nf." + }, + "blueprintVersion": { + "type": "string", + "description": "The version of the blueprint to be executed by CDS towards the nf." + }, + "changeType": { + "type": "string", + "description": "This is the change indicator that determines whether to apply/remove a PM subscription.", + "enum": [ + "CREATE", + "DELETE" + ] + }, + "subscription": { + "type": "object", + "description": "This is the PM subscription to be applied/removed to/from an xNF.", + "properties": { + "administrativeState": { + "type": "string", + "description": "The administrative state of the subscription object.", + "enum": [ + "UNLOCKED", + "LOCKED" + ] + }, + "subscriptionName": { + "type": "string", + "description": "The unique name of the subscription object." + }, + "fileBasedGP": { + "type": "integer", + "description": "The granularity period of measurement collection in minutes." + }, + "fileLocation": { + "type": "string", + "description": "The location of the PM measurements file on the nf." + }, + "measurementGroups": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "measurementGroup": { + "type": "object", + "properties": { + "measurementTypes": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "measurementType": { + "type": "string" + } + }, + "required": [ + "measurementType" + ] + } + ] + }, + "managedObjectDNsBasic": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "DN": { + "type": "string" + } + }, + "required": [ + "DN" + ] + } + ] + } + }, + "required": [ + "measurementTypes", + "managedObjectDNsBasic" + ] + } + }, + "required": [ + "measurementGroup" + ] + } + ] + } + }, + "required": [ + "subscriptionName", + "administrativeState", + "fileBasedGP", + "fileLocation", + "measurementGroups" + ] + } + }, + "required": [ + "nfName", + "ipv4Address", + "policyName", + "closedLoopControlName", + "blueprintName", + "blueprintVersion", + "changeType", + "subscription" + ] + } +} + diff --git a/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json b/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json index 9c1d252f..cda1a223 100755 --- a/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json +++ b/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-input.json @@ -1,11 +1,73 @@ -{ - "self": { - "name": "PMSH_CL_INPUT", - "version": "1.0.0", - "description": "Unstructured PMSH CL INPUT" - }, - "dataformatversion": "1.0.0", - "unstructured": { - "encoding": "UTF-8" - } +{ + "self": { + "name": "PMSH_CL_INPUT", + "version": "1.0.0", + "description": "The input format of PM Subscription CL event." + }, + "dataformatversion": "1.0.0", + "jsonSchema": { + "name": "PM Subscription CL input", + "version": "1.0.0", + "properties": { + "name": { + "type": "string" + }, + "nameSpace": { + "type": "string" + }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + }, + "version": { + "type": "string" + }, + "status": { + "type": "object", + "description": "The status response from the policy framework.", + "properties": { + "subscriptionName": { + "type": "string", + "description": "The unique name of the subscription object." + }, + "nfName": { + "type": "string", + "description": "The name of the nf in A&AI." + }, + "changeType": { + "type": "string", + "description": "This is the change type action that was undertaken to create/delete a PM subscription.", + "enum": [ + "CREATE", + "DELETE" + ] + }, + "message": { + "type": "string", + "description": "The return of the change type action status taken can be success or failure", + "enum": [ + "success", + "failure" + ] + } + }, + "required": [ + "subscriptionName", + "nfName", + "changeType", + "message" + ] + } + }, + "required": [ + "name", + "nameSpace", + "source", + "target", + "version", + "status" + ] + } } \ No newline at end of file diff --git a/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json b/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json deleted file mode 100755 index 503d6ca8..00000000 --- a/components/pm-subscription-handler/dpo/data-formats/pmsh-cl-output.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "self": { - "name": "DCAE_CL_OUTPUT", - "version": "1.0.0", - "description": "The output format of PM Subscription CL event to Policy" - }, - "dataformatversion": "1.0.0", - "jsonSchema": { - "name": "PM Subscription CL event", - "version": "1.0.0", - "properties": { - "version": { - "type": "string", - "enum": [ - "1.0.2" - ] - }, - "closedLoopControlName": { - "type": "string", - "description" : "This is the unique ID for the Control Loop. It is created by the CLAMP platform during Control Loop design" - }, - "requestID": { - "type": "string", - "description" : "For the control loop, when an instance of the Control Loop occurs, this unique ID must be created. The same ID must be forwarded for both the ONSET and the ABATED control loop messages" - }, - "closedLoopEventStatus": { - "type": "string", - "description" : "This is the status of the closedLoopControlName/requestID pair", - "enum": [ - "ONSET", - "ABATED" - ] - }, - "closedLoopAlarmStart": { - "type": "string", - "description" : "When the alarm was first detected" - }, - "closedLoopAlarmEnd" : { - "type" : "string", - "description" : "When the alarm was cleared. This field need only be present in the ABATED message" - }, - "policyVersion": { - "type": "string", - "description" : "The version of the Policy driving the DCAE Micro service. Should be a part of the configuration policy setup by CLAMP and passed by DCAE controller" - }, - "policyName": { - "type": "string", - "description" : "The name of the Operational Policy driving the DCAE micro service." - }, - "policyScope": { - "type": "string", - "description" : "The scope of the Policy driving the DCAE micro service. Should be a part of the configuration policy setup by CLAMP and passed by DCAE controller" - }, - "from": { - "type": "string", - "description" : "The ONAP platform component publishing this message", - "enum": [ - "DCAE" - ] - }, - "target_type": { - "type": "string", - "description" : "The type of the target: PNF or VNF", - "enum": [ - "VNF", - "PNF" - ] - }, - "target": { - "type": "string", - "description" : "This is the name of the field within the A&AI sub-tag that indicates the actual entity Node details. There should be a matching node field within the A&AI subtag holding this value", - "enum": [ - "generic-vnf.vnf-name", - "pnf.pnf-name" - ] - }, - "AAI": { - "description" : "Contains the A&AI Node-Attribute list", - "anyOf": [ - { - "generic-vnf.vnf-name": { - "type": "string" - } - }, - { - "pnf.pnf-name": { - "type": "string" - } - } - ] - }, - "changeType": { - "type": "string", - "description": "This is the change indicator that determines whether to apply/remove a PM subscription", - "enum": [ - "CREATE", - "DELETE" - ] - }, - "subscription": { - "type": "object", - "description": "This is the PM subscription to be applied/removed to/from an xNF", - "properties": { - "subscriptionName": { - "type": "string" - }, - "administrativeState": { - "type": "string", - "enum": [ - "UNLOCKED", - "LOCKED" - ] - }, - "fileBasedGP": { - "type": "integer" - }, - "fileLocation": { - "type": "string" - }, - "measurementGroups": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "measurementGroup": { - "type": "object", - "properties": { - "measurementTypes": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "measurementType": { - "type": "string" - } - }, - "required": [ - "measurementType" - ] - } - ] - }, - "managedObjectDNsBasic": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "DN": { - "type": "string" - } - }, - "required": [ - "DN" - ] - } - ] - } - }, - "required": [ - "measurementTypes", - "managedObjectDNsBasic" - ] - } - }, - "required": [ - "measurementGroup" - ] - } - ] - } - }, - "required": [ - "subscriptionName", - "administrativeState", - "fileBasedGP", - "fileLocation", - "measurementGroups" - ] - } - }, - "required": [ - "version", - "closedLoopControlName", - "requestID", - "closedLoopEventStatus", - "closedLoopAlarmStart", - "policyName", - "from", - "target_type", - "target", - "AAI", - "changeType", - "subscription" - ] - } -} \ No newline at end of file -- cgit 1.2.3-korg