From ae6a1ca9e670a9ab2c7302af89f0dd17bf54ba83 Mon Sep 17 00:00:00 2001 From: Bartosz Gardziejewski Date: Wed, 8 Jul 2020 14:37:27 +0200 Subject: Add validation of YAML documents, with use of schema Issue-ID: VNFSDK-594 Signed-off-by: Bartosz Gardziejewski Change-Id: I4afc573f564c642a349736e50b50c591b9b18650 --- .../yaml_schema/Multi_Document_Invalid.yaml | 86 ++++++++++++++++++++++ .../test/resources/yaml_schema/PM_Dictionary.yaml | 7 +- 2 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 csarvalidation/src/test/resources/yaml_schema/Multi_Document_Invalid.yaml (limited to 'csarvalidation/src/test/resources/yaml_schema') diff --git a/csarvalidation/src/test/resources/yaml_schema/Multi_Document_Invalid.yaml b/csarvalidation/src/test/resources/yaml_schema/Multi_Document_Invalid.yaml new file mode 100644 index 0000000..aab34fa --- /dev/null +++ b/csarvalidation/src/test/resources/yaml_schema/Multi_Document_Invalid.yaml @@ -0,0 +1,86 @@ +... +# PM Dictionary perf3gpp measurements for the gnb-Nokia NF (bracket style yaml) +--- +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: float, + 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: float, + measChangeType: added, + measResultUnits: number, + measType: VS.NINFC.IntraFrPscelChFailMenbRef, + measAdditionalFields: { + vendorField1: Z, + vendorField2: A + } + } +... diff --git a/csarvalidation/src/test/resources/yaml_schema/PM_Dictionary.yaml b/csarvalidation/src/test/resources/yaml_schema/PM_Dictionary.yaml index 5384dcd..3251ecf 100644 --- a/csarvalidation/src/test/resources/yaml_schema/PM_Dictionary.yaml +++ b/csarvalidation/src/test/resources/yaml_schema/PM_Dictionary.yaml @@ -12,7 +12,7 @@ pmMetaData: { presence: required, structure: { }, pmDefSchemaVsn: { presence: required, - value: [2.0], + value: 2.0, comment: "PM Dictionary Schema Version from the VES Event Registration specification" }, @@ -170,7 +170,7 @@ pmMetaData: { measLastChange: 5G18A_1807_003, measObjClass: NGCELL, measResultRange: 0-4096, - measResultType: integer, + measResultType: float, measResultUnits: number, measType: VS.NINFC.IntraFrPscelChFailTdcExp, measAdditionalFields: { @@ -197,7 +197,8 @@ pmMetaData: { measLastChange: 5G19_1906_002, measObjClass: NGCELL, measResultRange: 0-4096, - measResultType: integer, + measResultType: float, + measChangeType: added, measResultUnits: number, measType: VS.NINFC.IntraFrPscelChFailMenbRef, measAdditionalFields: { -- cgit 1.2.3-korg