hiroki | 096259b | 2018-12-07 09:33:24 -0800 | [diff] [blame] | 1 | module openconfig-platform-linecard { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/platform/linecard"; |
| 7 | |
| 8 | prefix "oc-linecard"; |
| 9 | |
| 10 | import openconfig-platform { prefix oc-platform; } |
| 11 | import openconfig-platform-types { prefix oc-platform-types; } |
| 12 | import openconfig-extensions { prefix oc-ext; } |
| 13 | |
| 14 | |
| 15 | // meta |
| 16 | organization "OpenConfig working group"; |
| 17 | |
| 18 | contact |
| 19 | "OpenConfig working group |
| 20 | www.openconfig.net"; |
| 21 | |
| 22 | description |
| 23 | "This module defines data related to LINECARD components in |
| 24 | the openconfig-platform model"; |
| 25 | |
| 26 | oc-ext:openconfig-version "0.1.0"; |
| 27 | |
| 28 | revision "2017-08-03" { |
| 29 | description |
| 30 | "Initial revision"; |
| 31 | reference "0.1.0"; |
| 32 | } |
| 33 | |
| 34 | // extension statements |
| 35 | |
| 36 | // feature statements |
| 37 | |
| 38 | // identity statements |
| 39 | |
| 40 | // typedef statements |
| 41 | |
| 42 | // grouping statements |
| 43 | |
| 44 | grouping linecard-config { |
| 45 | description |
| 46 | "Configuration data for linecard components"; |
| 47 | |
| 48 | leaf power-admin-state { |
| 49 | type oc-platform-types:component-power-type; |
| 50 | default POWER_ENABLED; |
| 51 | description |
| 52 | "Enable or disable power to the linecard"; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | grouping linecard-state { |
| 57 | description |
| 58 | "Operational state data for linecard components"; |
| 59 | |
| 60 | leaf slot-id { |
| 61 | type string; |
| 62 | description |
| 63 | "Identifier for the slot or chassis position in which the |
| 64 | linecard is installed"; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | grouping linecard-top { |
| 69 | description |
| 70 | "Top-level grouping for linecard data"; |
| 71 | |
| 72 | container linecard { |
| 73 | description |
| 74 | "Top-level container for linecard data"; |
| 75 | |
| 76 | container config { |
| 77 | description |
| 78 | "Configuration data for linecards"; |
| 79 | |
| 80 | uses linecard-config; |
| 81 | } |
| 82 | |
| 83 | container state { |
| 84 | |
| 85 | config false; |
| 86 | |
| 87 | description |
| 88 | "Operational state data for linecards"; |
| 89 | |
| 90 | uses linecard-config; |
| 91 | uses linecard-state; |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // data definition statements |
| 97 | |
| 98 | // augment statements |
| 99 | |
| 100 | augment "/oc-platform:components/oc-platform:component" { |
| 101 | description |
| 102 | "Adding linecard data to physical inventory"; |
| 103 | |
| 104 | uses linecard-top { |
| 105 | when "current()/oc-platform:state/" + |
| 106 | "oc-platform:type = 'LINECARD'" { |
| 107 | description |
| 108 | "Augment is active when component is of type LINECARD"; |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | // rpc statements |
| 114 | |
| 115 | // notification statements |
| 116 | |
| 117 | } |
| 118 | |