Skip to content

Commit 1463f23

Browse files
Platform model for USB port (#1361)
* Create openconfig-platform-usb-port.yang * Update openconfig-platform-types.yang * Update openconfig-platform-usb-port.yang * Update .spec.yml * Update openconfig-platform-usb-port.yang * Update openconfig-platform-usb-port.yang * Update openconfig-platform-usb-port.yang * Update openconfig-platform-usb-port.yang * Update openconfig-platform-types.yang Fixed version number. * Update openconfig-platform-types.yang Fixed trailing whitespace. * Update openconfig-platform-usb-port.yang Fixed trailing whitespace. * Update openconfig-platform-usb-port.yang Updated descriptions to be more general & reflect boolean statement rather than importing `power-admin-state`. * Update openconfig-platform-usb-port.yang Typo. * Update openconfig-platform-usb-port.yang Removed "default true;". --------- Co-authored-by: Caleb Geiger <48812321+ElodinLaarz@users.noreply.github.com>
1 parent c826ad2 commit 1463f23

File tree

3 files changed

+108
-2
lines changed

3 files changed

+108
-2
lines changed

release/models/platform/.spec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- yang/platform/openconfig-platform-controller-card.yang
1919
- yang/platform/openconfig-platform-healthz.yang
2020
- yang/platform/openconfig-platform-boot-loader.yang
21+
- yang/platform/openconfig-platform-usb-port.yang
2122
- yang/p4rt/openconfig-p4rt.yang
2223
- yang/system/openconfig-alarms.yang
2324
- yang/optical-transport/openconfig-terminal-device.yang
@@ -40,6 +41,7 @@
4041
- yang/platform/openconfig-platform-controller-card.yang
4142
- yang/platform/openconfig-platform-healthz.yang
4243
- yang/platform/openconfig-platform-boot-loader.yang
44+
- yang/platform/openconfig-platform-usb-port.yang
4345
- yang/p4rt/openconfig-p4rt.yang
4446
- yang/system/openconfig-alarms.yang
4547
- yang/optical-transport/openconfig-terminal-device.yang

release/models/platform/openconfig-platform-types.yang

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ module openconfig-platform-types {
2222
"This module defines data types (e.g., YANG identities)
2323
to support the OpenConfig component inventory model.";
2424

25-
oc-ext:openconfig-version "1.10.0";
25+
oc-ext:openconfig-version "1.11.0";
2626

27-
revision "2025-07-09" {
27+
revision "2025-09-03" {
28+
description
29+
"Add USB_PORT";
30+
reference "1.11.0";
31+
}
32+
33+
revision "2025-07-09" {
2834
description
2935
"Add FPGA, BOOT_LOADER_GRUB, BOOT_LOADER_ONIE";
3036
reference "1.10.0";
@@ -389,6 +395,12 @@ module openconfig-platform-types {
389395
cables";
390396
}
391397

398+
identity USB_PORT {
399+
base OPENCONFIG_HARDWARE_COMPONENT;
400+
description
401+
"Non-serial USB ports of any type.";
402+
}
403+
392404
identity TRANSCEIVER {
393405
base OPENCONFIG_HARDWARE_COMPONENT;
394406
description
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
module openconfig-platform-usb-port {
2+
3+
yang-version "1";
4+
5+
// namespace
6+
namespace "http://openconfig.net/yang/platform/usb-port";
7+
8+
prefix "oc-usb-port";
9+
10+
import openconfig-platform { prefix oc-platform; }
11+
import openconfig-extensions { prefix oc-ext; }
12+
13+
14+
// meta
15+
organization "OpenConfig working group";
16+
17+
contact
18+
"OpenConfig working group
19+
www.openconfig.net";
20+
21+
description
22+
"This module defines data related to USB port components in the
23+
OpenConfig platform model.";
24+
25+
oc-ext:openconfig-version "0.1.0";
26+
27+
revision "2025-09-03" {
28+
description
29+
"Initial revision";
30+
reference "0.1.0";
31+
}
32+
33+
// OpenConfig specific extensions for module metadata.
34+
oc-ext:regexp-posix;
35+
oc-ext:catalog-organization "openconfig";
36+
oc-ext:origin "openconfig";
37+
38+
// grouping statements
39+
40+
grouping usb-port-top {
41+
description
42+
"Top level grouping for attributes related to USB ports.";
43+
44+
container usb-port {
45+
description
46+
"Parameters related to all USB ports.";
47+
48+
container config {
49+
description
50+
"Configuration data for USB ports.";
51+
52+
uses usb-port-config;
53+
}
54+
55+
container state {
56+
config false;
57+
description
58+
"State data for USB ports.";
59+
60+
uses usb-port-config;
61+
uses usb-port-state;
62+
}
63+
}
64+
}
65+
66+
grouping usb-port-config {
67+
description
68+
"Configuration data for USB ports.";
69+
70+
leaf enabled {
71+
type boolean;
72+
description
73+
"Enables or disables USB port functionality.";
74+
}
75+
}
76+
77+
grouping usb-port-state {
78+
description
79+
"State data for USB ports.";
80+
}
81+
82+
// data definition statements
83+
84+
// augment statements
85+
86+
augment "/oc-platform:components/oc-platform:component" {
87+
description
88+
"Configuration data for USB ports.";
89+
90+
uses usb-port-top;
91+
}
92+
}

0 commit comments

Comments
 (0)