blob: 2995369497c2c9fc2ad7770f857a41e09d03cae8 [file] [log] [blame]
hiroki096259b2018-12-07 09:33:24 -08001module openconfig-platform-port {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/platform/port";
7
8 prefix "oc-port";
9
10 // import some basic types
11 import openconfig-platform { prefix oc-platform; }
12 import openconfig-interfaces { prefix oc-if; }
13 import openconfig-if-ethernet { prefix oc-eth; }
14 import openconfig-extensions { prefix oc-ext; }
15
16
17 // meta
18 organization "OpenConfig working group";
19
20 contact
21 "OpenConfig working group
22 www.openconfig.net";
23
24 description
25 "This module defines data related to PORT components in the openconfig-platform model";
26
27 oc-ext:openconfig-version "0.3.0";
28
29 revision "2018-01-20" {
30 description
31 "Added augmentation for interface-to-port reference";
32 reference "0.3.0";
33 }
34
35 revision "2017-11-17" {
36 description
37 "Corrected augmentation path for port data";
38 reference "0.2.0";
39 }
40
41 revision "2016-10-24" {
42 description
43 "Initial revision";
44 reference "0.1.0";
45 }
46
47 // extension statements
48
49 // feature statements
50
51 // identity statements
52
53 // typedef statements
54
55 // grouping statements
56
57 grouping port-breakout-config {
58 description
59 "Configuration data for the port breakout mode";
60
61 leaf num-channels {
62 type uint8;
63 description
64 "Sets the number of channels to 'breakout' on a port
65 capable of channelization";
66 }
67
68 leaf channel-speed {
69 type identityref {
70 base oc-eth:ETHERNET_SPEED;
71 }
72 description
73 "Sets the channel speed on each channel -- the
74 supported values are defined by the
75 ETHERNET_SPEED identity";
76 }
77 }
78
79 grouping port-breakout-state {
80 description
81 "Operational state data for the port breakout mode ";
82 }
83
84 grouping port-breakout-top {
85 description
86 "Top-level grouping for port breakout data";
87
88 container breakout-mode {
89 description
90 "Top-level container for port breakout data";
91
92 container config {
93 description
94 "Configuration data for port breakout";
95
96 uses port-breakout-config;
97 }
98
99 container state {
100
101 config false;
102
103 description
104 "Operational state data for port breakout";
105
106 uses port-breakout-config;
107 uses port-breakout-state;
108 }
109 }
110 }
111
112 // data definition statements
113
114 // augment statements
115
116 augment "/oc-platform:components/oc-platform:component/" +
117 "oc-platform:port" {
118 description
119 "Adding port breakout data to physical platform data";
120
121 uses port-breakout-top {
122 when "./oc-platform:state/oc-platform:type = 'PORT'" {
123 description
124 "This data is valid only for PORT components";
125 }
126 }
127 }
128
129 augment "/oc-if:interfaces/oc-if:interface/oc-if:state" {
130 description
131 "Adds a reference from the base interface to the corresponding
132 port component in the device inventory.";
133
134 leaf hardware-port {
135 type leafref {
136 path "/oc-platform:components/oc-platform:component/" +
137 "oc-platform:name";
138 }
139 description
140 "For non-channelized interfaces, references the hardware port
141 corresponding to the base interface.";
142 }
143 }
144
145 // rpc statements
146
147 // notification statements
148
149}