Honeynode test tool
[transportpce.git] / tests / honeynode / honeynode-plugin-api / src / main / yang / org-openroadm-pm@2016-10-14.yang
diff --git a/tests/honeynode/honeynode-plugin-api/src/main/yang/org-openroadm-pm@2016-10-14.yang b/tests/honeynode/honeynode-plugin-api/src/main/yang/org-openroadm-pm@2016-10-14.yang
new file mode 100644 (file)
index 0000000..8a75c58
--- /dev/null
@@ -0,0 +1,189 @@
+module org-openroadm-pm {
+  namespace "http://org/openroadm/pm";
+  prefix org-openroadm-pm;
+
+  import ietf-yang-types {
+    prefix yang;
+  }
+  import org-openroadm-resource {
+    prefix org-openroadm-resource;
+  }
+  import org-openroadm-layerRate {
+    prefix org-openroadm-layerRate;
+  }
+  import org-openroadm-pm-types {
+    prefix org-openroadm-pm-types;
+  }
+
+  organization "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of performance management.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      AT&T Intellectual Property.  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 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping current-pm {
+    description
+      "PM Data with current values - both realtime (granularity=notApplicable) and binned (granularity=15 minute, 24h))";
+    leaf id {
+      type string;
+      mandatory true;
+      config false;
+    }
+    container resource {
+      uses org-openroadm-resource:resource;
+    }
+    container layerRate {
+      uses org-openroadm-layerRate:layer-rate;
+    }
+    list measurements {
+      container measurement {
+        uses org-openroadm-pm-types:pm-measurement;
+      }
+    }
+    leaf retrievalTime {
+      type yang:date-and-time;
+      mandatory true;
+      config false;
+    }
+    leaf granularity {
+      type org-openroadm-pm-types:pm-granularity;
+    }
+  }
+
+  container currentPmlist {
+    description
+      "List of current PMs.";
+    list currentPm {
+      key "id";
+      uses current-pm;
+    }
+    config false;
+  }
+
+  grouping historical-pm {
+    description
+      "PM Data with historical values - binned (granularity=15 minute, 24h))";
+    leaf id {
+      type string;
+      mandatory true;
+      config false;
+    }
+    container resource {
+      uses org-openroadm-resource:resource;
+    }
+    container layerRate {
+      uses org-openroadm-layerRate:layer-rate;
+    }
+    list binned-pm {
+      key "bin-number";
+      uses bin-pm;
+    }
+    leaf granularity {
+      type org-openroadm-pm-types:pm-granularity;
+    }
+  }
+
+  grouping bin-pm {
+    description
+      "PM Data with historical values";
+    leaf bin-number {
+      type uint16 {
+        range "1..max";
+      }
+      mandatory true;
+      config false;
+    }
+    list measurements {
+      container measurement {
+        uses org-openroadm-pm-types:pm-measurement;
+      }
+    }
+    leaf completionTime {
+      type yang:date-and-time;
+      mandatory true;
+      config false;
+    }
+  }
+
+  container historicalPmlist {
+    description
+      "List of historical PM";
+    list historicalPm {
+      key "id";
+      uses historical-pm;
+    }
+    config false;
+  }
+  rpc clear-pm {
+    description "Command to initialize PM data";
+    input {
+      uses org-openroadm-resource:resource;
+      leaf pm-type {
+        default "current";
+        type enumeration {
+          enum "current" {
+            value 1;
+          }
+          enum "all" {
+            value 2;
+          }
+        }
+      }
+      leaf granularity {
+        default "15min";
+        type org-openroadm-pm-types:pm-granularity;
+      }
+    }
+    output {
+      leaf status {
+        type enumeration {
+          enum "Successful" {
+            value 1;
+          }
+          enum "Failed" {
+            value 2;
+          }
+        }
+        mandatory true;
+        description
+          "Successful or Failed";
+      }
+      leaf status-message {
+        type string;
+        description
+          "Gives a more detailed reason for success / failure";
+      }
+    }
+  }
+}