module ietf-poe-power-management{ namespace "urn:ietf:params:xml:ns:yang:ietf-poe-power-management"; prefix poe-power; import ietf-interfaces { prefix if; } import ieee802-ethernet-interface { prefix eth; } import ieee802-pse { prefix pse; } /**Meta information**/ organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: < http://tools.ietf.org/wg/netmod/ > WG List: WG Chair: Lou Berger WG Chair: Kent Watsen Editor: Yan Zhuang "; description "This module contains YANG defintions for configuring and managing power system for Power Over Ethernet feature defined by IEEE 802.3. It provdes functionality roughly equivalent to that of the POWER-ETHERNET-MIB defined in RFC3621."; revision 2017-03-09{ description "Initial version of power management for IEEE 802.3 PSE."; reference "draft-zhuang-netmod-yang-poe-management-00.txt"; } /*Identities and typedef*/ typedef percentage { type uint8 { range "0..100"; } description "Percentage value in integer format."; } identity poe-port-event { description "Poe port event notification base type."; } identity poe-power-module-event { description "Poe power module event notification base type."; } identity power-usage-alarm { base poe-power-module-event ; description "Base identity for power usage event"; } identity power-status-event { base poe-port-event ; description "Poe port power status change notification."; } identity pd-connection-status-event { base poe-port-event ; description "Poe port peer,the power device status change notification."; } identity power-absence-event { base poe-port-event ; description "Poe port power absence notification."; } identity pd-connection-status { description "Base identity for the PD connnection status"; } identity pd-connected { base pd-connection-status; description "pd is connected"; } identity pd-disconnected { base pd-connection-status; description "pd is disconnected"; } identity pd-class-invalid { base pd-connection-status; description "pd class is invalid"; } identity pd-class-over-current { base pd-connection-status; description "pd class is over current"; } typedef pse-detection-state { type enumeration { enum disabled { value 1; description "PSE disabled"; } enum searching { value 2; description "PSE is searching"; } enum deliveringPower { value 3; description "PSE is delivering power"; } enum fault { value 4; description "PSE fault detected"; } enum test { value 5; description "PSE test mode"; } enum otherFault { value 6; description "PSE implementation specific fault detected"; } } description "detection state of a multi-pair PSE"; reference "IEEE Std 802.3, 30.9.1.1.5"; } /************* PSE port management ******************/ augment "/if:interfaces/if:interface/eth:ethernet/pse:poe-pse"{ description "enable pse port notification"; leaf event-notification-enable { type boolean ; default false ; description "PSE port event notification switch."; } } augment "/if:interfaces/if:interface/eth:ethernet/pse:poe-pse/pse:multi-pair"{ description "configuration of pse port management"; container poe-ports-config { description "configuration for all poe ports."; leaf power-priority { type uint32; description "This object controls the priority of the port from the point of view of a power management algorithm."; } leaf connected-pd-type { type string; description "A manager will set the value of this variable to indicate the type of powered device that is connected to the port. The default value supplied by the agent if no value has ever been set should be a zero-length octet string"; } } } augment "/if:interfaces-state/if:interface/eth:ethernet/pse:poe-pse/pse:multi-pair"{ description "operational state for pse port"; container poe-ports-state { config false; description "operational state for all poe ports."; leaf power-priority { type uint32; description "This object controls the priority of the port from the point of view of a power management algorithm."; } leaf connected-pd-type { type string; description "A manager will set the value of this variable to indicate the type of powered device that is connected to the port. The default value supplied by the agent if no value has ever been set should be a zero-length octet string"; } } } /************** power source management ***************/ /* Poe power module usage alarm configuration */ container main-power-source-config { list main-power-source-entry{ key "slot-id"; description "main power source entry"; leaf slot-id { type uint32; description "Poe power module installed slot."; } leaf usage-threshold { type percentage ; description "The usage threshold expressed in percents for comparing the measured power and initiating an alarm if the threshold is exceeded."; } } description "Configurations of the main power source."; } /*main source operational state*/ container main-power-sources-state { config false; description "operational state for main power source"; list main-power-source-entry { key "slot-id"; description "main power source entry"; leaf slot-id { type uint32; description "Poe power module installed slot."; } container power-info { description "power information of the main power source"; leaf total-power { type decimal64 { fraction-digits 4; } units 'watt'; description "The nominal power of the PSE expressed in Watts"; } leaf reserved-power { type percentage ; description "The percent of power that the system reserved."; } leaf consuming-power { type decimal64 { fraction-digits 4; } units 'watt'; description "Measured usage power"; } leaf remained-power { type decimal64 { fraction-digits 4 ; } units 'watt'; description "total power * (1-reserved power)-consuming Power"; } leaf peak-power { type decimal64 { fraction-digits 4; } units 'watt'; description "the peak power"; } leaf usage-threshold { type percentage ; description "The usage threshold expressed in percents for comparing the measured power and initiating an alarm if the threshold is exceeded."; } } leaf operStatus { type enumeration { enum on { value 1; description "the main pse is on"; } enum off { value 2; description "the main pse is off"; } enum faulty { value 3; description "the main pse is faulty"; } } default on; description "The operational status of the main PSE"; } } } /* * Notifications */ /* * Notifications */ notification poe-port-notification { description "Port event notification when the notification switch is on."; list event { key "if-name event-type"; description "list of events"; leaf if-name { type string ; description "Poe port interface name"; } leaf event-type { type identityref { base poe-port-event ; } description "event type for poe port."; } container event-content { description "Event notification content."; leaf detection-status { when " ../../event-type = 'pse:power-status-event' " ; type pse-detection-state; description "pse detection status"; } leaf pd-connection-events { when " ../../event-type = 'pse:pd-connection-status-event'" ; type identityref { base pd-connection-status; } mandatory true; description "pd connection events"; } } } } notification poe-power-notification { description "power event notification when the notification switch is on."; list event { key "slot-id event-type"; description "list of power events."; leaf slot-id { type uint8 ; description "Slot id of the power source"; } leaf event-type { type identityref { base poe-power-module-event ; } description "event type for main power source."; } container event-content { description "Event notification content."; container power-usage { when " ../../event-type = 'poe-power:power-usage-alarm' " ; description "poe usage event content."; leaf consuming-power { type uint32; mandatory true; description "consuming power"; } leaf usage-threshold { type uint32; description "usage threshold"; } } } } } }