PM_Dictionary Support in GAB 05/102005/3
authorTomasz Golabek <tomasz.golabek@nokia.com>
Wed, 19 Feb 2020 15:46:44 +0000 (16:46 +0100)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Mon, 24 Feb 2020 15:22:57 +0000 (15:22 +0000)
Generic Artifact Browser is visible for PM_DICTIONARY artifacts
Two agreed formats of the artifact are supported (examples in tests)
Small fix for searchable fields and introduced new once for PM_DICTIONARY:
measType
measDescription
measObjClass
measFamily
measInfoId

Change-Id: I2cb609bab6405b55e8099da023ae035205dcd1ab
Issue-ID: SDC-2095
Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
catalog-be/src/main/resources/config/configuration.yaml
catalog-ui/src/app/models/artifacts.ts
catalog-ui/src/app/utils/constants.ts
common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/test/java/org/onap/sdc/gab/yaml/GABYamlParserTest.java
common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/test/resources/yaml/pmDictionary.yml [new file with mode: 0644]
common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/test/resources/yaml/pmDictionaryInJson.yml [new file with mode: 0644]

index 1acae32..932d612 100644 (file)
@@ -753,15 +753,53 @@ gabConfig:
       -
         friendlyName: "Action"
         path: "event.action[2]"
-        searchable: "true"
+        searchable: true
       -
         friendlyName: "Comment"
         path: "event.comment"
-        searchable: "true"
+        searchable: true
       -
         friendlyName: "Alarm Additional Information"
         path: "event.structure.faultFields.structure.alarmAdditionalInformation.comment"
-        searchable: "true"
+        searchable: true
+  - artifactType: 'PM_DICTIONARY'
+    pathsAndNamesDefinitions:
+      -
+        friendlyName: "measType"
+        path: "pmMetaData.pmFields.measType"
+        searchable: true
+      -
+        friendlyName: "measDescription"
+        path: "pmMetaData.pmFields.measDescription"
+        searchable: true
+      -
+        friendlyName: "measCondition"
+        path: "pmMetaData.pmFields.measCondition"
+        searchable: false
+      -
+        friendlyName: "measResultUnits"
+        path: "pmMetaData.pmFields.measResultUnits"
+        searchable: false
+      -
+        friendlyName: "measResultRange"
+        path: "pmMetaData.pmFields.measResultRange"
+        searchable: false
+      -
+        friendlyName: "measObjClass"
+        path: "pmMetaData.pmFields.measObjClass"
+        searchable: true
+      -
+        friendlyName: "measCollectionMethod"
+        path: "pmMetaData.pmFields.measCollectionMethod"
+        searchable: false
+      -
+        friendlyName: "measInfoId"
+        path: "pmMetaData.pmFields.measInfoId"
+        searchable: true
+      -
+        friendlyName: "iMeasInfoId"
+        path: "pmMetaData.pmFields.iMeasInfoId"
+        searchable: false
 
 dmaapConsumerConfiguration:
     active: <%= @dmaap_active %>
index 972f625..36e8191 100644 (file)
@@ -737,15 +737,53 @@ gabConfig:
       -
         friendlyName: "Action"
         path: "event.action[2]"
-        searchable: "true"
+        searchable: true
       -
         friendlyName: "Comment"
         path: "event.comment"
-        searchable: "true"
+        searchable: true
       -
         friendlyName: "Alarm Additional Information"
         path: "event.structure.faultFields.structure.alarmAdditionalInformation.comment"
-        searchable: "true"
+        searchable: true
+  - artifactType: 'PM_DICTIONARY'
+    pathsandnames:
+      -
+        friendlyName: "measType"
+        path: "pmMetaData.pmFields.measType"
+        searchable: true
+      -
+        friendlyName: "measDescription"
+        path: "pmMetaData.pmFields.measDescription"
+        searchable: true
+      -
+        friendlyName: "measCondition"
+        path: "pmMetaData.pmFields.measCondition"
+        searchable: false
+      -
+        friendlyName: "measResultUnits"
+        path: "pmMetaData.pmFields.measResultUnits"
+        searchable: false
+      -
+        friendlyName: "measResultRange"
+        path: "pmMetaData.pmFields.measResultRange"
+        searchable: false
+      -
+        friendlyName: "measObjClass"
+        path: "pmMetaData.pmFields.measObjClass"
+        searchable: true
+      -
+        friendlyName: "measCollectionMethod"
+        path: "pmMetaData.pmFields.measCollectionMethod"
+        searchable: false
+      -
+        friendlyName: "measInfoId"
+        path: "pmMetaData.pmFields.measInfoId"
+        searchable: true
+      -
+        friendlyName: "iMeasInfoId"
+        path: "pmMetaData.pmFields.iMeasInfoId"
+        searchable: false
 
 #Tenant isolation consumer
 dmaapConsumerConfiguration:
index 7b93470..e290dc6 100644 (file)
@@ -116,7 +116,7 @@ export class ArtifactModel {
     };
 
     public isGenericBrowseable = ():boolean => {
-        return this.artifactType == ArtifactType.VES_EVENTS;
+        return this.artifactType === ArtifactType.VES_EVENTS || this.artifactType === ArtifactType.PM_DICTIONARY;
     };
 
     public toJSON = ():any => {
index e82322e..8ad8db2 100644 (file)
@@ -106,6 +106,7 @@ export class ArtifactType {
     static HEAT_VOL = "HEAT_VOL";
     static HEAT_NET = "HEAT_NET";
     static VF_LICENSE = "VF_LICENSE";
+    static PM_DICTIONARY = "PM_DICTIONARY";
     static VENDOR_LICENSE = "VENDOR_LICENSE";
     static THIRD_PARTY_RESERVED_TYPES = {
         WORKFLOW: "WORKFLOW",
index 711268e..6226e4a 100644 (file)
@@ -1750,7 +1750,7 @@ public class Configuration extends BasicConfiguration {
     public static class PathsAndNamesDefinition {
         private String friendlyName;
         private String path;
-        private String searchable;
+        private Boolean searchable;
 
         public String getFriendlyName() {
             return friendlyName;
@@ -1760,7 +1760,7 @@ public class Configuration extends BasicConfiguration {
             return path;
         }
 
-        public String getSearchable() {
+        public Boolean getSearchable() {
             return searchable;
         }
 
@@ -1772,7 +1772,7 @@ public class Configuration extends BasicConfiguration {
             this.path = path;
         }
 
-        public void setSearchable(String searchable) {
+        public void setSearchable(Boolean searchable) {
             this.searchable = searchable;
         }
     }
index 6589209..56a8bf5 100644 (file)
@@ -50,6 +50,12 @@ class GABYamlParserTest {
     private static final String TEST = "test";
     private static final String NONEXISTENT_FILE = "nonexistent.file";
     private static final String FAULT_REGISTRATION_YML = "yaml/faultRegistration.yml";
+    private static final String PM_DICT_YML_IN_JSON = "yaml/pmDictionaryInJson.yml";
+    private static final String PM_DICT_YML = "yaml/pmDictionary.yml";
+    private static final String MEAS_TYPE = "pmMetaData.pmFields.measType";
+    private static final String MEAS_TYPE_VALUE = "VS.NINFC.IntraFrPscelChAttempt";
+    private static final String MEAS_DESCRIPTION = "pmMetaData.pmFields.measDescription";
+    private static final String MEAS_DESCRIPTION_VALUE = "This counter indicates the number of intra gNB intra frequency PSCell change attempts.";
     private static final String INVALID_YML = "yaml/invalid.yml";
 
     @Test
@@ -106,6 +112,34 @@ class GABYamlParserTest {
         assertThatEntryIsEqualTo(result, 4 , 0, DOMAIN_VALUE, SYSLOG);
     }
 
+    @Test
+    void shouldParsePMDictionaryInJsonAndGenerateMapOfKeysOnTwoFilters() throws Exception {
+        GABResults result;
+        try (GABYamlParser yamlParser = new GABYamlParser(new YamlParser())){
+            result = yamlParser.parseFile(PM_DICT_YML_IN_JSON)
+                .filter(MEAS_TYPE)
+                .filter(MEAS_DESCRIPTION)
+                .collect();
+        }
+        assertRowsSize(result, 3);
+        assertThatEntryIsEqualTo(result, 0 , 0, MEAS_TYPE, MEAS_TYPE_VALUE);
+        assertThatEntryIsEqualTo(result, 0 , 1, MEAS_DESCRIPTION, MEAS_DESCRIPTION_VALUE);
+    }
+
+    @Test
+    void shouldParsePMDictionaryAndGenerateMapOfKeysOnTwoFilters() throws Exception {
+        GABResults result;
+        try (GABYamlParser yamlParser = new GABYamlParser(new YamlParser())){
+            result = yamlParser.parseFile(PM_DICT_YML)
+                .filter(MEAS_TYPE)
+                .filter(MEAS_DESCRIPTION)
+                .collect();
+        }
+        assertRowsSize(result, 3);
+        assertThatEntryIsEqualTo(result, 0 , 0, MEAS_TYPE, MEAS_TYPE_VALUE);
+        assertThatEntryIsEqualTo(result, 0 , 1, MEAS_DESCRIPTION, MEAS_DESCRIPTION_VALUE);
+    }
+
     @Test
     void shouldParseFaultRegistrationAndGenerateMapOfKeysOnTwoDependentFilters() throws Exception {
         GABResults result;
diff --git a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/test/resources/yaml/pmDictionary.yml b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/test/resources/yaml/pmDictionary.yml
new file mode 100644 (file)
index 0000000..fa3ed53
--- /dev/null
@@ -0,0 +1,98 @@
+---
+# PM Dictionary Schema
+pmMetaData: { presence: required, structure: {
+  pmHeader: { presence: required, structure: {
+    pmDefVsn: { presence: required, comment: “Version of the PM Dictionary artifact that contains this measurement.  Vendor defined.”},
+    pmDefSchemaVsn: { presence: required, comment: “PM Dictionary schema version from the VES Event Registration specification.”},
+    nfType: { presence: required, comment: “NF type to whom this measurement applies.  This should match the nfName-vendor string used in the fileReady or perf3gpp eventName.”}
+  } } ,
+  pmFields: { presence: required, structure: {
+    measType: { presence: required, comment: “Measurement name used in PM file, in 3GPP format where specified, else vendor defined. Names for 3GPP-defined 4G measurements are specified in 3GPP TS 32.425 item e). Names for 3GPP-defined 5G measurements are specified in 3GPP TS 28.552 item e). Vendor defined names are preceded with VS.”},
+    iMeasType: { presence: required, comment: “Vendor defined integer identifier for the measType, used for efficiency in GPB.  Must be combined with measInfoId to identify a specific measurement.”},
+    measDescription: { presence: required, comment: “Text description of the purpose of the measurement, what information does the measurement provide.”},
+    measCondition: { presence: required, comment: “Text description of the condition that causes the measurement to be updated.”},
+    measResultType: { presence: required, value: [integer], comment: “Data type of the measurement result.”},
+    measResultRange: { presence: optional, comment: “Range of the measurement result.  Only necessary when the range is smaller than the full range of the data type.”},
+    measResultUnits: { presence: required, value: [seconds, minutes, nanoseconds, microseconds, dB, number, kilobytes, bytes, ethernetFrames, packets, users], comment: “Units of measure of the measurement result.”},
+    measObjClass: { presence: required, comment: “Object class of the measurement.”},
+    measCollectionMethod: { presence: required, value: [CC, SI, DER, Gauge, Average], comment: “Measurement collection method of the measurement.  CC, SI, DER and Gauge are as defined in 3GPP.  Average contains the average value of the measurement during the granularity period.”},
+    measLastChange: { presence: required, comment: “Version of the PM Dictionary artifact the last time this measurement was added, modified or deleted.”},
+    measChangeType: { presence: required, value: [added, modified, deleted], comment: “Indicates the type of change that occurred during the measLastChange.”},
+    measInfoId: { presence: required, comment: “Name for a group of related measurements, in 3GPP format where specified, else vendor defined. Family names for 3GPP-defined 4G measurements are specified in 3GPP TS 32.425 Section 3.1. Family names for 3GPP-defined 5G measurements are specified in 3GPP TS 28.552 Section 3.4.”},
+    iMeasInfoId: { presence: required, comment: “Vendor defined integer identifier for the measInfoId, used for efficiency in GPB.”},
+    measFamily: { presence: required, comment: “Abbreviation for a family of measurements, in 3GPP format where specified, else vendor defined.”},
+    measAdditionalFields: { presence: required, comment: “This section contains vendor specific measurement fields.”, structure: {
+      measAggregationLevels: { presence: required, value: [NRBTS, NRCellCU, NRCellDU, IPNO, IPSEC, ETHIF], comment: “A list of one or more aggregations levels that Nokia recommends for this measurement.  For example, if the value is NRBTS NRCellCU, then Nokia recommends that this measurement be aggregated on the 5G BTS level and the 5G CU Cell level.”},
+      measTriggerType: { presence: optional, value: [Event, Sample], comment: “Indicates whether this measurement is triggered by an event or is sampled.”}
+    } }
+  } }
+} }
+---
+pmMetaData:
+  pmHeader:
+    nfType: gnb-Nokia
+    pmDefSchemaVsn: 2.0
+    pmDefVsn: 5G19_1906_002
+  pmFields:
+    iMeasInfoId: 2204
+    iMeasType: 1
+    measCollectionMethod: CC
+    measCondition: "This measurement is updated when X2AP: SgNB Modification Required message is sent to MeNB with the SCG Change Indication set as PSCellChange."
+    measDescription: "This counter indicates the number of intra gNB intra frequency PSCell change attempts."
+    measFamily: NINFC
+    measInfoId: "NR Intra Frequency PSCell Change"
+    measLastChange: 5G18A_1807_003
+    measObjClass: NGCELL
+    measResultRange: 0-4096
+    measResultType: integer
+    measResultUnits: number
+    measType: VS.NINFC.IntraFrPscelChAttempt
+    measAdditionalFields:
+      vendorField1: X
+      vendorField2: B
+---
+pmMetaData:
+  pmHeader:
+    nfType: gnb-Nokia
+    pmDefSchemaVsn: 2.0
+    pmDefVsn: 5G19_1906_002
+  pmFields:
+    iMeasInfoId: 2204
+    iMeasType: 2
+    measCollectionMethod: CC
+    measCondition: "This measurement is updated when the TDCoverall timer has elapsed before gNB receives the X2AP: SgNB Modification Confirm message."
+    measDescription: "This measurement the number of intra gNB intra frequency PSCell change failures due to TDCoverall timer expiry."
+    measFamily: NINFC
+    measInfoId: "NR Intra Frequency PSCell Change"
+    measLastChange: 5G18A_1807_003
+    measObjClass: NGCELL
+    measResultRange: 0-4096
+    measResultType: integer
+    measResultUnits: number
+    measType: VS.NINFC.IntraFrPscelChFailTdcExp
+    measAdditionalFields:
+      vendorField1: Y
+---
+pmMetaData:
+  pmHeader:
+    nfType: gnb-Nokia
+    pmDefSchemaVsn: 2.0
+    pmDefVsn: 5G19_1906_002
+  pmFields:
+    iMeasInfoId: 2206
+    iMeasType: 1
+    measCollectionMethod: CC
+    measCondition: "This measurement is updated when MeNB replies to X2AP: SgNB Modification Required message with the X2AP: SgNB Modification Refuse message."
+    measDescription: "This counter indicates the number of intra gNB intra frequency PSCell change failures due to MeNB refusal."
+    measFamily: NINFC
+    measInfoId: "NR Intra Frequency PSCell Change"
+    measLastChange: 5G19_1906_002
+    measObjClass: NGCELL
+    measResultRange: 0-4096
+    measResultType: integer
+    measResultUnits: number
+    measType: VS.NINFC.IntraFrPscelChFailMenbRef
+    measAdditionalFields:
+      vendorField1: Z
+      vendorField2: A
+...
diff --git a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/test/resources/yaml/pmDictionaryInJson.yml b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/test/resources/yaml/pmDictionaryInJson.yml
new file mode 100644 (file)
index 0000000..31ff4fc
--- /dev/null
@@ -0,0 +1,110 @@
+---
+# PM Dictionary Schema
+pmMetaData: { presence: required, structure: {
+  pmHeader: { presence: required, structure: {
+    pmDefVsn: { presence: required, comment: “Version of the PM Dictionary artifact that contains this measurement.  Vendor defined.”},
+    pmDefSchemaVsn: { presence: required, comment: “PM Dictionary schema version from the VES Event Registration specification.”},
+    nfType: { presence: required, comment: “NF type to whom this measurement applies.  This should match the nfName-vendor string used in the fileReady or perf3gpp eventName.”}
+  } } ,
+  pmFields: { presence: required, structure: {
+    measType: { presence: required, comment: “Measurement name used in PM file, in 3GPP format where specified, else vendor defined. Names for 3GPP-defined 4G measurements are specified in 3GPP TS 32.425 item e). Names for 3GPP-defined 5G measurements are specified in 3GPP TS 28.552 item e). Vendor defined names are preceded with VS.”},
+    iMeasType: { presence: required, comment: “Vendor defined integer identifier for the measType, used for efficiency in GPB.  Must be combined with measInfoId to identify a specific measurement.”},
+    measDescription: { presence: required, comment: “Text description of the purpose of the measurement, what information does the measurement provide.”},
+    measCondition: { presence: required, comment: “Text description of the condition that causes the measurement to be updated.”},
+    measResultType: { presence: required, value: [integer], comment: “Data type of the measurement result.”},
+    measResultRange: { presence: optional, comment: “Range of the measurement result.  Only necessary when the range is smaller than the full range of the data type.”},
+    measResultUnits: { presence: required, value: [seconds, minutes, nanoseconds, microseconds, dB, number, kilobytes, bytes, ethernetFrames, packets, users], comment: “Units of measure of the measurement result.”},
+    measObjClass: { presence: required, comment: “Object class of the measurement.”},
+    measCollectionMethod: { presence: required, value: [CC, SI, DER, Gauge, Average], comment: “Measurement collection method of the measurement.  CC, SI, DER and Gauge are as defined in 3GPP.  Average contains the average value of the measurement during the granularity period.”},
+    measLastChange: { presence: required, comment: “Version of the PM Dictionary artifact the last time this measurement was added, modified or deleted.”},
+    measChangeType: { presence: required, value: [added, modified, deleted], comment: “Indicates the type of change that occurred during the measLastChange.”},
+    measInfoId: { presence: required, comment: “Name for a group of related measurements, in 3GPP format where specified, else vendor defined. Family names for 3GPP-defined 4G measurements are specified in 3GPP TS 32.425 Section 3.1. Family names for 3GPP-defined 5G measurements are specified in 3GPP TS 28.552 Section 3.4.”},
+    iMeasInfoId: { presence: required, comment: “Vendor defined integer identifier for the measInfoId, used for efficiency in GPB.”},
+    measFamily: { presence: required, comment: “Abbreviation for a family of measurements, in 3GPP format where specified, else vendor defined.”},
+    measAdditionalFields: { presence: required, comment: “This section contains vendor specific measurement fields.”, structure: {
+      measAggregationLevels: { presence: required, value: [NRBTS, NRCellCU, NRCellDU, IPNO, IPSEC, ETHIF], comment: “A list of one or more aggregations levels that Nokia recommends for this measurement.  For example, if the value is NRBTS NRCellCU, then Nokia recommends that this measurement be aggregated on the 5G BTS level and the 5G CU Cell level.”},
+      measTriggerType: { presence: optional, value: [Event, Sample], comment: “Indicates whether this measurement is triggered by an event or is sampled.”}
+    } }
+  } }
+} }
+---
+pmMetaData: {
+  pmHeader: {
+    nfType: gnb-Nokia,
+    pmDefSchemaVsn: 2.0,
+    pmDefVsn: 5G19_1906_002
+  },
+  pmFields: {
+    iMeasInfoId: 2204,
+    iMeasType: 1,
+    measCollectionMethod: CC,
+    measCondition: "This measurement is updated when X2AP: SgNB Modification Required message is sent to MeNB with the SCG Change Indication set as PSCellChange.",
+    measDescription: "This counter indicates the number of intra gNB intra frequency PSCell change attempts.",
+    measFamily: NINFC,
+    measInfoId: "NR Intra Frequency PSCell Change",
+    measLastChange: 5G18A_1807_003,
+    measObjClass: NGCELL,
+    measResultRange: 0-4096,
+    measResultType: integer,
+    measResultUnits: number,
+    measType: VS.NINFC.IntraFrPscelChAttempt,
+    measAdditionalFields: {
+      vendorField1: X,
+      vendorField2: B
+    }
+  }
+}
+---
+pmMetaData: {
+  pmHeader: {
+    nfType: gnb-Nokia,
+    pmDefSchemaVsn: 2.0,
+    pmDefVsn: 5G19_1906_002
+  },
+  pmFields: {
+    iMeasInfoId: 2204,
+    iMeasType: 2,
+    measCollectionMethod: CC,
+    measCondition: "This measurement is updated when the TDCoverall timer has elapsed before gNB receives the X2AP: SgNB Modification Confirm message.",
+    measDescription: "This measurement the number of intra gNB intra frequency PSCell change failures due to TDCoverall timer expiry.",
+    measFamily: NINFC,
+    measInfoId: "NR Intra Frequency PSCell Change",
+    measLastChange: 5G18A_1807_003,
+    measObjClass: NGCELL,
+    measResultRange: 0-4096,
+    measResultType: integer,
+    measResultUnits: number,
+    measType: VS.NINFC.IntraFrPscelChFailTdcExp,
+    measAdditionalFields: {
+      vendorField1: Y
+    }
+  }
+}
+---
+pmMetaData: {
+  pmHeader: {
+    nfType: gnb-Nokia,
+    pmDefSchemaVsn: 2.0,
+    pmDefVsn: 5G19_1906_002
+  },
+  pmFields: {
+    iMeasInfoId: 2206,
+    iMeasType: 1,
+    measCondition: "This measurement is updated when MeNB replies to X2AP: SgNB Modification Required message with the X2AP: SgNB Modification Refuse message.",
+    measCollectionMethod: CC,
+    measDescription: "This counter indicates the number of intra gNB intra frequency PSCell change failures due to MeNB refusal.",
+    measFamily: NINFC,
+    measInfoId: "NR Intra Frequency PSCell Change",
+    measLastChange: 5G19_1906_002,
+    measObjClass: NGCELL,
+    measResultRange: 0-4096,
+    measResultType: integer,
+    measResultUnits: number,
+    measType: VS.NINFC.IntraFrPscelChFailMenbRef,
+    measAdditionalFields: {
+      vendorField1: Z,
+      vendorField2: A
+    }
+  }
+}
+...
\ No newline at end of file