From 4cd4c471e9b56494b7ae1e4917e88fa9513082b9 Mon Sep 17 00:00:00 2001 From: Michael Dürre Date: Mon, 31 Aug 2020 10:36:42 +0200 Subject: add data-provider v2 for openroadm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extend db service for writing data for v2 Issue-ID: CCSDK-2582 Signed-off-by: Michael Dürre Change-Id: Ib47919a7f45a4954cd76514097a0b073c605fec3 Signed-off-by: Michael Dürre --- .../features/sdnr/wt/common/test/JSONAssert.java | 57 +- .../sdnr/wt/dataprovider/model/DataProvider.java | 7 +- .../pm/types/rev191129/PmDataTypeBuilder.java | 23 + .../pm/types/rev200327/PmDataTypeBuilder.java | 23 - .../src/main/yang/data-provider-v2@2020-07-02.yang | 1 + .../yang/org-openroadm-pm-types@2019-11-29.yang | 680 ++++++++++++++++++++ .../yang/org-openroadm-pm-types@2020-03-27.yang | 709 --------------------- sdnr/wt/data-provider/provider/pom.xml | 3 +- .../data/entity/HtDatabaseEventsService.java | 63 +- .../wt/dataprovider/yangtools/YangToolsCloner.java | 223 ------- .../sdnr/wt/dataprovider/test/TestTree.java | 78 ++- .../wt/dataprovider/test/util/HostInfoForTest.java | 2 +- .../src/test/resources/testequipment/1.json | 17 + .../src/test/resources/testequipment/10.json | 15 + .../src/test/resources/testequipment/11.json | 18 + .../src/test/resources/testequipment/12.json | 15 + .../src/test/resources/testequipment/13.json | 20 + .../src/test/resources/testequipment/14.json | 15 + .../src/test/resources/testequipment/15.json | 15 + .../src/test/resources/testequipment/16.json | 15 + .../src/test/resources/testequipment/17.json | 17 + .../src/test/resources/testequipment/18.json | 18 + .../src/test/resources/testequipment/19.json | 20 + .../src/test/resources/testequipment/2.json | 15 + .../src/test/resources/testequipment/20.json | 20 + .../src/test/resources/testequipment/21.json | 17 + .../src/test/resources/testequipment/3.json | 15 + .../src/test/resources/testequipment/4.json | 15 + .../src/test/resources/testequipment/5.json | 25 + .../src/test/resources/testequipment/6.json | 17 + .../src/test/resources/testequipment/7.json | 17 + .../src/test/resources/testequipment/8.json | 17 + .../src/test/resources/testequipment/9.json | 19 + .../src/main/yang/org-openroadm-pm-types.yang | 680 -------------------- .../yang/org-openroadm-pm-types@2019-11-29.yang | 680 ++++++++++++++++++++ 35 files changed, 1936 insertions(+), 1655 deletions(-) create mode 100644 sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev191129/PmDataTypeBuilder.java delete mode 100644 sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev200327/PmDataTypeBuilder.java create mode 100644 sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2019-11-29.yang delete mode 100644 sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2020-03-27.yang delete mode 100644 sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsCloner.java create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/1.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/10.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/11.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/12.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/13.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/14.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/15.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/16.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/17.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/18.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/19.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/2.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/20.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/21.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/3.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/4.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/5.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/6.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/7.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/8.json create mode 100644 sdnr/wt/data-provider/provider/src/test/resources/testequipment/9.json delete mode 100644 sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types.yang create mode 100644 sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types@2019-11-29.yang (limited to 'sdnr/wt') diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/test/JSONAssert.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/test/JSONAssert.java index f95dfe0b2..8b651cbe9 100644 --- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/test/JSONAssert.java +++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/test/JSONAssert.java @@ -60,7 +60,7 @@ public class JSONAssert { } else if ((o1 instanceof String) && (o2 instanceof String)) { - return ((String) o1).equals(((String) o2)) ? 0 : -1; + return ((String) o1).equals((o2)) ? 0 : -1; } else if ((o1 instanceof JSONObject) && (o2 instanceof JSONObject)) { if (((JSONObject) o1).length() != ((JSONObject) o2).length()) { return ((JSONObject) o1).length() - ((JSONObject) o2).length() < 0 ? -1 : 1; @@ -137,7 +137,7 @@ public class JSONAssert { } else if ((o1 instanceof String) && (o2 instanceof String)) { - return ((String) o1).equals(((String) o2)) ? 0 : -1; + return ((String) o1).equals((o2)) ? 0 : -1; } else if ((o1 instanceof JSONObject) && (o2 instanceof JSONObject)) { if (((JSONObject) o1).length() == 0 && ((JSONObject) o2).length() == 0) { return 0; @@ -181,6 +181,56 @@ public class JSONAssert { } } + + public static void assertContainsOnlyKey(JSONObject o, String key) { + if(o==null) { + throw new AssertionError("object is null"); + } + if(key==null) { + throw new AssertionError("key is null"); + } + + Object[] keys= o.keySet().toArray(); + if(keys.length>1) { + throw new AssertionError("more than one key found"); + } + if(keys.length==0) { + throw new AssertionError("no key found"); + } + if(!key.equals(keys[0])) { + throw new AssertionError("different key found "+key+" <=> "+ keys[0]); + } + } + + + public static void assertContainsExactKeys(JSONObject o, String[] keys) { + if(o==null) { + throw new AssertionError("object is null"); + } + if(keys==null) { + throw new AssertionError("keys is null"); + } + Object[] okeys= o.keySet().toArray(); + if(okeys.length!=keys.length) { + throw new AssertionError("found different amount of keys"); + } + for(String k:keys) { + if(!o.keySet().contains(k)) { + throw new AssertionError("key "+ k+ " not found"); + } + } + } + public static void assertContainsNoKeys(JSONObject o) { + if(o==null) { + throw new AssertionError("object is null"); + } + + Object[] okeys= o.keySet().toArray(); + if(okeys.length!=0) { + throw new AssertionError("found keys"); + } + } + private static void assertEqualsNonStrict(String message, String def, String toTest) throws JSONException { JSONObject d1 = new JSONObject(def); @@ -188,6 +238,7 @@ public class JSONAssert { if (nonStrictComarator.compare(d1, d2) != 0) { throw new AssertionError(message); } + } private static void assertEqualsStrict(String message, String def, String toTest) throws JSONException { @@ -198,4 +249,6 @@ public class JSONAssert { } } + + } diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java index f4578d5dc..639fe301b 100644 --- a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java +++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java @@ -102,10 +102,13 @@ public interface DataProvider extends ArchiveCleanProvider { /** * @param list */ - void doWritePerformanceData(List list); + void doWritePerformanceData(List list); + + void doWritePerformanceData2(List list); + /** - * @return + * @return raw database client */ HtDatabaseClient getRawClient(); diff --git a/sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev191129/PmDataTypeBuilder.java b/sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev191129/PmDataTypeBuilder.java new file mode 100644 index 000000000..98e93c363 --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev191129/PmDataTypeBuilder.java @@ -0,0 +1,23 @@ +package org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129; +import java.lang.String; +import java.lang.UnsupportedOperationException; + +/** + * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. + * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). + * + * The reason behind putting it under src/main/java is: + * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent + * loss of user code. + * + */ +public class PmDataTypeBuilder { + private PmDataTypeBuilder() { + //Exists only to defeat instantiation. + } + + public static PmDataType getDefaultInstance(String defaultValue) { + throw new UnsupportedOperationException("Not yet implemented"); + } + +} diff --git a/sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev200327/PmDataTypeBuilder.java b/sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev200327/PmDataTypeBuilder.java deleted file mode 100644 index f470fb6ba..000000000 --- a/sdnr/wt/data-provider/model/src/main/java/org/opendaylight/yang/gen/v1/http/org/openroadm/pm/types/rev200327/PmDataTypeBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev200327; -import java.lang.String; -import java.lang.UnsupportedOperationException; - -/** - * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. - * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). - * - * The reason behind putting it under src/main/java is: - * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent - * loss of user code. - * - */ -public class PmDataTypeBuilder { - private PmDataTypeBuilder() { - //Exists only to defeat instantiation. - } - - public static PmDataType getDefaultInstance(String defaultValue) { - throw new UnsupportedOperationException("Not yet implemented"); - } - -} diff --git a/sdnr/wt/data-provider/model/src/main/yang/data-provider-v2@2020-07-02.yang b/sdnr/wt/data-provider/model/src/main/yang/data-provider-v2@2020-07-02.yang index 358e30c8b..47cc009f1 100644 --- a/sdnr/wt/data-provider/model/src/main/yang/data-provider-v2@2020-07-02.yang +++ b/sdnr/wt/data-provider/model/src/main/yang/data-provider-v2@2020-07-02.yang @@ -6,6 +6,7 @@ module data-provider-v2 { import org-openroadm-pm-types { prefix org-openroadm-pm-types; + revision-date 2019-11-29; reference "OpenROADM: YANG definitions of performance management types"; } diff --git a/sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2019-11-29.yang b/sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2019-11-29.yang new file mode 100644 index 000000000..78dd8934e --- /dev/null +++ b/sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2019-11-29.yang @@ -0,0 +1,680 @@ +module org-openroadm-pm-types { + namespace "http://org/openroadm/pm-types"; + prefix org-openroadm-pm-types; + + organization + "Open ROADM MSA"; + contact + "OpenROADM.org"; + description + "YANG definitions of performance management types. + + Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, + All other rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + * Neither the Members of the Open ROADM MSA Agreement nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS'' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE"; + + revision 2019-11-29 { + description + "Version 6.1.0"; + } + revision 2019-03-29 { + description + "Version 5.0.0"; + } + revision 2018-11-30 { + description + "Version 4.1.0"; + } + revision 2017-12-15 { + description + "Version 2.2"; + } + revision 2017-09-29 { + description + "Version 2.1"; + } + revision 2017-06-26 { + description + "Version 2.0"; + } + revision 2016-10-14 { + description + "Version 1.2"; + } + + typedef pm-granularity { + type enumeration { + enum notApplicable { + value 1; + description + "This is for total statistic counters on devices that support + them."; + } + enum 15min { + value 2; + } + enum 24Hour { + value 3; + } + } + description + "Granularity of PM bin"; + } + + typedef pm-data-type { + type union { + type uint64; + type int64; + type decimal64 { + fraction-digits 2; + } + type decimal64 { + fraction-digits 17; + } + } + } + + typedef validity { + type enumeration { + enum complete { + value 1; + } + enum partial { + value 2; + } + enum suspect { + value 3; + } + } + description + "Validity of data"; + } + + typedef pm-names-enum { + type enumeration { + enum vendorExtension { + value 1; + description + "vendor extension"; + } + enum bitErrorRate { + value 2; + description + "Bit error rate (BER)"; + } + enum opticalPowerOutput { + value 3; + description + "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalReturnLoss { + value 4; + description + "Optical Return Loss (ORL-OTS) - at MW port(s) B"; + } + enum opticalPowerInput { + value 5; + description + "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power"; + } + enum codeViolations { + value 8; + description + "Code Violations (CV)"; + } + enum erroredSeconds { + value 9; + description + "Errored Seconds (ES)"; + } + enum severelyErroredSeconds { + value 10; + description + "Severely Errored Seconds (SES)"; + } + enum unavailableSeconds { + value 11; + description + "Unavailable Seconds (UAS)"; + } + enum inFrames { + value 12; + description + "In frames (INFRAMES-E)"; + } + enum inFramesErrored { + value 13; + description + "In frames errored (INFRAMESERR-E)"; + } + enum outFrames { + value 14; + description + "Out frames (OUTFRAMES-E)"; + } + enum erroredSecondsEthernet { + value 15; + description + "Errored Seconds Ethernet (ES-E)"; + } + enum severelyErroredSecondsEthernet { + value 16; + description + "Severely Errored Seconds, Ethernet (SES-E)"; + } + enum unavailableSecondsEthernet { + value 17; + description + "Unavailable Seconds, Ethernet (UAS-E)"; + } + enum erroredBlockCount { + value 18; + description + "Errored block count"; + } + enum delay { + value 19; + description + "Number of frames between a DMValue toggle event and the received DMp signal value toggle event"; + } + enum defectSeconds { + value 20; + description + "Defect Seconds (DS)"; + } + enum backwardIncomingAlignmentError { + value 21; + description + "Backward Incoming Alignment Error (BIAE)"; + } + enum incomingAlignmentError { + value 22; + description + "Incoming Alignment Error (IAE)"; + } + enum opticalPowerOutputMin { + value 23; + description + "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalPowerOutputMax { + value 24; + description + "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalPowerOutputAvg { + value 25; + description + "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalPowerInputMin { + value 26; + description + "Minimum Optical Power Input (OPIN-OTS). Total optical power"; + } + enum opticalPowerInputMax { + value 27; + description + "Maximum Optical Power Input (OPIN-OTS). Total optical power"; + } + enum opticalPowerInputAvg { + value 28; + description + "Average Optical Power Input (OPIN-OTS). Total optical power"; + } + enum opticalPowerOutputOSC { + value 29; + description + "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerOutputOSCMin { + value 30; + description + "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerOutputOSCMax { + value 31; + description + "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerOutputOSCAvg { + value 32; + description + "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerInputOSC { + value 33; + description + "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum opticalPowerInputOSCMin { + value 34; + description + "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum opticalPowerInputOSCMax { + value 35; + description + "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum opticalPowerInputOSCAvg { + value 36; + description + "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum preFECCorrectedErrors { + value 37; + description + "pFEC corrected Errors"; + } + enum totalOpticalPowerInput { + value 38; + description + "Total Optical Power Input."; + } + enum totalOpticalPowerInputMin { + value 39; + description + "Minimum Total Optical Power Input."; + } + enum totalOpticalPowerInputMax { + value 40; + description + "Maximum Total Optical Power Input."; + } + enum totalOpticalPowerInputAvg { + value 41; + description + "Average Total Optical Power Input."; + } + enum FECCorrectableBlocks { + value 42; + description + "FEC Correctable Blocks."; + } + enum FECUncorrectableBlocks { + value 43; + description + "FEC Uncorrectable Blocks."; + } + enum BIPErrorCounter { + value 56; + description + "BIP Error Counter"; + } + enum protectionSwitchingCount { + value 57; + description + "Protection Switching Count (PSC)"; + } + enum protectionSwitchingDuration { + value 58; + description + "Protection Switching Duration in seconds (PSD)"; + } + enum erroredBlockCountTCM1-up { + value 59; + description + "errored Blocks Count on TCM1 up direction."; + } + enum erroredBlockCountTCM2-up { + value 60; + description + "errored Blocks Count on TCM2 up direction."; + } + enum erroredBlockCountTCM3-up { + value 61; + description + "errored Blocks Count on TCM3 up direction."; + } + enum erroredBlockCountTCM4-up { + value 62; + description + "errored Blocks Count on TCM4 up direction."; + } + enum erroredBlockCountTCM5-up { + value 63; + description + "errored Blocks Count on TCM5 up direction."; + } + enum erroredBlockCountTCM6-up { + value 64; + description + "errored Blocks Count on TCM6 up direction."; + } + enum delayTCM1-up { + value 65; + description + "Delay on TCM1 up direction."; + } + enum delayTCM2-up { + value 66; + description + "Delay on TCM2 up direction."; + } + enum delayTCM3-up { + value 67; + description + "Delay on TCM3 up direction."; + } + enum delayTCM4-up { + value 68; + description + "Delay on TCM4 up direction."; + } + enum delayTCM5-up { + value 69; + description + "Delay on TCM5 up direction."; + } + enum delayTCM6-up { + value 70; + description + "Delay on TCM6 up direction."; + } + enum erroredBlockCountTCM1-down { + value 71; + description + "errored Blocks Count on TCM1 down direction."; + } + enum erroredBlockCountTCM2-down { + value 72; + description + "errored Blocks Count on TCM2 down direction."; + } + enum erroredBlockCountTCM3-down { + value 73; + description + "errored Blocks Count on TCM3 down direction."; + } + enum erroredBlockCountTCM4-down { + value 74; + description + "errored Blocks Count on TCM4 down direction."; + } + enum erroredBlockCountTCM5-down { + value 75; + description + "errored Blocks Count on TCM5 down direction."; + } + enum erroredBlockCountTCM6-down { + value 76; + description + "errored Blocks Count on TCM6 down direction."; + } + enum delayTCM1-down { + value 77; + description + "Delay on TCM1 down direction."; + } + enum delayTCM2-down { + value 78; + description + "Delay on TCM2 down direction."; + } + enum delayTCM3-down { + value 79; + description + "Delay on TCM3 down direction."; + } + enum delayTCM4-down { + value 80; + description + "Delay on TCM4 down direction."; + } + enum delayTCM5-down { + value 81; + description + "Delay on TCM5 down direction."; + } + enum delayTCM6-down { + value 82; + description + "Delay on TCM6 down direction."; + } + enum partialRateDiscard { + value 83; + description + "Discarded packet as a result of policing or rate limiting for subrate ethernet."; + } + enum erroredSecondsTCM1-up { + value 84; + description + "errored Seconds Count on TCM1 up direction."; + } + enum erroredSecondsTCM2-up { + value 85; + description + "errored Seconds Count on TCM2 up direction."; + } + enum erroredSecondsTCM3-up { + value 86; + description + "errored Seconds Count on TCM3 up direction."; + } + enum erroredSecondsTCM4-up { + value 87; + description + "errored Seconds Count on TCM4 up direction."; + } + enum erroredSecondsTCM5-up { + value 88; + description + "errored Seconds Count on TCM5 up direction."; + } + enum erroredSecondsTCM6-up { + value 89; + description + "errored Seconds Count on TCM6 up direction."; + } + enum severelyErroredSecondsTCM1-up { + value 90; + description + "severely Errored Seconds Count on TCM1 up direction."; + } + enum severelyErroredSecondsTCM2-up { + value 91; + description + "severely Errored Seconds Count on TCM2 up direction."; + } + enum severelyErroredSecondsTCM3-up { + value 92; + description + "severely Errored Seconds Count on TCM3 up direction."; + } + enum severelyErroredSecondsTCM4-up { + value 93; + description + "severely Errored Seconds Count on TCM4 up direction."; + } + enum severelyErroredSecondsTCM5-up { + value 94; + description + "severely Errored Seconds Count on TCM5 up direction."; + } + enum severelyErroredSecondsTCM6-up { + value 95; + description + "severely Errored Seconds Count on TCM6 up direction."; + } + enum unavailableSecondsTCM1-up { + value 96; + description + "unavailable Seconds Count on TCM1 up direction."; + } + enum unavailableSecondsTCM2-up { + value 97; + description + "unavailable Seconds Count on TCM2 up direction."; + } + enum unavailableSecondsTCM3-up { + value 98; + description + "unavailable Seconds Count on TCM3 up direction."; + } + enum unavailableSecondsTCM4-up { + value 99; + description + "unavailable Seconds Count on TCM4 up direction."; + } + enum unavailableSecondsTCM5-up { + value 100; + description + "unavailable Seconds Count on TCM5 up direction."; + } + enum unavailableSecondsTCM6-up { + value 101; + description + "unavailable Seconds Count on TCM6 up direction."; + } + enum erroredSecondsTCM1-down { + value 102; + description + "errored Seconds Count on TCM1 down direction."; + } + enum erroredSecondsTCM2-down { + value 103; + description + "errored Seconds Count on TCM2 down direction."; + } + enum erroredSecondsTCM3-down { + value 104; + description + "errored Seconds Count on TCM3 down direction."; + } + enum erroredSecondsTCM4-down { + value 105; + description + "errored Seconds Count on TCM4 down direction."; + } + enum erroredSecondsTCM5-down { + value 106; + description + "errored Seconds Count on TCM5 down direction."; + } + enum erroredSecondsTCM6-down { + value 107; + description + "errored Seconds Count on TCM6 down direction."; + } + enum severelyErroredSecondsTCM1-down { + value 108; + description + "severely Errored Seconds Count on TCM1 down direction."; + } + enum severelyErroredSecondsTCM2-down { + value 109; + description + "severely Errored Seconds Count on TCM2 down direction."; + } + enum severelyErroredSecondsTCM3-down { + value 110; + description + "severely Errored Seconds Count on TCM3 down direction."; + } + enum severelyErroredSecondsTCM4-down { + value 111; + description + "severely Errored Seconds Count on TCM4 down direction."; + } + enum severelyErroredSecondsTCM5-down { + value 112; + description + "severely Errored Seconds Count on TCM5 down direction."; + } + enum severelyErroredSecondsTCM6-down { + value 113; + description + "severely Errored Seconds Count on TCM6 down direction."; + } + enum unavailableSecondsTCM1-down { + value 114; + description + "unavailable Seconds Count on TCM1 down direction."; + } + enum unavailableSecondsTCM2-down { + value 115; + description + "unavailable Seconds Count on TCM2 down direction."; + } + enum unavailableSecondsTCM3-down { + value 116; + description + "unavailable Seconds Count on TCM3 down direction."; + } + enum unavailableSecondsTCM4-down { + value 117; + description + "unavailable Seconds Count on TCM4 down direction."; + } + enum unavailableSecondsTCM5-down { + value 118; + description + "unavailable Seconds Count on TCM5 down direction."; + } + enum unavailableSecondsTCM6-down { + value 119; + description + "unavailable Seconds Count on TCM6 down direction."; + } + } + } + + grouping pm-measurement { + description + "Set of parameters related to a PM Measurement"; + leaf pmParameterValue { + type pm-data-type; + config false; + mandatory true; + } + leaf pmParameterUnit { + type string; + mandatory false; + description + "Unit PM parameter has been measured - frames, packets, u, etc"; + } + leaf validity { + type validity; + mandatory false; + } + } + + grouping pm-names { + description + "Name of PM parameter. Consists of a set list of parameters, + plus an extension field to support addition parameters."; + leaf type { + type pm-names-enum; + mandatory true; + } + leaf extension { + type string; + description + "name of parameter, when enum value set to vendorExtension because + name not found in pm-names-enum"; + } + } +} diff --git a/sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2020-03-27.yang b/sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2020-03-27.yang deleted file mode 100644 index 1fbd72e0f..000000000 --- a/sdnr/wt/data-provider/model/src/main/yang/org-openroadm-pm-types@2020-03-27.yang +++ /dev/null @@ -1,709 +0,0 @@ -module org-openroadm-pm-types { - namespace "http://org/openroadm/pm-types"; - prefix org-openroadm-pm-types; - - organization - "Open ROADM MSA"; - contact - "OpenROADM.org"; - description - "YANG definitions of performance management types. - - Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, - All other rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - * Neither the Members of the Open ROADM MSA Agreement nor the names of its - contributors may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS'' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE"; - - revision 2020-03-27 { - description - "Version 7.0.0"; - } - revision 2019-11-29 { - description - "Version 6.1.0"; - } - revision 2019-03-29 { - description - "Version 5.0.0"; - } - revision 2018-11-30 { - description - "Version 4.1.0"; - } - revision 2017-12-15 { - description - "Version 2.2"; - } - revision 2017-09-29 { - description - "Version 2.1"; - } - revision 2017-06-26 { - description - "Version 2.0"; - } - revision 2016-10-14 { - description - "Version 1.2"; - } - - typedef pm-granularity { - type enumeration { - enum notApplicable { - value 1; - description - "This is for total statistic counters on devices that support - them."; - } - enum 15min { - value 2; - } - enum 24Hour { - value 3; - } - } - description - "Granularity of PM bin"; - } - - typedef pm-data-type { - type union { - type uint64; - type int64; - type decimal64 { - fraction-digits 2; - } - type decimal64 { - fraction-digits 17; - } - } - } - - typedef validity { - type enumeration { - enum complete { - value 1; - } - enum partial { - value 2; - } - enum suspect { - value 3; - } - } - description - "Validity of data"; - } - - typedef pm-names-enum { - type enumeration { - enum vendorExtension { - value 1; - description - "vendor extension"; - } - enum bitErrorRate { - value 2; - description - "Bit error rate (BER)"; - } - enum opticalPowerOutput { - value 3; - description - "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalReturnLoss { - value 4; - description - "Optical Return Loss (ORL-OTS) - at MW port(s) B"; - } - enum opticalPowerInput { - value 5; - description - "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power"; - } - enum codeViolations { - value 8; - description - "Code Violations (CV)"; - } - enum erroredSeconds { - value 9; - description - "Errored Seconds (ES)"; - } - enum severelyErroredSeconds { - value 10; - description - "Severely Errored Seconds (SES)"; - } - enum unavailableSeconds { - value 11; - description - "Unavailable Seconds (UAS)"; - } - enum inFrames { - value 12; - description - "In frames (INFRAMES-E)"; - } - enum inFramesErrored { - value 13; - description - "In frames errored (INFRAMESERR-E)"; - } - enum outFrames { - value 14; - description - "Out frames (OUTFRAMES-E)"; - } - enum erroredSecondsEthernet { - value 15; - description - "Errored Seconds Ethernet (ES-E)"; - } - enum severelyErroredSecondsEthernet { - value 16; - description - "Severely Errored Seconds, Ethernet (SES-E)"; - } - enum unavailableSecondsEthernet { - value 17; - description - "Unavailable Seconds, Ethernet (UAS-E)"; - } - enum erroredBlockCount { - value 18; - description - "Errored block count"; - } - enum delay { - value 19; - description - "Number of frames between a DMValue toggle event and the received DMp signal value toggle event"; - } - enum defectSeconds { - value 20; - description - "Defect Seconds (DS)"; - } - enum backwardIncomingAlignmentError { - value 21; - description - "Backward Incoming Alignment Error (BIAE)"; - } - enum incomingAlignmentError { - value 22; - description - "Incoming Alignment Error (IAE)"; - } - enum opticalPowerOutputMin { - value 23; - description - "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalPowerOutputMax { - value 24; - description - "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalPowerOutputAvg { - value 25; - description - "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalPowerInputMin { - value 26; - description - "Minimum Optical Power Input (OPIN-OTS). Total optical power"; - } - enum opticalPowerInputMax { - value 27; - description - "Maximum Optical Power Input (OPIN-OTS). Total optical power"; - } - enum opticalPowerInputAvg { - value 28; - description - "Average Optical Power Input (OPIN-OTS). Total optical power"; - } - enum opticalPowerOutputOSC { - value 29; - description - "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerOutputOSCMin { - value 30; - description - "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerOutputOSCMax { - value 31; - description - "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerOutputOSCAvg { - value 32; - description - "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerInputOSC { - value 33; - description - "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum opticalPowerInputOSCMin { - value 34; - description - "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum opticalPowerInputOSCMax { - value 35; - description - "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum opticalPowerInputOSCAvg { - value 36; - description - "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum preFECCorrectedErrors { - value 37; - description - "pFEC corrected Errors"; - } - enum totalOpticalPowerInput { - value 38; - description - "Total Optical Power Input."; - } - enum totalOpticalPowerInputMin { - value 39; - description - "Minimum Total Optical Power Input."; - } - enum totalOpticalPowerInputMax { - value 40; - description - "Maximum Total Optical Power Input."; - } - enum totalOpticalPowerInputAvg { - value 41; - description - "Average Total Optical Power Input."; - } - enum FECCorrectableBlocks { - value 42; - description - "FEC Correctable Blocks."; - } - enum FECUncorrectableBlocks { - value 43; - description - "FEC Uncorrectable Blocks."; - } - enum BIPErrorCounter { - value 56; - description - "BIP Error Counter"; - } - enum protectionSwitchingCount { - value 57; - description - "Protection Switching Count (PSC)"; - } - enum protectionSwitchingDuration { - value 58; - description - "Protection Switching Duration in seconds (PSD)"; - } - enum erroredBlockCountTCM1-up { - value 59; - description - "errored Blocks Count on TCM1 up direction."; - } - enum erroredBlockCountTCM2-up { - value 60; - description - "errored Blocks Count on TCM2 up direction."; - } - enum erroredBlockCountTCM3-up { - value 61; - description - "errored Blocks Count on TCM3 up direction."; - } - enum erroredBlockCountTCM4-up { - value 62; - description - "errored Blocks Count on TCM4 up direction."; - } - enum erroredBlockCountTCM5-up { - value 63; - description - "errored Blocks Count on TCM5 up direction."; - } - enum erroredBlockCountTCM6-up { - value 64; - description - "errored Blocks Count on TCM6 up direction."; - } - enum delayTCM1-up { - value 65; - description - "Delay on TCM1 up direction."; - } - enum delayTCM2-up { - value 66; - description - "Delay on TCM2 up direction."; - } - enum delayTCM3-up { - value 67; - description - "Delay on TCM3 up direction."; - } - enum delayTCM4-up { - value 68; - description - "Delay on TCM4 up direction."; - } - enum delayTCM5-up { - value 69; - description - "Delay on TCM5 up direction."; - } - enum delayTCM6-up { - value 70; - description - "Delay on TCM6 up direction."; - } - enum erroredBlockCountTCM1-down { - value 71; - description - "errored Blocks Count on TCM1 down direction."; - } - enum erroredBlockCountTCM2-down { - value 72; - description - "errored Blocks Count on TCM2 down direction."; - } - enum erroredBlockCountTCM3-down { - value 73; - description - "errored Blocks Count on TCM3 down direction."; - } - enum erroredBlockCountTCM4-down { - value 74; - description - "errored Blocks Count on TCM4 down direction."; - } - enum erroredBlockCountTCM5-down { - value 75; - description - "errored Blocks Count on TCM5 down direction."; - } - enum erroredBlockCountTCM6-down { - value 76; - description - "errored Blocks Count on TCM6 down direction."; - } - enum delayTCM1-down { - value 77; - description - "Delay on TCM1 down direction."; - } - enum delayTCM2-down { - value 78; - description - "Delay on TCM2 down direction."; - } - enum delayTCM3-down { - value 79; - description - "Delay on TCM3 down direction."; - } - enum delayTCM4-down { - value 80; - description - "Delay on TCM4 down direction."; - } - enum delayTCM5-down { - value 81; - description - "Delay on TCM5 down direction."; - } - enum delayTCM6-down { - value 82; - description - "Delay on TCM6 down direction."; - } - enum partialRateDiscard { - value 83; - description - "Discarded packet as a result of policing or rate limiting for subrate ethernet."; - } - enum erroredSecondsTCM1-up { - value 84; - description - "errored Seconds Count on TCM1 up direction."; - } - enum erroredSecondsTCM2-up { - value 85; - description - "errored Seconds Count on TCM2 up direction."; - } - enum erroredSecondsTCM3-up { - value 86; - description - "errored Seconds Count on TCM3 up direction."; - } - enum erroredSecondsTCM4-up { - value 87; - description - "errored Seconds Count on TCM4 up direction."; - } - enum erroredSecondsTCM5-up { - value 88; - description - "errored Seconds Count on TCM5 up direction."; - } - enum erroredSecondsTCM6-up { - value 89; - description - "errored Seconds Count on TCM6 up direction."; - } - enum severelyErroredSecondsTCM1-up { - value 90; - description - "severely Errored Seconds Count on TCM1 up direction."; - } - enum severelyErroredSecondsTCM2-up { - value 91; - description - "severely Errored Seconds Count on TCM2 up direction."; - } - enum severelyErroredSecondsTCM3-up { - value 92; - description - "severely Errored Seconds Count on TCM3 up direction."; - } - enum severelyErroredSecondsTCM4-up { - value 93; - description - "severely Errored Seconds Count on TCM4 up direction."; - } - enum severelyErroredSecondsTCM5-up { - value 94; - description - "severely Errored Seconds Count on TCM5 up direction."; - } - enum severelyErroredSecondsTCM6-up { - value 95; - description - "severely Errored Seconds Count on TCM6 up direction."; - } - enum unavailableSecondsTCM1-up { - value 96; - description - "unavailable Seconds Count on TCM1 up direction."; - } - enum unavailableSecondsTCM2-up { - value 97; - description - "unavailable Seconds Count on TCM2 up direction."; - } - enum unavailableSecondsTCM3-up { - value 98; - description - "unavailable Seconds Count on TCM3 up direction."; - } - enum unavailableSecondsTCM4-up { - value 99; - description - "unavailable Seconds Count on TCM4 up direction."; - } - enum unavailableSecondsTCM5-up { - value 100; - description - "unavailable Seconds Count on TCM5 up direction."; - } - enum unavailableSecondsTCM6-up { - value 101; - description - "unavailable Seconds Count on TCM6 up direction."; - } - enum erroredSecondsTCM1-down { - value 102; - description - "errored Seconds Count on TCM1 down direction."; - } - enum erroredSecondsTCM2-down { - value 103; - description - "errored Seconds Count on TCM2 down direction."; - } - enum erroredSecondsTCM3-down { - value 104; - description - "errored Seconds Count on TCM3 down direction."; - } - enum erroredSecondsTCM4-down { - value 105; - description - "errored Seconds Count on TCM4 down direction."; - } - enum erroredSecondsTCM5-down { - value 106; - description - "errored Seconds Count on TCM5 down direction."; - } - enum erroredSecondsTCM6-down { - value 107; - description - "errored Seconds Count on TCM6 down direction."; - } - enum severelyErroredSecondsTCM1-down { - value 108; - description - "severely Errored Seconds Count on TCM1 down direction."; - } - enum severelyErroredSecondsTCM2-down { - value 109; - description - "severely Errored Seconds Count on TCM2 down direction."; - } - enum severelyErroredSecondsTCM3-down { - value 110; - description - "severely Errored Seconds Count on TCM3 down direction."; - } - enum severelyErroredSecondsTCM4-down { - value 111; - description - "severely Errored Seconds Count on TCM4 down direction."; - } - enum severelyErroredSecondsTCM5-down { - value 112; - description - "severely Errored Seconds Count on TCM5 down direction."; - } - enum severelyErroredSecondsTCM6-down { - value 113; - description - "severely Errored Seconds Count on TCM6 down direction."; - } - enum unavailableSecondsTCM1-down { - value 114; - description - "unavailable Seconds Count on TCM1 down direction."; - } - enum unavailableSecondsTCM2-down { - value 115; - description - "unavailable Seconds Count on TCM2 down direction."; - } - enum unavailableSecondsTCM3-down { - value 116; - description - "unavailable Seconds Count on TCM3 down direction."; - } - enum unavailableSecondsTCM4-down { - value 117; - description - "unavailable Seconds Count on TCM4 down direction."; - } - enum unavailableSecondsTCM5-down { - value 118; - description - "unavailable Seconds Count on TCM5 down direction."; - } - enum unavailableSecondsTCM6-down { - value 119; - description - "unavailable Seconds Count on TCM6 down direction."; - } - enum fecCorrectedCodewords { - value 120; - description - "FEC Corrected Codewords Counter"; - } - enum fecUncorrectedCodewords { - value 121; - description - "FEC Uncorrected Codewords Counter"; - } - enum fecSymbolErrors { - value 122; - description - "FEC Symbol Error Counter"; - } - enum localFaultSeconds { - value 123; - description - "Local Fault Seconds"; - } - enum remoteFaultSeconds { - value 124; - description - "Remote Fault Seconds"; - } - } - } - - grouping pm-measurement { - description - "Set of parameters related to a PM Measurement"; - leaf pmParameterValue { - type pm-data-type; - config false; - mandatory true; - } - leaf pmParameterUnit { - type string; - mandatory false; - description - "Unit PM parameter has been measured - frames, packets, u, etc"; - } - leaf validity { - type validity; - mandatory false; - } - } - - grouping pm-names { - description - "Name of PM parameter. Consists of a set list of parameters, - plus an extension field to support addition parameters."; - leaf type { - type pm-names-enum; - mandatory true; - } - leaf extension { - type string; - description - "name of parameter, when enum value set to vendorExtension because - name not found in pm-names-enum"; - } - } -} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/pom.xml b/sdnr/wt/data-provider/provider/pom.xml index a536d64b1..2a7b68632 100644 --- a/sdnr/wt/data-provider/provider/pom.xml +++ b/sdnr/wt/data-provider/provider/pom.xml @@ -162,13 +162,12 @@ com.github.alexcojocaru elasticsearch-maven-plugin - 6.16 ${skipTests} testCluster 9500 ${databaseport} - 7.1.1 + 7.6.1 120 ${project.build.directory}/EsInit.script diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/entity/HtDatabaseEventsService.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/entity/HtDatabaseEventsService.java index 46475f02d..de6870571 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/entity/HtDatabaseEventsService.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/entity/HtDatabaseEventsService.java @@ -25,9 +25,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; - import javax.annotation.Nonnull; - import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; @@ -83,6 +81,8 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid private final EsDataObjectReaderWriter2 networkelementConnectionDB; private final EsDataObjectReaderWriter2 pmData15mDB; private final EsDataObjectReaderWriter2 pmData24hDB; + private final EsDataObjectReaderWriter2 pmData15mDBv2; + private final EsDataObjectReaderWriter2 pmData24hDBv2; @SuppressWarnings("unused") private final ElasticSearchDataProvider dataProvider; @@ -124,6 +124,15 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid pmData24hDB = new EsDataObjectReaderWriter2<>(client, Entity.Historicalperformance24h, PmdataEntity.class, PmdataEntityBuilder.class); + pmData15mDBv2 = new EsDataObjectReaderWriter2<>(client, Entity.Historicalperformance15min, + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.PmdataEntity.class, + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.PmdataEntityBuilder.class); + + pmData24hDBv2 = new EsDataObjectReaderWriter2<>(client, Entity.Historicalperformance24h, + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.PmdataEntity.class, + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.PmdataEntityBuilder.class); + + } catch (Exception e) { LOG.error("Can not start database client. Exception: {}", e); throw new Exception("Can not start database client. Exception: {}", e); @@ -251,7 +260,7 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid /** * write internal equipment to database - * + * * @param internalEquipment with mandatory fields. */ @Override @@ -276,7 +285,7 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid /** * join base with parameters of toJoin (only non null values) - * + * * @param base base object * @param toJoin object with new property values * @return new joined object @@ -335,7 +344,7 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid /** * Update after new mountpoint registration - * + * * @param networkElementConnectionEntitiy data * @param nodeId of device (mountpoint name) */ @@ -411,7 +420,7 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid /** * Verify status of client - * + * * @param event that is printed with message * @return true if client is null */ @@ -425,7 +434,7 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid /** * Verify status of client - * + * * @param message to print including {} for object printout. * @return true if client is null */ @@ -443,7 +452,7 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid private static class EsEventBase { /** * Query to get older Elements - * + * * @param netconfTimeStamp to identify older Elements * @return QueryBuilder for older elements related to timestamp */ @@ -454,7 +463,7 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid private static class EsFaultLogDevicemanager { /** * Get older Elements - * + * * @param netconfTimeStamp to identify query elements older than this timestamp. * @return QueryBuilder for related elements */ @@ -513,15 +522,51 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid }); } + @Override + public void doWritePerformanceData2( + List list) { + + list.forEach(elem -> { + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.GranularityPeriodType + granularityPeriod = nnGetGranularityPeriodType2(elem.getGranularityPeriod()); + //_id": "Sim12600/LP-MWPS-TTP-01/2017-07-04T15:15:00.0+00:00" + StringBuffer id = new StringBuffer(); + DateAndTime date = elem.getTimeStamp(); + id.append(elem.getNodeName()); + id.append("/"); + id.append(elem.getUuidInterface()); + id.append("/"); + id.append(date != null ? date.getValue() : "null"); + switch (granularityPeriod) { + case Period15Min: + pmData15mDB.write(elem, id.toString()); + break; + case Period24Hours: + pmData24hDB.write(elem, id.toString()); + break; + case Unknown: + default: + LOG.debug("Unknown granularity {} id {}", granularityPeriod, id); + break; + } + }); + } @NonNull GranularityPeriodType nnGetGranularityPeriodType(@Nullable GranularityPeriodType granularityPeriod) { return granularityPeriod != null ? granularityPeriod : GranularityPeriodType.Unknown; } + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.GranularityPeriodType nnGetGranularityPeriodType2( + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.@Nullable GranularityPeriodType granularityPeriod) { + return granularityPeriod != null ? granularityPeriod : + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.v2.rev200702.GranularityPeriodType.Unknown; + } @Override public HtDatabaseClient getRawClient() { return this.client; } + + } diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsCloner.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsCloner.java deleted file mode 100644 index a9a658387..000000000 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsCloner.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * ONAP : ccsdk features - * ================================================================================ - * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. - * All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - * - */ -package org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nullable; -import org.opendaylight.yangtools.concepts.Builder; -import org.opendaylight.yangtools.yang.binding.DataObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class YangToolsCloner { - - private static YangToolsMapper yangtoolsMapper = new YangToolsMapper(); - private static final Logger LOG = LoggerFactory.getLogger(YangToolsCloner.class); - public static final int ACCESSOR_FIELD = 0; - public static final int ACCESSOR_METHOD = 1; - - - private final int accessor; - - private YangToolsCloner(int ac) { - this.accessor = ac; - } - - public static YangToolsCloner instance() { - return instance(ACCESSOR_METHOD); - } - - public static YangToolsCloner instance(int ac) { - return new YangToolsCloner(ac); - } - - /** - * - * @param source source object - * @param clazz Class of return object - * @return list of cloned object - * @return - */ - public List cloneList(List source, Class clazz) { - return cloneList(source, clazz, null); - } - - /** - * - * @param source source object - * @param clazz Class of return object - * @attrList filter for attribute Names to clone - * @return list of cloned object - */ - public List cloneList(List source, Class clazz, - @Nullable List attrList) { - if (source == null) { - return null; - } - List list = new ArrayList<>(); - for (S s : source) { - list.add(clone(s, clazz, attrList)); - } - return list; - } - - /** - * - * @param source source object - * @param clazz Class of return object - * @return cloned object - */ - public T clone(S source, Class clazz) { - return clone(source, clazz, null); - } - - /** - * - * @param source source object - * @param clazz Class of return object - * @attrList if empty copy all else list of attribute Names to clone - * @return cloned object - */ - public T clone(S source, Class clazz, @Nullable List attrList) { - if (source == null) { - return (T) null; - } - Field[] attributeFields; - Field sourceField; - Method m; - Builder builder = yangtoolsMapper.getBuilder(clazz); - T object = builder.build(); - attributeFields = object.getClass().getDeclaredFields(); - for (Field attributeField : attributeFields) { - // check if attr is in inclusion list - if (attrList != null && !attrList.contains(attributeField.getName())) { - continue; - } - // ignore QNAME - if (attributeField.getName().equals("QNAME")) { - continue; - } - - attributeField.setAccessible(true); - try { - if (accessor == ACCESSOR_FIELD) { - sourceField = source.getClass().getDeclaredField(attributeField.getName()); - sourceField.setAccessible(true); - if (attributeField.getType().equals(String.class) && !sourceField.getType().equals(String.class)) { - attributeField.set(object, String.valueOf(sourceField.get(source))); - } else { - attributeField.set(object, sourceField.get(source)); - } - } else if (accessor == ACCESSOR_METHOD) { - String getter = getter(attributeField.getName()); - System.out.println("getter=" + getter); - m = source.getClass().getDeclaredMethod(getter); - m.setAccessible(true); - if (attributeField.getType().equals(String.class) && !m.getReturnType().equals(String.class)) { - attributeField.set(object, String.valueOf(m.invoke(source))); - } else { - attributeField.set(object, m.invoke(source)); - } - } - - } catch (NoSuchMethodException | NoSuchFieldException e) { - // Convert to run-time exception - String msg = "no such field " + attributeField.getName() + " in class " + source.getClass().getName(); - LOG.debug(msg); - // throw new IllegalArgumentException(msg); - } catch (IllegalAccessException | SecurityException e) { - LOG.debug("Access problem " + attributeField.getName(), e); - } catch (IllegalArgumentException e) { - LOG.debug("argument problem " + attributeField.getName(), e); - } catch (InvocationTargetException e) { - LOG.debug("invocation problem " + attributeField.getName(), e); - } - } - - return object; - } - - private static String getter(String name) { - return String.format("%s%s%s", "get", name.substring(1, 2).toUpperCase(), name.substring(2)); - } - - public > B cloneToBuilder(S source, B builder) { - return cloneToBuilder(source, builder, null); - } - - public > B cloneToBuilder(S source, B builder, - @Nullable List attrList) { - Field[] attributeFields; - Field sourceField; - Method m; - attributeFields = builder.getClass().getDeclaredFields(); - for (Field attributeField : attributeFields) { - // check if attr is in inclusion list - if (attrList != null && !attrList.contains(attributeField.getName())) { - continue; - } - // ignore QNAME - if (attributeField.getName().equals("QNAME")) { - continue; - } - - attributeField.setAccessible(true); - try { - if (accessor == ACCESSOR_FIELD) { - sourceField = source.getClass().getDeclaredField(attributeField.getName()); - sourceField.setAccessible(true); - if (attributeField.getType().equals(String.class) && !sourceField.getType().equals(String.class)) { - attributeField.set(builder, String.valueOf(sourceField.get(source))); - } else { - attributeField.set(builder, sourceField.get(source)); - } - } else if (accessor == ACCESSOR_METHOD) { - m = source.getClass().getDeclaredMethod(getter(attributeField.getName())); - m.setAccessible(true); - if (attributeField.getType().equals(String.class) && !m.getReturnType().equals(String.class)) { - attributeField.set(builder, String.valueOf(m.invoke(source))); - } else { - attributeField.set(builder, m.invoke(source)); - } - } - - } catch (NoSuchMethodException | NoSuchFieldException e) { - // Convert to run-time exception - String msg = "no such field " + attributeField.getName() + " in class " + source.getClass().getName(); - LOG.debug(msg); - // throw new IllegalArgumentException(msg); - } catch (IllegalAccessException | SecurityException e) { - LOG.debug("Access problem " + attributeField.getName(), e); - } catch (IllegalArgumentException e) { - LOG.debug("argument problem " + attributeField.getName(), e); - } catch (InvocationTargetException e) { - LOG.debug("invocation problem " + attributeField.getName(), e); - } - } - return builder; - } -} diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java index f2a7ff951..970816514 100644 --- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java +++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java @@ -22,14 +22,18 @@ package org.onap.ccsdk.features.sdnr.wt.dataprovider.test; import java.io.IOException; +import java.net.URISyntaxException; import java.util.Arrays; import java.util.concurrent.TimeUnit; +import org.apache.sshd.common.util.io.IoUtils; +import org.json.JSONObject; import org.junit.BeforeClass; import org.junit.Test; import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo; import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilders; import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteByQueryRequest; +import org.onap.ccsdk.features.sdnr.wt.common.test.JSONAssert; import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.ElasticSearchDataProvider; import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.DataTreeHttpServlet; import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.DataTreeHttpServlet.EntityWithTree; @@ -54,23 +58,89 @@ public class TestTree { dbProvider = new ElasticSearchDataProvider(hosts); dbProvider.waitForYellowDatabaseStatus(30, TimeUnit.SECONDS); dbRawProvider = HtDatabaseClient.getClient(hosts); + DeleteByQueryRequest query = new DeleteByQueryRequest(Entity.Inventoryequipment.getName(), true); + query.setQuery(QueryBuilders.matchAllQuery().toJSON()); + dbRawProvider.deleteByQuery(query); + fillTestData(); + } + + private static void fillTestData() throws IOException { + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.5.5", getFileContent("/testequipment/1.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.7.0", getFileContent("/testequipment/2.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.55.1.2", getFileContent("/testequipment/3.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.65.1.2", getFileContent("/testequipment/4.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/SHELF-1.1.0.0", getFileContent("/testequipment/5.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.5", getFileContent("/testequipment/6.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.8", getFileContent("/testequipment/7.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.6.5", getFileContent("/testequipment/8.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/ODU-1.56.0.0", getFileContent("/testequipment/9.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.56.1.2", getFileContent("/testequipment/10.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/IDU-1.65.0.0", getFileContent("/testequipment/11.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.65.1.4", getFileContent("/testequipment/12.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.6.0", getFileContent("/testequipment/13.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.8.0", getFileContent("/testequipment/14.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.9.0", getFileContent("/testequipment/15.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.55.1.4", getFileContent("/testequipment/16.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.7", getFileContent("/testequipment/17.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/IDU-1.55.0.0", getFileContent("/testequipment/18.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.1.0", getFileContent("/testequipment/19.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.5.0", getFileContent("/testequipment/20.json")); + dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.5.6", getFileContent("/testequipment/21.json")); + + } + /** + * @param string + * @return + * @throws URISyntaxException + * @throws IOException + */ + private static String getFileContent(String filename) throws IOException { + return String.join("\n",IoUtils.readAllLines(TestTree.class.getResourceAsStream(filename))); } @Test public void testInventoryTree() throws IOException { DataTreeProviderImpl provider = new DataTreeProviderImpl(); provider.setDatabaseClient(dbRawProvider); - DeleteByQueryRequest query = new DeleteByQueryRequest(Entity.Inventoryequipment.getName(), true); - query.setQuery(QueryBuilders.matchAllQuery().toJSON()); - dbRawProvider.deleteByQuery(query); + DataTreeObject tree = provider.readInventoryTree(null, null, FilterMode.Lazy); + System.out.println(tree.toJSON()); + JSONObject o = new JSONObject(tree.toJSON()); + JSONAssert.assertContainsOnlyKey(o, "sim1"); + JSONObject children = o.getJSONObject("sim1").getJSONObject("children"); + this.assertSim1(children); - tree = provider.readInventoryTree(Arrays.asList("sim1"), "CARD", FilterMode.Lazy); + tree = provider.readInventoryTree(Arrays.asList("sim1"), "*", FilterMode.Lazy); + this.assertSim1(new JSONObject(tree.toJSON())); System.out.println(tree.toJSON()); } + private void assertSim1(JSONObject sim1Children) { + JSONAssert.assertContainsExactKeys(sim1Children,new String[] {"sim1/ODU-1.56.0.0", "sim1/IDU-1.55.0.0", "sim1/IDU-1.65.0.0", "sim1/SHELF-1.1.0.0"}); + JSONObject c1 = sim1Children.getJSONObject("sim1/ODU-1.56.0.0"); + JSONObject c2 = sim1Children.getJSONObject("sim1/IDU-1.55.0.0"); + JSONObject c3 = sim1Children.getJSONObject("sim1/IDU-1.65.0.0"); + JSONObject c4 = sim1Children.getJSONObject("sim1/SHELF-1.1.0.0"); + JSONAssert.assertContainsExactKeys(c1.getJSONObject("children"),new String[] {"sim1/a2.module-1.56.1.2"}); + JSONAssert.assertContainsExactKeys(c2.getJSONObject("children"),new String[] {"sim1/a2.module-1.55.1.2","sim1/CARD-1.55.1.4"}); + JSONAssert.assertContainsExactKeys(c3.getJSONObject("children"),new String[] {"sim1/a2.module-1.65.1.2","sim1/CARD-1.65.1.4"}); + JSONAssert.assertContainsExactKeys(c4.getJSONObject("children"),new String[] {"sim1/CARD-1.1.1.0", + "sim1/CARD-1.1.5.0", "sim1/CARD-1.1.7.0","sim1/CARD-1.1.6.0", "sim1/CARD-1.1.9.0","sim1/CARD-1.1.8.0"}); + JSONObject c41 = c4.getJSONObject("children").getJSONObject("sim1/CARD-1.1.1.0"); + JSONObject c42 = c4.getJSONObject("children").getJSONObject("sim1/CARD-1.1.5.0"); + JSONObject c43 = c4.getJSONObject("children").getJSONObject("sim1/CARD-1.1.7.0"); + JSONObject c44 = c4.getJSONObject("children").getJSONObject("sim1/CARD-1.1.6.0"); + JSONObject c45 = c4.getJSONObject("children").getJSONObject("sim1/CARD-1.1.9.0"); + JSONObject c46 = c4.getJSONObject("children").getJSONObject("sim1/CARD-1.1.8.0"); + JSONAssert.assertContainsExactKeys(c41.getJSONObject("children"),new String[] {"sim1/a2.module-1.1.1.7","sim1/a2.module-1.1.1.5","sim1/a2.module-1.1.1.8"}); + JSONAssert.assertContainsExactKeys(c42.getJSONObject("children"),new String[] {"sim1/a2.module-1.1.5.6","sim1/a2.module-1.1.5.5"}); + JSONAssert.assertContainsNoKeys(c43.getJSONObject("children")); + JSONAssert.assertContainsExactKeys(c44.getJSONObject("children"),new String[] {"sim1/a2.module-1.1.6.5"}); + JSONAssert.assertContainsNoKeys(c45.getJSONObject("children")); + JSONAssert.assertContainsNoKeys(c46.getJSONObject("children")); + } @Test public void testUriConversion() { EntityWithTree e = DataTreeHttpServlet.getEntity("/tree/read-inventoryequipment-tree/sim1/sim1%2FODU"); diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/util/HostInfoForTest.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/util/HostInfoForTest.java index 8ea4b13aa..bd7e8ce5d 100644 --- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/util/HostInfoForTest.java +++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/util/HostInfoForTest.java @@ -41,7 +41,7 @@ public class HostInfoForTest { int port; String portAsString = System.getProperty("databaseport"); - if (portAsString == null | portAsString.isEmpty()) + if (portAsString == null || portAsString.isEmpty()) port = 49200; else port = Integer.valueOf(portAsString); diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/1.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/1.json new file mode 100644 index 000000000..bcf5e1d0a --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/1.json @@ -0,0 +1,17 @@ + { + "description": "WS/p8.module/a2.module#5", + "date": "2013-04-13T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.1.5.5", + "parent-uuid": "CARD-1.1.5.0", + "contained-holder": [ + "SUBRACK-1.55.0.0" + ], + "tree-level": 2, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "310330015", + "part-type-id": "3EM23141AD01", + "model-identifier": "CRPQABVFAA", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/10.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/10.json new file mode 100644 index 000000000..6eed5d6a8 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/10.json @@ -0,0 +1,15 @@ + { + "description": "MWR#56Ch#1/a2.moduletraff", + "date": "2017-09-09T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.56.1.2", + "parent-uuid": "ODU-1.56.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "Serial1", + "part-type-id": "Partnumber", + "model-identifier": "model-id", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/11.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/11.json new file mode 100644 index 000000000..46a4d0650 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/11.json @@ -0,0 +1,18 @@ + { + "description": "MWR-ng Dir#6.5-Ch#1", + "date": "2014-01-16T00:00:00.0Z", + "version": "MWR-ng", + "node-id": "sim1", + "uuid": "IDU-1.65.0.0", + "parent-uuid": "network-element", + "contained-holder": [ + "PORT-1.65.1.4", + "PORT-1.65.1.2" + ], + "tree-level": 0, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "WAUZZI", + "part-type-id": "3DB76047BAAA02", + "model-identifier": "model-id-s3s", + "type-name": "MWR-ng" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/12.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/12.json new file mode 100644 index 000000000..02d592e56 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/12.json @@ -0,0 +1,15 @@ + { + "description": "MWR#55Ch#0/RxDiv", + "date": "2014-01-08T00:00:00.0Z", + "version": "2017", + "node-id": "sim1", + "uuid": "CARD-1.65.1.4", + "parent-uuid": "IDU-1.65.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "Serie2017-13", + "part-type-id": "partNo2017-12", + "model-identifier": "model-id-s3s", + "type-name": "RxDiv" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/13.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/13.json new file mode 100644 index 000000000..85c3723b7 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/13.json @@ -0,0 +1,20 @@ + { + "description": "WS/p8.module", + "date": "2013-11-23T00:00:00.0Z", + "version": "234", + "node-id": "sim1", + "uuid": "CARD-1.1.6.0", + "parent-uuid": "SHELF-1.1.0.0", + "contained-holder": [ + "PORT-1.1.6.5", + "PORT-1.1.6.7", + "PORT-1.1.6.6", + "PORT-1.1.6.8" + ], + "tree-level": 1, + "manufacturer-identifier": "SAN", + "serial": "serial-number-124", + "part-type-id": "part-number-12", + "model-identifier": "model-id-12", + "type-name": "p8.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/14.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/14.json new file mode 100644 index 000000000..1fa236e10 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/14.json @@ -0,0 +1,15 @@ +{ + "description": "WS/DS3", + "date": "2008-10-21T00:00:00.0Z", + "version": "unknown", + "node-id": "sim1", + "uuid": "CARD-1.1.8.0", + "parent-uuid": "SHELF-1.1.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "sd-dsa-eqw", + "part-type-id": "unknown", + "model-identifier": "model-id-s3s", + "type-name": "p4.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/15.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/15.json new file mode 100644 index 000000000..ff40c4e8b --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/15.json @@ -0,0 +1,15 @@ +{ + "description": "WS/wind", + "date": "2007-02-19T00:00:00.0Z", + "version": "wind", + "node-id": "sim1", + "uuid": "CARD-1.1.9.0", + "parent-uuid": "SHELF-1.1.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "CIT", + "serial": "proto-type", + "part-type-id": "party-yea", + "model-identifier": "model-id-s3s", + "type-name": "wind" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/16.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/16.json new file mode 100644 index 000000000..fbd62e04d --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/16.json @@ -0,0 +1,15 @@ + { + "description": "MWR#55Ch#1/RxDiv", + "date": "2014-01-07T00:00:00.0Z", + "version": "2017", + "node-id": "sim1", + "uuid": "CARD-1.55.1.4", + "parent-uuid": "IDU-1.55.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "Serie2017-12", + "part-type-id": "partNo2017-12", + "model-identifier": "model-id-s3s", + "type-name": "RxDiv" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/17.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/17.json new file mode 100644 index 000000000..1704468f3 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/17.json @@ -0,0 +1,17 @@ +{ + "description": "WS/CORE-MAIN/a2.module#7", + "date": "2009-01-19T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.1.1.7", + "parent-uuid": "CARD-1.1.1.0", + "contained-holder": [ + "SUBRACK-1.17.0.0" + ], + "tree-level": 2, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "91T403003322", + "part-type-id": "1AB187280031", + "model-identifier": "mod2", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/18.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/18.json new file mode 100644 index 000000000..eaec335b4 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/18.json @@ -0,0 +1,18 @@ + { + "description": "MWR-ng Dir#5.5-Ch#1", + "date": "2014-01-15T00:00:00.0Z", + "version": "MWR-ng", + "node-id": "sim1", + "uuid": "IDU-1.55.0.0", + "parent-uuid": "network-element", + "contained-holder": [ + "PORT-1.55.1.2", + "PORT-1.55.1.4" + ], + "tree-level": 0, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "Serie2017-14", + "part-type-id": "3DB76047BAAA02", + "model-identifier": "model-id-s3s", + "type-name": "MWR-ng" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/19.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/19.json new file mode 100644 index 000000000..9a7eb62a7 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/19.json @@ -0,0 +1,20 @@ + { + "description": "WS/CORE-MAIN", + "date": "2015-08-17T00:00:00.0Z", + "version": "123", + "node-id": "sim1", + "uuid": "CARD-1.1.1.0", + "parent-uuid": "SHELF-1.1.0.0", + "contained-holder": [ + "PORT-1.1.1.6", + "PORT-1.1.1.5", + "PORT-1.1.1.8", + "PORT-1.1.1.7" + ], + "tree-level": 1, + "manufacturer-identifier": "SAN", + "serial": "asdf-asdasd-asd", + "part-type-id": "part-number-2", + "model-identifier": "model-id-2", + "type-name": "latest" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/2.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/2.json new file mode 100644 index 000000000..ff352653a --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/2.json @@ -0,0 +1,15 @@ + { + "description": "WS/DS1", + "date": "2007-08-27T00:00:00.0Z", + "version": "p1.module", + "node-id": "sim1", + "uuid": "CARD-1.1.7.0", + "parent-uuid": "SHELF-1.1.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "CIT", + "serial": "serial-number-s3s", + "part-type-id": "part-number-s3s", + "model-identifier": "model-id-s3s", + "type-name": "p1.module_A" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/20.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/20.json new file mode 100644 index 000000000..179794027 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/20.json @@ -0,0 +1,20 @@ + { + "description": "WS/p8.module", + "date": "2013-10-21T00:00:00.0Z", + "version": "234", + "node-id": "sim1", + "uuid": "CARD-1.1.5.0", + "parent-uuid": "SHELF-1.1.0.0", + "contained-holder": [ + "PORT-1.1.5.6", + "PORT-1.1.5.5", + "PORT-1.1.5.8", + "PORT-1.1.5.7" + ], + "tree-level": 1, + "manufacturer-identifier": "SAN", + "serial": "africa", + "part-type-id": "part-number-12", + "model-identifier": "model-id-12", + "type-name": "p8.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/21.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/21.json new file mode 100644 index 000000000..c76d6715e --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/21.json @@ -0,0 +1,17 @@ +{ + "description": "WS/p8.module/a2.module#6", + "date": "", + "version": "", + "node-id": "sim1", + "uuid": "a2.module-1.1.5.6", + "parent-uuid": "CARD-1.1.5.0", + "contained-holder": [ + "SUBRACK-1.56.0.0" + ], + "tree-level": 2, + "manufacturer-identifier": "", + "serial": "", + "part-type-id": "", + "model-identifier": "", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/3.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/3.json new file mode 100644 index 000000000..1dc6dfce2 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/3.json @@ -0,0 +1,15 @@ +{ + "description": "MWR#55Ch#1/a2.moduletraff", + "date": "2013-04-13T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.55.1.2", + "parent-uuid": "IDU-1.55.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "310330015", + "part-type-id": "3EM23141AD01", + "model-identifier": "CRPQABVFAA", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/4.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/4.json new file mode 100644 index 000000000..ab1132692 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/4.json @@ -0,0 +1,15 @@ + { + "description": "MWR#65Ch#1/a2.moduletraff", + "date": "2013-04-13T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.65.1.2", + "parent-uuid": "IDU-1.65.0.0", + "contained-holder": [], + "tree-level": 1, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "310330008", + "part-type-id": "3EM23141AD01", + "model-identifier": "CRPQABVFAA", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/5.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/5.json new file mode 100644 index 000000000..e54173fe6 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/5.json @@ -0,0 +1,25 @@ +{ + "description": "WS-8", + "date": "2017-09-09T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "SHELF-1.1.0.0", + "parent-uuid": "network-element", + "contained-holder": [ + "SLOT-1.1.1.0", + "SLOT-1.1.2.0", + "SLOT-1.1.3.0", + "SLOT-1.1.4.0", + "SLOT-1.1.5.0", + "SLOT-1.1.6.0", + "SLOT-1.1.7.0", + "SLOT-1.1.8.0", + "SLOT-1.1.9.0" + ], + "tree-level": 0, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "Serial1", + "part-type-id": "Partnumber", + "model-identifier": "model-id", + "type-name": "WS-8" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/6.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/6.json new file mode 100644 index 000000000..8486033b0 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/6.json @@ -0,0 +1,17 @@ + { + "description": "WS/CORE-MAIN/a2.module#5", + "date": "2005-11-09T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.1.1.5", + "parent-uuid": "CARD-1.1.1.0", + "contained-holder": [ + "SUBRACK-1.15.0.0" + ], + "tree-level": 2, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "0003548168", + "part-type-id": "3FE25774AA01", + "model-identifier": "VAUIAEYAAA", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/7.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/7.json new file mode 100644 index 000000000..5c583bec7 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/7.json @@ -0,0 +1,17 @@ +{ + "description": "WS/CORE-MAIN/a2.module#8", + "date": "2010-02-05T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.1.1.8", + "parent-uuid": "CARD-1.1.1.0", + "contained-holder": [ + "SUBRACK-1.18.0.0" + ], + "tree-level": 2, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "01T441601301", + "part-type-id": "1AB376720002", + "model-identifier": "NGI7AMLMAA", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/8.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/8.json new file mode 100644 index 000000000..a86819a7d --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/8.json @@ -0,0 +1,17 @@ +{ + "description": "WS/p8.module/a2.module#5", + "date": "2013-04-13T00:00:00.0Z", + "version": "a2.module-newest", + "node-id": "sim1", + "uuid": "a2.module-1.1.6.5", + "parent-uuid": "CARD-1.1.6.0", + "contained-holder": [ + "SUBRACK-1.65.0.0" + ], + "tree-level": 2, + "manufacturer-identifier": "ONF-Wireless-Transport", + "serial": "310330008", + "part-type-id": "3EM23141AD01", + "model-identifier": "CRPQABVFAA", + "type-name": "a2.module" +} \ No newline at end of file diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/9.json b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/9.json new file mode 100644 index 000000000..914033bb4 --- /dev/null +++ b/sdnr/wt/data-provider/provider/src/test/resources/testequipment/9.json @@ -0,0 +1,19 @@ + { + "description": "MWR-hyper Dir#5.6-Ch#1", + "date": "", + "version": "extrem-hyper", + "node-id": "sim1", + "uuid": "ODU-1.56.0.0", + "parent-uuid": "network-element", + "contained-holder": [ + "PORT-1.56.1.2", + "PORT-1.56.1.3", + "PORT-1.56.1.4" + ], + "tree-level": 0, + "manufacturer-identifier": "", + "serial": "", + "part-type-id": "", + "model-identifier": "", + "type-name": "MWR-hyper" +} \ No newline at end of file diff --git a/sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types.yang b/sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types.yang deleted file mode 100644 index 78dd8934e..000000000 --- a/sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types.yang +++ /dev/null @@ -1,680 +0,0 @@ -module org-openroadm-pm-types { - namespace "http://org/openroadm/pm-types"; - prefix org-openroadm-pm-types; - - organization - "Open ROADM MSA"; - contact - "OpenROADM.org"; - description - "YANG definitions of performance management types. - - Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, - All other rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - * Neither the Members of the Open ROADM MSA Agreement nor the names of its - contributors may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS'' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE"; - - revision 2019-11-29 { - description - "Version 6.1.0"; - } - revision 2019-03-29 { - description - "Version 5.0.0"; - } - revision 2018-11-30 { - description - "Version 4.1.0"; - } - revision 2017-12-15 { - description - "Version 2.2"; - } - revision 2017-09-29 { - description - "Version 2.1"; - } - revision 2017-06-26 { - description - "Version 2.0"; - } - revision 2016-10-14 { - description - "Version 1.2"; - } - - typedef pm-granularity { - type enumeration { - enum notApplicable { - value 1; - description - "This is for total statistic counters on devices that support - them."; - } - enum 15min { - value 2; - } - enum 24Hour { - value 3; - } - } - description - "Granularity of PM bin"; - } - - typedef pm-data-type { - type union { - type uint64; - type int64; - type decimal64 { - fraction-digits 2; - } - type decimal64 { - fraction-digits 17; - } - } - } - - typedef validity { - type enumeration { - enum complete { - value 1; - } - enum partial { - value 2; - } - enum suspect { - value 3; - } - } - description - "Validity of data"; - } - - typedef pm-names-enum { - type enumeration { - enum vendorExtension { - value 1; - description - "vendor extension"; - } - enum bitErrorRate { - value 2; - description - "Bit error rate (BER)"; - } - enum opticalPowerOutput { - value 3; - description - "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalReturnLoss { - value 4; - description - "Optical Return Loss (ORL-OTS) - at MW port(s) B"; - } - enum opticalPowerInput { - value 5; - description - "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power"; - } - enum codeViolations { - value 8; - description - "Code Violations (CV)"; - } - enum erroredSeconds { - value 9; - description - "Errored Seconds (ES)"; - } - enum severelyErroredSeconds { - value 10; - description - "Severely Errored Seconds (SES)"; - } - enum unavailableSeconds { - value 11; - description - "Unavailable Seconds (UAS)"; - } - enum inFrames { - value 12; - description - "In frames (INFRAMES-E)"; - } - enum inFramesErrored { - value 13; - description - "In frames errored (INFRAMESERR-E)"; - } - enum outFrames { - value 14; - description - "Out frames (OUTFRAMES-E)"; - } - enum erroredSecondsEthernet { - value 15; - description - "Errored Seconds Ethernet (ES-E)"; - } - enum severelyErroredSecondsEthernet { - value 16; - description - "Severely Errored Seconds, Ethernet (SES-E)"; - } - enum unavailableSecondsEthernet { - value 17; - description - "Unavailable Seconds, Ethernet (UAS-E)"; - } - enum erroredBlockCount { - value 18; - description - "Errored block count"; - } - enum delay { - value 19; - description - "Number of frames between a DMValue toggle event and the received DMp signal value toggle event"; - } - enum defectSeconds { - value 20; - description - "Defect Seconds (DS)"; - } - enum backwardIncomingAlignmentError { - value 21; - description - "Backward Incoming Alignment Error (BIAE)"; - } - enum incomingAlignmentError { - value 22; - description - "Incoming Alignment Error (IAE)"; - } - enum opticalPowerOutputMin { - value 23; - description - "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalPowerOutputMax { - value 24; - description - "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalPowerOutputAvg { - value 25; - description - "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; - } - enum opticalPowerInputMin { - value 26; - description - "Minimum Optical Power Input (OPIN-OTS). Total optical power"; - } - enum opticalPowerInputMax { - value 27; - description - "Maximum Optical Power Input (OPIN-OTS). Total optical power"; - } - enum opticalPowerInputAvg { - value 28; - description - "Average Optical Power Input (OPIN-OTS). Total optical power"; - } - enum opticalPowerOutputOSC { - value 29; - description - "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerOutputOSCMin { - value 30; - description - "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerOutputOSCMax { - value 31; - description - "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerOutputOSCAvg { - value 32; - description - "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; - } - enum opticalPowerInputOSC { - value 33; - description - "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum opticalPowerInputOSCMin { - value 34; - description - "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum opticalPowerInputOSCMax { - value 35; - description - "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum opticalPowerInputOSCAvg { - value 36; - description - "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; - } - enum preFECCorrectedErrors { - value 37; - description - "pFEC corrected Errors"; - } - enum totalOpticalPowerInput { - value 38; - description - "Total Optical Power Input."; - } - enum totalOpticalPowerInputMin { - value 39; - description - "Minimum Total Optical Power Input."; - } - enum totalOpticalPowerInputMax { - value 40; - description - "Maximum Total Optical Power Input."; - } - enum totalOpticalPowerInputAvg { - value 41; - description - "Average Total Optical Power Input."; - } - enum FECCorrectableBlocks { - value 42; - description - "FEC Correctable Blocks."; - } - enum FECUncorrectableBlocks { - value 43; - description - "FEC Uncorrectable Blocks."; - } - enum BIPErrorCounter { - value 56; - description - "BIP Error Counter"; - } - enum protectionSwitchingCount { - value 57; - description - "Protection Switching Count (PSC)"; - } - enum protectionSwitchingDuration { - value 58; - description - "Protection Switching Duration in seconds (PSD)"; - } - enum erroredBlockCountTCM1-up { - value 59; - description - "errored Blocks Count on TCM1 up direction."; - } - enum erroredBlockCountTCM2-up { - value 60; - description - "errored Blocks Count on TCM2 up direction."; - } - enum erroredBlockCountTCM3-up { - value 61; - description - "errored Blocks Count on TCM3 up direction."; - } - enum erroredBlockCountTCM4-up { - value 62; - description - "errored Blocks Count on TCM4 up direction."; - } - enum erroredBlockCountTCM5-up { - value 63; - description - "errored Blocks Count on TCM5 up direction."; - } - enum erroredBlockCountTCM6-up { - value 64; - description - "errored Blocks Count on TCM6 up direction."; - } - enum delayTCM1-up { - value 65; - description - "Delay on TCM1 up direction."; - } - enum delayTCM2-up { - value 66; - description - "Delay on TCM2 up direction."; - } - enum delayTCM3-up { - value 67; - description - "Delay on TCM3 up direction."; - } - enum delayTCM4-up { - value 68; - description - "Delay on TCM4 up direction."; - } - enum delayTCM5-up { - value 69; - description - "Delay on TCM5 up direction."; - } - enum delayTCM6-up { - value 70; - description - "Delay on TCM6 up direction."; - } - enum erroredBlockCountTCM1-down { - value 71; - description - "errored Blocks Count on TCM1 down direction."; - } - enum erroredBlockCountTCM2-down { - value 72; - description - "errored Blocks Count on TCM2 down direction."; - } - enum erroredBlockCountTCM3-down { - value 73; - description - "errored Blocks Count on TCM3 down direction."; - } - enum erroredBlockCountTCM4-down { - value 74; - description - "errored Blocks Count on TCM4 down direction."; - } - enum erroredBlockCountTCM5-down { - value 75; - description - "errored Blocks Count on TCM5 down direction."; - } - enum erroredBlockCountTCM6-down { - value 76; - description - "errored Blocks Count on TCM6 down direction."; - } - enum delayTCM1-down { - value 77; - description - "Delay on TCM1 down direction."; - } - enum delayTCM2-down { - value 78; - description - "Delay on TCM2 down direction."; - } - enum delayTCM3-down { - value 79; - description - "Delay on TCM3 down direction."; - } - enum delayTCM4-down { - value 80; - description - "Delay on TCM4 down direction."; - } - enum delayTCM5-down { - value 81; - description - "Delay on TCM5 down direction."; - } - enum delayTCM6-down { - value 82; - description - "Delay on TCM6 down direction."; - } - enum partialRateDiscard { - value 83; - description - "Discarded packet as a result of policing or rate limiting for subrate ethernet."; - } - enum erroredSecondsTCM1-up { - value 84; - description - "errored Seconds Count on TCM1 up direction."; - } - enum erroredSecondsTCM2-up { - value 85; - description - "errored Seconds Count on TCM2 up direction."; - } - enum erroredSecondsTCM3-up { - value 86; - description - "errored Seconds Count on TCM3 up direction."; - } - enum erroredSecondsTCM4-up { - value 87; - description - "errored Seconds Count on TCM4 up direction."; - } - enum erroredSecondsTCM5-up { - value 88; - description - "errored Seconds Count on TCM5 up direction."; - } - enum erroredSecondsTCM6-up { - value 89; - description - "errored Seconds Count on TCM6 up direction."; - } - enum severelyErroredSecondsTCM1-up { - value 90; - description - "severely Errored Seconds Count on TCM1 up direction."; - } - enum severelyErroredSecondsTCM2-up { - value 91; - description - "severely Errored Seconds Count on TCM2 up direction."; - } - enum severelyErroredSecondsTCM3-up { - value 92; - description - "severely Errored Seconds Count on TCM3 up direction."; - } - enum severelyErroredSecondsTCM4-up { - value 93; - description - "severely Errored Seconds Count on TCM4 up direction."; - } - enum severelyErroredSecondsTCM5-up { - value 94; - description - "severely Errored Seconds Count on TCM5 up direction."; - } - enum severelyErroredSecondsTCM6-up { - value 95; - description - "severely Errored Seconds Count on TCM6 up direction."; - } - enum unavailableSecondsTCM1-up { - value 96; - description - "unavailable Seconds Count on TCM1 up direction."; - } - enum unavailableSecondsTCM2-up { - value 97; - description - "unavailable Seconds Count on TCM2 up direction."; - } - enum unavailableSecondsTCM3-up { - value 98; - description - "unavailable Seconds Count on TCM3 up direction."; - } - enum unavailableSecondsTCM4-up { - value 99; - description - "unavailable Seconds Count on TCM4 up direction."; - } - enum unavailableSecondsTCM5-up { - value 100; - description - "unavailable Seconds Count on TCM5 up direction."; - } - enum unavailableSecondsTCM6-up { - value 101; - description - "unavailable Seconds Count on TCM6 up direction."; - } - enum erroredSecondsTCM1-down { - value 102; - description - "errored Seconds Count on TCM1 down direction."; - } - enum erroredSecondsTCM2-down { - value 103; - description - "errored Seconds Count on TCM2 down direction."; - } - enum erroredSecondsTCM3-down { - value 104; - description - "errored Seconds Count on TCM3 down direction."; - } - enum erroredSecondsTCM4-down { - value 105; - description - "errored Seconds Count on TCM4 down direction."; - } - enum erroredSecondsTCM5-down { - value 106; - description - "errored Seconds Count on TCM5 down direction."; - } - enum erroredSecondsTCM6-down { - value 107; - description - "errored Seconds Count on TCM6 down direction."; - } - enum severelyErroredSecondsTCM1-down { - value 108; - description - "severely Errored Seconds Count on TCM1 down direction."; - } - enum severelyErroredSecondsTCM2-down { - value 109; - description - "severely Errored Seconds Count on TCM2 down direction."; - } - enum severelyErroredSecondsTCM3-down { - value 110; - description - "severely Errored Seconds Count on TCM3 down direction."; - } - enum severelyErroredSecondsTCM4-down { - value 111; - description - "severely Errored Seconds Count on TCM4 down direction."; - } - enum severelyErroredSecondsTCM5-down { - value 112; - description - "severely Errored Seconds Count on TCM5 down direction."; - } - enum severelyErroredSecondsTCM6-down { - value 113; - description - "severely Errored Seconds Count on TCM6 down direction."; - } - enum unavailableSecondsTCM1-down { - value 114; - description - "unavailable Seconds Count on TCM1 down direction."; - } - enum unavailableSecondsTCM2-down { - value 115; - description - "unavailable Seconds Count on TCM2 down direction."; - } - enum unavailableSecondsTCM3-down { - value 116; - description - "unavailable Seconds Count on TCM3 down direction."; - } - enum unavailableSecondsTCM4-down { - value 117; - description - "unavailable Seconds Count on TCM4 down direction."; - } - enum unavailableSecondsTCM5-down { - value 118; - description - "unavailable Seconds Count on TCM5 down direction."; - } - enum unavailableSecondsTCM6-down { - value 119; - description - "unavailable Seconds Count on TCM6 down direction."; - } - } - } - - grouping pm-measurement { - description - "Set of parameters related to a PM Measurement"; - leaf pmParameterValue { - type pm-data-type; - config false; - mandatory true; - } - leaf pmParameterUnit { - type string; - mandatory false; - description - "Unit PM parameter has been measured - frames, packets, u, etc"; - } - leaf validity { - type validity; - mandatory false; - } - } - - grouping pm-names { - description - "Name of PM parameter. Consists of a set list of parameters, - plus an extension field to support addition parameters."; - leaf type { - type pm-names-enum; - mandatory true; - } - leaf extension { - type string; - description - "name of parameter, when enum value set to vendorExtension because - name not found in pm-names-enum"; - } - } -} diff --git a/sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types@2019-11-29.yang b/sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types@2019-11-29.yang new file mode 100644 index 000000000..78dd8934e --- /dev/null +++ b/sdnr/wt/devicemanager-openroadm/provider/src/main/yang/org-openroadm-pm-types@2019-11-29.yang @@ -0,0 +1,680 @@ +module org-openroadm-pm-types { + namespace "http://org/openroadm/pm-types"; + prefix org-openroadm-pm-types; + + organization + "Open ROADM MSA"; + contact + "OpenROADM.org"; + description + "YANG definitions of performance management types. + + Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, + All other rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + * Neither the Members of the Open ROADM MSA Agreement nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS'' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE"; + + revision 2019-11-29 { + description + "Version 6.1.0"; + } + revision 2019-03-29 { + description + "Version 5.0.0"; + } + revision 2018-11-30 { + description + "Version 4.1.0"; + } + revision 2017-12-15 { + description + "Version 2.2"; + } + revision 2017-09-29 { + description + "Version 2.1"; + } + revision 2017-06-26 { + description + "Version 2.0"; + } + revision 2016-10-14 { + description + "Version 1.2"; + } + + typedef pm-granularity { + type enumeration { + enum notApplicable { + value 1; + description + "This is for total statistic counters on devices that support + them."; + } + enum 15min { + value 2; + } + enum 24Hour { + value 3; + } + } + description + "Granularity of PM bin"; + } + + typedef pm-data-type { + type union { + type uint64; + type int64; + type decimal64 { + fraction-digits 2; + } + type decimal64 { + fraction-digits 17; + } + } + } + + typedef validity { + type enumeration { + enum complete { + value 1; + } + enum partial { + value 2; + } + enum suspect { + value 3; + } + } + description + "Validity of data"; + } + + typedef pm-names-enum { + type enumeration { + enum vendorExtension { + value 1; + description + "vendor extension"; + } + enum bitErrorRate { + value 2; + description + "Bit error rate (BER)"; + } + enum opticalPowerOutput { + value 3; + description + "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalReturnLoss { + value 4; + description + "Optical Return Loss (ORL-OTS) - at MW port(s) B"; + } + enum opticalPowerInput { + value 5; + description + "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power"; + } + enum codeViolations { + value 8; + description + "Code Violations (CV)"; + } + enum erroredSeconds { + value 9; + description + "Errored Seconds (ES)"; + } + enum severelyErroredSeconds { + value 10; + description + "Severely Errored Seconds (SES)"; + } + enum unavailableSeconds { + value 11; + description + "Unavailable Seconds (UAS)"; + } + enum inFrames { + value 12; + description + "In frames (INFRAMES-E)"; + } + enum inFramesErrored { + value 13; + description + "In frames errored (INFRAMESERR-E)"; + } + enum outFrames { + value 14; + description + "Out frames (OUTFRAMES-E)"; + } + enum erroredSecondsEthernet { + value 15; + description + "Errored Seconds Ethernet (ES-E)"; + } + enum severelyErroredSecondsEthernet { + value 16; + description + "Severely Errored Seconds, Ethernet (SES-E)"; + } + enum unavailableSecondsEthernet { + value 17; + description + "Unavailable Seconds, Ethernet (UAS-E)"; + } + enum erroredBlockCount { + value 18; + description + "Errored block count"; + } + enum delay { + value 19; + description + "Number of frames between a DMValue toggle event and the received DMp signal value toggle event"; + } + enum defectSeconds { + value 20; + description + "Defect Seconds (DS)"; + } + enum backwardIncomingAlignmentError { + value 21; + description + "Backward Incoming Alignment Error (BIAE)"; + } + enum incomingAlignmentError { + value 22; + description + "Incoming Alignment Error (IAE)"; + } + enum opticalPowerOutputMin { + value 23; + description + "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalPowerOutputMax { + value 24; + description + "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalPowerOutputAvg { + value 25; + description + "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation"; + } + enum opticalPowerInputMin { + value 26; + description + "Minimum Optical Power Input (OPIN-OTS). Total optical power"; + } + enum opticalPowerInputMax { + value 27; + description + "Maximum Optical Power Input (OPIN-OTS). Total optical power"; + } + enum opticalPowerInputAvg { + value 28; + description + "Average Optical Power Input (OPIN-OTS). Total optical power"; + } + enum opticalPowerOutputOSC { + value 29; + description + "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerOutputOSCMin { + value 30; + description + "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerOutputOSCMax { + value 31; + description + "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerOutputOSCAvg { + value 32; + description + "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port"; + } + enum opticalPowerInputOSC { + value 33; + description + "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum opticalPowerInputOSCMin { + value 34; + description + "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum opticalPowerInputOSCMax { + value 35; + description + "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum opticalPowerInputOSCAvg { + value 36; + description + "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port"; + } + enum preFECCorrectedErrors { + value 37; + description + "pFEC corrected Errors"; + } + enum totalOpticalPowerInput { + value 38; + description + "Total Optical Power Input."; + } + enum totalOpticalPowerInputMin { + value 39; + description + "Minimum Total Optical Power Input."; + } + enum totalOpticalPowerInputMax { + value 40; + description + "Maximum Total Optical Power Input."; + } + enum totalOpticalPowerInputAvg { + value 41; + description + "Average Total Optical Power Input."; + } + enum FECCorrectableBlocks { + value 42; + description + "FEC Correctable Blocks."; + } + enum FECUncorrectableBlocks { + value 43; + description + "FEC Uncorrectable Blocks."; + } + enum BIPErrorCounter { + value 56; + description + "BIP Error Counter"; + } + enum protectionSwitchingCount { + value 57; + description + "Protection Switching Count (PSC)"; + } + enum protectionSwitchingDuration { + value 58; + description + "Protection Switching Duration in seconds (PSD)"; + } + enum erroredBlockCountTCM1-up { + value 59; + description + "errored Blocks Count on TCM1 up direction."; + } + enum erroredBlockCountTCM2-up { + value 60; + description + "errored Blocks Count on TCM2 up direction."; + } + enum erroredBlockCountTCM3-up { + value 61; + description + "errored Blocks Count on TCM3 up direction."; + } + enum erroredBlockCountTCM4-up { + value 62; + description + "errored Blocks Count on TCM4 up direction."; + } + enum erroredBlockCountTCM5-up { + value 63; + description + "errored Blocks Count on TCM5 up direction."; + } + enum erroredBlockCountTCM6-up { + value 64; + description + "errored Blocks Count on TCM6 up direction."; + } + enum delayTCM1-up { + value 65; + description + "Delay on TCM1 up direction."; + } + enum delayTCM2-up { + value 66; + description + "Delay on TCM2 up direction."; + } + enum delayTCM3-up { + value 67; + description + "Delay on TCM3 up direction."; + } + enum delayTCM4-up { + value 68; + description + "Delay on TCM4 up direction."; + } + enum delayTCM5-up { + value 69; + description + "Delay on TCM5 up direction."; + } + enum delayTCM6-up { + value 70; + description + "Delay on TCM6 up direction."; + } + enum erroredBlockCountTCM1-down { + value 71; + description + "errored Blocks Count on TCM1 down direction."; + } + enum erroredBlockCountTCM2-down { + value 72; + description + "errored Blocks Count on TCM2 down direction."; + } + enum erroredBlockCountTCM3-down { + value 73; + description + "errored Blocks Count on TCM3 down direction."; + } + enum erroredBlockCountTCM4-down { + value 74; + description + "errored Blocks Count on TCM4 down direction."; + } + enum erroredBlockCountTCM5-down { + value 75; + description + "errored Blocks Count on TCM5 down direction."; + } + enum erroredBlockCountTCM6-down { + value 76; + description + "errored Blocks Count on TCM6 down direction."; + } + enum delayTCM1-down { + value 77; + description + "Delay on TCM1 down direction."; + } + enum delayTCM2-down { + value 78; + description + "Delay on TCM2 down direction."; + } + enum delayTCM3-down { + value 79; + description + "Delay on TCM3 down direction."; + } + enum delayTCM4-down { + value 80; + description + "Delay on TCM4 down direction."; + } + enum delayTCM5-down { + value 81; + description + "Delay on TCM5 down direction."; + } + enum delayTCM6-down { + value 82; + description + "Delay on TCM6 down direction."; + } + enum partialRateDiscard { + value 83; + description + "Discarded packet as a result of policing or rate limiting for subrate ethernet."; + } + enum erroredSecondsTCM1-up { + value 84; + description + "errored Seconds Count on TCM1 up direction."; + } + enum erroredSecondsTCM2-up { + value 85; + description + "errored Seconds Count on TCM2 up direction."; + } + enum erroredSecondsTCM3-up { + value 86; + description + "errored Seconds Count on TCM3 up direction."; + } + enum erroredSecondsTCM4-up { + value 87; + description + "errored Seconds Count on TCM4 up direction."; + } + enum erroredSecondsTCM5-up { + value 88; + description + "errored Seconds Count on TCM5 up direction."; + } + enum erroredSecondsTCM6-up { + value 89; + description + "errored Seconds Count on TCM6 up direction."; + } + enum severelyErroredSecondsTCM1-up { + value 90; + description + "severely Errored Seconds Count on TCM1 up direction."; + } + enum severelyErroredSecondsTCM2-up { + value 91; + description + "severely Errored Seconds Count on TCM2 up direction."; + } + enum severelyErroredSecondsTCM3-up { + value 92; + description + "severely Errored Seconds Count on TCM3 up direction."; + } + enum severelyErroredSecondsTCM4-up { + value 93; + description + "severely Errored Seconds Count on TCM4 up direction."; + } + enum severelyErroredSecondsTCM5-up { + value 94; + description + "severely Errored Seconds Count on TCM5 up direction."; + } + enum severelyErroredSecondsTCM6-up { + value 95; + description + "severely Errored Seconds Count on TCM6 up direction."; + } + enum unavailableSecondsTCM1-up { + value 96; + description + "unavailable Seconds Count on TCM1 up direction."; + } + enum unavailableSecondsTCM2-up { + value 97; + description + "unavailable Seconds Count on TCM2 up direction."; + } + enum unavailableSecondsTCM3-up { + value 98; + description + "unavailable Seconds Count on TCM3 up direction."; + } + enum unavailableSecondsTCM4-up { + value 99; + description + "unavailable Seconds Count on TCM4 up direction."; + } + enum unavailableSecondsTCM5-up { + value 100; + description + "unavailable Seconds Count on TCM5 up direction."; + } + enum unavailableSecondsTCM6-up { + value 101; + description + "unavailable Seconds Count on TCM6 up direction."; + } + enum erroredSecondsTCM1-down { + value 102; + description + "errored Seconds Count on TCM1 down direction."; + } + enum erroredSecondsTCM2-down { + value 103; + description + "errored Seconds Count on TCM2 down direction."; + } + enum erroredSecondsTCM3-down { + value 104; + description + "errored Seconds Count on TCM3 down direction."; + } + enum erroredSecondsTCM4-down { + value 105; + description + "errored Seconds Count on TCM4 down direction."; + } + enum erroredSecondsTCM5-down { + value 106; + description + "errored Seconds Count on TCM5 down direction."; + } + enum erroredSecondsTCM6-down { + value 107; + description + "errored Seconds Count on TCM6 down direction."; + } + enum severelyErroredSecondsTCM1-down { + value 108; + description + "severely Errored Seconds Count on TCM1 down direction."; + } + enum severelyErroredSecondsTCM2-down { + value 109; + description + "severely Errored Seconds Count on TCM2 down direction."; + } + enum severelyErroredSecondsTCM3-down { + value 110; + description + "severely Errored Seconds Count on TCM3 down direction."; + } + enum severelyErroredSecondsTCM4-down { + value 111; + description + "severely Errored Seconds Count on TCM4 down direction."; + } + enum severelyErroredSecondsTCM5-down { + value 112; + description + "severely Errored Seconds Count on TCM5 down direction."; + } + enum severelyErroredSecondsTCM6-down { + value 113; + description + "severely Errored Seconds Count on TCM6 down direction."; + } + enum unavailableSecondsTCM1-down { + value 114; + description + "unavailable Seconds Count on TCM1 down direction."; + } + enum unavailableSecondsTCM2-down { + value 115; + description + "unavailable Seconds Count on TCM2 down direction."; + } + enum unavailableSecondsTCM3-down { + value 116; + description + "unavailable Seconds Count on TCM3 down direction."; + } + enum unavailableSecondsTCM4-down { + value 117; + description + "unavailable Seconds Count on TCM4 down direction."; + } + enum unavailableSecondsTCM5-down { + value 118; + description + "unavailable Seconds Count on TCM5 down direction."; + } + enum unavailableSecondsTCM6-down { + value 119; + description + "unavailable Seconds Count on TCM6 down direction."; + } + } + } + + grouping pm-measurement { + description + "Set of parameters related to a PM Measurement"; + leaf pmParameterValue { + type pm-data-type; + config false; + mandatory true; + } + leaf pmParameterUnit { + type string; + mandatory false; + description + "Unit PM parameter has been measured - frames, packets, u, etc"; + } + leaf validity { + type validity; + mandatory false; + } + } + + grouping pm-names { + description + "Name of PM parameter. Consists of a set list of parameters, + plus an extension field to support addition parameters."; + leaf type { + type pm-names-enum; + mandatory true; + } + leaf extension { + type string; + description + "name of parameter, when enum value set to vendorExtension because + name not found in pm-names-enum"; + } + } +} -- cgit 1.2.3-korg