Skip to content

Commit a34a76d

Browse files
committed
fix linter errors, revision mismatches
Update release/models/platform/openconfig-platform-sensor.yang Co-authored-by: Ebben Aries <[email protected]> Update release/models/platform/openconfig-platform-sensor.yang Co-authored-by: Ebben Aries <[email protected]> Add when predicate to sensor, address comments remove whitespace
1 parent 2ab7b87 commit a34a76d

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ submodule openconfig-platform-common {
2020
"This modules contains common groupings that are used in multiple
2121
components within the platform module.";
2222

23-
oc-ext:openconfig-version "0.32.0";
23+
oc-ext:openconfig-version "0.33.0";
24+
25+
revision "2025-09-16" {
26+
description
27+
"Add sensor container.";
28+
reference "0.33.0";
29+
}
2430

2531
revision "2025-07-15" {
2632
description

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module openconfig-platform-sensor {
2323
"This module defines data related to SENSOR components in the
2424
OpenConfig platform model.";
2525

26-
oc-ext:openconfig-version "0.1.1";
26+
oc-ext:openconfig-version "0.1.0";
2727

2828
revision "2025-09-16" {
2929
description
@@ -75,7 +75,7 @@ module openconfig-platform-sensor {
7575
identity UNITS_ABSOLUTE_HUMIDITY {
7676
base UNITS_BASE;
7777
description
78-
"Absoltue humidity expressed in grams per cubic meter (g/m^3)";
78+
"Absolute humidity expressed in grams per cubic meter (g/m^3)";
7979
}
8080

8181
// typedef statements
@@ -99,7 +99,7 @@ module openconfig-platform-sensor {
9999
base UNITS_BASE;
100100
}
101101
description
102-
"The unit type for this sensor (volts, amps, celsius degree, ect)";
102+
"The unit type for this sensor (volts, amps, celsius degree, etc.)";
103103
}
104104
}
105105

@@ -172,18 +172,18 @@ module openconfig-platform-sensor {
172172

173173
// augment statements
174174

175-
augment "/oc-platform:components/oc-platform:component/" +
175+
augment "/oc-platform:components/oc-platform:component/oc-platform:state/" +
176176
"oc-platform:sensor" {
177177
description
178-
"Adding fan data to component model";
178+
"Adding sensor data to component model";
179179

180-
uses sensor-threshold-top ;
180+
uses sensor-threshold-top;
181181
}
182182

183-
augment "/oc-platform:components/oc-platform:component/" +
183+
augment "/oc-platform:components/oc-platform:component/oc-platform:state/" +
184184
"oc-platform:sensor/oc-platform:state" {
185185
description
186-
"Adding fan state data to component model";
186+
"Adding sensor state data to component model";
187187

188188
uses sensor-state;
189189
}

release/models/platform/openconfig-platform.yang

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,20 @@ revision "2024-05-29" {
10631063
}
10641064
}
10651065

1066+
grouping platform-component-sensor-state {
1067+
container sensor {
1068+
//when "../state/type = 'oc-platform-types:SENSOR'";
1069+
description
1070+
"Data for sensor components";
1071+
1072+
container state {
1073+
config false;
1074+
description
1075+
"Operational state data for sensor components";
1076+
}
1077+
}
1078+
}
1079+
10661080
grouping platform-anchors-top {
10671081
description
10681082
"This grouping is used to add containers for components that
@@ -1180,17 +1194,6 @@ revision "2024-05-29" {
11801194
}
11811195
}
11821196

1183-
container sensor {
1184-
description
1185-
"Data for sensor components";
1186-
1187-
container state {
1188-
config false;
1189-
description
1190-
"Operational state data for sensor components";
1191-
}
1192-
}
1193-
11941197
container fabric {
11951198
description
11961199
"Data for fabric components";
@@ -1369,6 +1372,9 @@ revision "2024-05-29" {
13691372
"'oc-platform-types:INTEGRATED_CIRCUIT' or " +
13701373
"'oc-platform-types:FRU'";
13711374
}
1375+
uses platform-component-sensor-state {
1376+
when "./type = 'oc-platform-types:SENSOR'";
1377+
}
13721378
}
13731379

13741380
uses platform-component-properties-top;

0 commit comments

Comments
 (0)