From 9aa0b665b1d8ad6105ea783e176eacc58b26a804 Mon Sep 17 00:00:00 2001 From: shivasubedi Date: Mon, 18 Jan 2021 13:59:18 +0000 Subject: [PMSH] Validate schema of PMSH monitoring policy Change-Id: I42b002f855a03b39ab85cfcb20d7857d30447e40 Signed-off-by: shivasubedi Issue-ID: DCAEGEN2-2152 --- .../pmsh_service/mod/sub_schema.json | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 components/pm-subscription-handler/pmsh_service/mod/sub_schema.json (limited to 'components/pm-subscription-handler/pmsh_service/mod/sub_schema.json') diff --git a/components/pm-subscription-handler/pmsh_service/mod/sub_schema.json b/components/pm-subscription-handler/pmsh_service/mod/sub_schema.json new file mode 100644 index 00000000..7a1da5bb --- /dev/null +++ b/components/pm-subscription-handler/pmsh_service/mod/sub_schema.json @@ -0,0 +1,122 @@ +{ + "type":"object", + "properties":{ + "subscriptionName":{ + "type":"string" + }, + "administrativeState":{ + "allOf":[ + { + "type":"string" + }, + { + "enum":[ + "UNLOCKED", + "LOCKED" + ] + } + ] + }, + "fileBasedGP":{ + "type":"integer" + }, + "fileLocation":{ + "type":"string" + }, + "nfFilter":{ + "type":"object", + "properties":{ + "nfNames":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "modelInvariantIDs":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "modelVersionIDs":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "modelNames":{ + "type":"array", + "items":{ + "type":"string" + } + } + }, + "required":[ + "nfNames", + "modelInvariantIDs", + "modelVersionIDs", + "modelNames" + ] + }, + "measurementGroups":{ + "type":"array", + "minItems": 1, + "items":{ + "type":"object", + "properties":{ + "measurementGroup":{ + "type":"object", + "properties":{ + "measurementTypes":{ + "type":"array", + "minItems": 1, + "items":{ + "type":"object", + "properties":{ + "measurementType":{ + "type":"string" + } + }, + "required":[ + "measurementType" + ] + } + }, + "managedObjectDNsBasic":{ + "type":"array", + "minItems": 1, + "items":{ + "type":"object", + "properties":{ + "DN":{ + "type":"string" + } + }, + "required":[ + "DN" + ] + } + } + }, + "required":[ + "measurementTypes", + "managedObjectDNsBasic" + ] + } + }, + "required":[ + "measurementGroup" + ] + } + } + }, + "required":[ + "subscriptionName", + "administrativeState", + "fileBasedGP", + "fileLocation", + "nfFilter", + "measurementGroups" + ] + +} \ No newline at end of file -- cgit 1.2.3-korg