aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-platform-linecard.yang
diff options
context:
space:
mode:
authorAndrej Kozemcak <andrej.kozemcak@pantheon.tech>2018-12-20 17:49:33 +0100
committerAndrej Kozemcak <andrej.kozemcak@pantheon.tech>2018-12-20 17:51:10 +0100
commit639509ad42f8bd6baf9b6f5b668a9bbfb05108d4 (patch)
tree83de866d2e47bd71dae0c6ff9e03f51c3269413b /src/plugins/yang/openconfig/openconfig-platform-linecard.yang
parentba089324594f450a1b549906ec7fde1ba63a1e89 (diff)
Add Openconfig YANG modules.
Change-Id: I7e98bf1ca7196cff042a35b8bf096d2ea9d80028 Signed-off-by: Andrej Kozemcak <andrej.kozemcak@pantheon.tech>
Diffstat (limited to 'src/plugins/yang/openconfig/openconfig-platform-linecard.yang')
-rw-r--r--src/plugins/yang/openconfig/openconfig-platform-linecard.yang118
1 files changed, 118 insertions, 0 deletions
diff --git a/src/plugins/yang/openconfig/openconfig-platform-linecard.yang b/src/plugins/yang/openconfig/openconfig-platform-linecard.yang
new file mode 100644
index 0000000..46d9c7f
--- /dev/null
+++ b/src/plugins/yang/openconfig/openconfig-platform-linecard.yang
@@ -0,0 +1,118 @@
+module openconfig-platform-linecard {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/platform/linecard";
+
+ prefix "oc-linecard";
+
+ import openconfig-platform { prefix oc-platform; }
+ import openconfig-platform-types { prefix oc-platform-types; }
+ import openconfig-extensions { prefix oc-ext; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This module defines data related to LINECARD components in
+ the openconfig-platform model";
+
+ oc-ext:openconfig-version "0.1.0";
+
+ revision "2017-08-03" {
+ description
+ "Initial revision";
+ reference "0.1.0";
+ }
+
+ // extension statements
+
+ // feature statements
+
+ // identity statements
+
+ // typedef statements
+
+ // grouping statements
+
+ grouping linecard-config {
+ description
+ "Configuration data for linecard components";
+
+ leaf power-admin-state {
+ type oc-platform-types:component-power-type;
+ default POWER_ENABLED;
+ description
+ "Enable or disable power to the linecard";
+ }
+ }
+
+ grouping linecard-state {
+ description
+ "Operational state data for linecard components";
+
+ leaf slot-id {
+ type string;
+ description
+ "Identifier for the slot or chassis position in which the
+ linecard is installed";
+ }
+ }
+
+ grouping linecard-top {
+ description
+ "Top-level grouping for linecard data";
+
+ container linecard {
+ description
+ "Top-level container for linecard data";
+
+ container config {
+ description
+ "Configuration data for linecards";
+
+ uses linecard-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for linecards";
+
+ uses linecard-config;
+ uses linecard-state;
+ }
+ }
+ }
+
+ // data definition statements
+
+ // augment statements
+
+ augment "/oc-platform:components/oc-platform:component" {
+ description
+ "Adding linecard data to physical inventory";
+
+ uses linecard-top {
+ when "current()/oc-platform:state/" +
+ "oc-platform:type = 'LINECARD'" {
+ description
+ "Augment is active when component is of type LINECARD";
+ }
+ }
+ }
+
+ // rpc statements
+
+ // notification statements
+
+}
+