From 639509ad42f8bd6baf9b6f5b668a9bbfb05108d4 Mon Sep 17 00:00:00 2001 From: Andrej Kozemcak Date: Thu, 20 Dec 2018 17:49:33 +0100 Subject: Add Openconfig YANG modules. Change-Id: I7e98bf1ca7196cff042a35b8bf096d2ea9d80028 Signed-off-by: Andrej Kozemcak --- src/plugins/yang/openconfig/openconfig-if-poe.yang | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 src/plugins/yang/openconfig/openconfig-if-poe.yang (limited to 'src/plugins/yang/openconfig/openconfig-if-poe.yang') diff --git a/src/plugins/yang/openconfig/openconfig-if-poe.yang b/src/plugins/yang/openconfig/openconfig-if-poe.yang new file mode 100644 index 0000000..f3c3bf1 --- /dev/null +++ b/src/plugins/yang/openconfig/openconfig-if-poe.yang @@ -0,0 +1,99 @@ +module openconfig-if-poe { + + yang-version "1"; + + namespace "http://openconfig.net/yang/poe"; + + prefix "oc-poe"; + + import openconfig-if-ethernet { prefix oc-eth; } + import openconfig-interfaces { prefix oc-if; } + import openconfig-extensions { prefix oc-ext; } + + organization "OpenConfig working group"; + + contact + "Openconfig working group + www.openconfig.net"; + + description + "This module defines configuration and state data for + Power over Ethernet (PoE) based on the IEEE 802.3af + standard."; + + oc-ext:openconfig-version "0.1.0"; + + revision "2017-09-14" { + description + "Initial public revision"; + reference "0.1.0"; + } + + grouping poe-ethernet-config { + description + "PoE ethernet config grouping"; + + leaf enabled { + type boolean; + default "true"; + description + "Enable or disable PoE in the ethernet interface."; + } + } + + grouping poe-ethernet-state { + description + "PoE ethernet state grouping"; + + leaf power-used { + type decimal64 { + fraction-digits 2; + } + units Watts; + description + "Power used by the ethernet interface in Watts."; + } + + leaf power-class { + type uint8; + description + "IEEE 802.3af Power class detected for this ethernet + interface."; + } + } + + grouping poe-ethernet-top { + description + "Ethernet top level grouping"; + + container poe { + description + "Top-level container for PoE configuration and state data"; + + container config { + description + "Configuration data for PoE"; + + uses poe-ethernet-config; + } + + container state { + config false; + + description + "Operational state data for PoE"; + + uses poe-ethernet-config; + uses poe-ethernet-state; + } + } + } + + augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet" { + description + "Adds PoE to the ethernet model."; + + uses poe-ethernet-top; + } + +} -- cgit 1.2.3-korg