diff options
author | Hongjun Ni <hongjun.ni@intel.com> | 2018-12-21 04:48:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2018-12-21 04:48:35 +0000 |
commit | 8791f3211bd61d213e4ea4a0af66a14bb2e3a239 (patch) | |
tree | 846a89e6ca81d639d024e5509654766d3581b7ea /src/plugins/yang/openconfig/openconfig-platform-psu.yang | |
parent | de7bb8f2b0cdd2dfeba0586213bd415c9bb3fd18 (diff) | |
parent | 639509ad42f8bd6baf9b6f5b668a9bbfb05108d4 (diff) |
Merge "Add Openconfig YANG modules."
Diffstat (limited to 'src/plugins/yang/openconfig/openconfig-platform-psu.yang')
-rw-r--r-- | src/plugins/yang/openconfig/openconfig-platform-psu.yang | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/src/plugins/yang/openconfig/openconfig-platform-psu.yang b/src/plugins/yang/openconfig/openconfig-platform-psu.yang new file mode 100644 index 0000000..eec4caa --- /dev/null +++ b/src/plugins/yang/openconfig/openconfig-platform-psu.yang @@ -0,0 +1,135 @@ +module openconfig-platform-psu { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/platform/psu"; + + prefix "oc-platform-psu"; + + // import some basic types + import openconfig-extensions { prefix oc-ext; } + import openconfig-types { prefix oc-types; } + import openconfig-platform { prefix oc-platform; } + + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines a schema for power supply components in + the OpenConfig platform model."; + + oc-ext:openconfig-version "0.2.0"; + + revision "2018-01-16" { + description + "Changed admin state leaf name"; + reference "0.2.0"; + } + + revision "2017-12-21" { + description + "Initial revision"; + reference "0.1.0"; + } + + // identity statements + + // typedef statements + + // grouping statements + + grouping psu-config { + description + "Configuration data for power supply components"; + + leaf enabled { + type boolean; + default true; + description + "Adminsitrative control on the on/off state of the power + supply unit."; + } + } + + grouping psu-state { + description + "Operational state data for power supply components"; + + + // TODO(aashaikh): May need to convert some of these to + // interval statistics once decided on which leaves to include. + leaf capacity { + type oc-types:ieeefloat32; + units watts; + description + "Maximum power capacity of the power supply."; + } + + leaf input-current { + type oc-types:ieeefloat32; + units amps; + description + "The input current draw of the power supply."; + } + + leaf input-voltage { + type oc-types:ieeefloat32; + units volts; + description + "Input voltage to the power supply."; + } + + leaf output-current { + type oc-types:ieeefloat32; + units amps; + description + "The output current supplied by the power supply."; + } + + leaf output-voltage { + type oc-types:ieeefloat32; + units volts; + description + "Output voltage supplied by the power supply."; + } + + leaf output-power { + type oc-types:ieeefloat32; + units watts; + description + "Output power supplied by the power supply."; + } + } + + // data definition statements + + // augment statements + + augment "/oc-platform:components/oc-platform:component/" + + "oc-platform:power-supply/oc-platform:config" { + description + "Adds power supply data to component operational state."; + + uses psu-config; + } + + augment "/oc-platform:components/oc-platform:component/" + + "oc-platform:power-supply/oc-platform:state" { + description + "Adds power supply data to component operational state."; + + uses psu-config; + uses psu-state; + } + + + // rpc statements + + // notification statements +}
\ No newline at end of file |