Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gNMI-1.4 with FAN_TRAY type. #3046

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
50e252c
add fan_tray type to readme
SydneyCaulfeild May 31, 2024
75c3aea
Add FAN_TRAY type to telemetry_inventory_test.go.
SydneyCaulfeild Jun 3, 2024
d826db3
add NumFanTrays arg
SydneyCaulfeild Jun 5, 2024
abb7920
skip fan tray telemetry check when 0 are expected
SydneyCaulfeild Jun 5, 2024
e9a37d2
add FAN_TRAY as platform_type to README.
SydneyCaulfeild Jun 6, 2024
2336df2
validate that fan tray parent is the chassis.
SydneyCaulfeild Jun 6, 2024
ec7972a
validate fan component's parent.
SydneyCaulfeild Jun 6, 2024
482b85c
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 10, 2024
9a74086
Add deviation for fan tray type.
SydneyCaulfeild Jun 10, 2024
2b48711
Use fan tray deviation in telemetry_inventory_test.
SydneyCaulfeild Jun 10, 2024
edfb040
fix call to FanTrayTypeUnsupported.
SydneyCaulfeild Jun 10, 2024
19a76cc
Remove switch_chip_id_unsupported from Nokia.
SydneyCaulfeild Jun 11, 2024
595621b
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 11, 2024
b4614d1
Add arg_num_fans.
SydneyCaulfeild Jun 11, 2024
0b352f3
Skip fan validation when args_num_fans is 0.
SydneyCaulfeild Jun 11, 2024
09f9962
Update args.go
SydneyCaulfeild Jun 11, 2024
304da7a
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 11, 2024
0c5dc86
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 12, 2024
de62c3d
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 12, 2024
cb31b9c
Fix metadata.pb.go.
SydneyCaulfeild Jun 12, 2024
4560a80
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 14, 2024
837b3ac
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 14, 2024
245a27e
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 14, 2024
332c40f
Fix metadata.pb.go.
SydneyCaulfeild Jun 14, 2024
8a4eb79
Fix deviations.go typo.
SydneyCaulfeild Jun 14, 2024
ab1fc3d
Only check that FAN has ancestor chassis, not the immediate parent type.
SydneyCaulfeild Jun 14, 2024
a2d07b3
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 17, 2024
8bf7f15
Fix metadata.pg.go.
SydneyCaulfeild Jun 17, 2024
78becd8
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 20, 2024
41712b2
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 24, 2024
703d628
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 24, 2024
fb77df1
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 25, 2024
5d520f0
FIx metadata.pb.go.
SydneyCaulfeild Jun 25, 2024
2d94d30
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jun 26, 2024
3877122
Fix metadata.pb.go.
SydneyCaulfeild Jun 26, 2024
27724eb
Remove fan_tray deviation from metadata.proto.
SydneyCaulfeild Jul 16, 2024
219433e
Remove fan_tray deviation from deviations.go.
SydneyCaulfeild Jul 16, 2024
3f47ee2
Remove fan_tray deviation from metadata.textproto.
SydneyCaulfeild Jul 16, 2024
e76a834
Update metadata.proto
SydneyCaulfeild Jul 16, 2024
61d645a
Remove fan_tray deviation from telemetry_inventory_test.go.
SydneyCaulfeild Jul 16, 2024
44e0f8b
Fix metadata.pb.go.
SydneyCaulfeild Jul 16, 2024
a23fe89
Merge branch 'main' into update-gnmi-1.4-with-fan_tray
SydneyCaulfeild Jul 16, 2024
9c81c8e
Fix brackets in telemetry_inventory_test.go.
SydneyCaulfeild Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 57 additions & 57 deletions feature/platform/tests/telemetry_inventory_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Validate Telemetry for each FRU within chassis.

## Procedure

For each of the following component types (linecard, chassis, fan, controller
For each of the following component types (linecard, chassis, fan, fan_tray, controller
card, power supply, disk, flash, NPU, transceiver, fabric card), validate:

* Presence of component within gNMI telemetry.
Expand All @@ -30,62 +30,62 @@ TODO:

```yaml
paths:
/components/component/state/description:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "FABRIC", "FAN", "FRU", "LINECARD", "POWER_SUPPLY"]
/components/component/state/firmware-version:
platform_type: ["TRANSCEIVER"]
/components/component/state/hardware-version:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "FABRIC", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/id:
platform_type: ["CONTROLLER_CARD", "FABRIC", "FAN", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR"]
/components/component/state/install-component:
platform_type: ["FABRIC", "FAN", "FAN_TRAY", "FRU", "CONTROLLER_CARD", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/install-position:
platform_type: ["FABRIC", "FAN", "FAN_TRAY", "FRU", "CONTROLLER_CARD", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/location:
platform_type: ["FABRIC", "FAN", "FAN_TRAY", "FRU", "CONTROLLER_CARD", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/mfg-name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "FABRIC", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/model-name:
platform_type: ["CHASSIS"]
/components/component/state/name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/state/oper-status:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "STORAGE", "TRANSCEIVER"]
/components/component/state/parent:
platform_type: ["CONTROLLER_CARD", "FABRIC", "FRU", "LINECARD", "POWER_SUPPLY"]
/components/component/state/part-no:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FRU", "LINECARD", "POWER_SUPPLY", "STORAGE", "TRANSCEIVER"]
/components/component/state/serial-no:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FRU", "LINECARD", "POWER_SUPPLY", "STORAGE", "TRANSCEIVER"]
/components/component/state/type:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/state/temperature/alarm-status:
platform_type: ["SENSOR"]
/components/component/state/temperature/instant:
platform_type: ["SENSOR"]
/components/component/state/temperature/max:
platform_type: ["SENSOR"]
/components/component/state/temperature/max-time:
platform_type: ["SENSOR"]
/components/component/subcomponents/subcomponent/name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/subcomponents/subcomponent/state/name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/integrated-circuit/backplane-facing-capacity/state/available-pct:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/integrated-circuit/backplane-facing-capacity/state/consumed-capacity:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/integrated-circuit/backplane-facing-capacity/state/total:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/integrated-circuit/backplane-facing-capacity/state/total-operational-capacity:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/controller-card/config/power-admin-state:
platform_type: ["CONTROLLER_CARD"]
/components/component/fabric/config/power-admin-state:
platform_type: ["FABRIC"]
/components/component/linecard/config/power-admin-state:
platform_type: ["LINECARD"]
/components/component/state/description:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "FABRIC", "FAN", "FAN_TRAY", "LINECARD", "POWER_SUPPLY"]
/components/component/state/firmware-version:
platform_type: ["TRANSCEIVER"]
/components/component/state/hardware-version:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "FABRIC", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/id:
platform_type: ["CONTROLLER_CARD", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR"]
/components/component/state/install-component:
platform_type: ["FABRIC", "FAN", "FAN_TRAY", "FRU", "CONTROLLER_CARD", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/install-position:
platform_type: ["FABRIC", "FAN", "FAN_TRAY", "FRU", "CONTROLLER_CARD", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/location:
platform_type: ["FABRIC", "FAN", "FAN_TRAY", "FRU", "CONTROLLER_CARD", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/mfg-name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "FABRIC", "LINECARD", "POWER_SUPPLY", "TRANSCEIVER"]
/components/component/state/model-name:
platform_type: ["CHASSIS"]
/components/component/state/name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/state/oper-status:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "STORAGE", "TRANSCEIVER"]
/components/component/state/parent:
platform_type: ["CONTROLLER_CARD", "FABRIC", "FAN", "FAN_TRAY", "LINECARD", "POWER_SUPPLY"]
/components/component/state/part-no:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "LINECARD", "POWER_SUPPLY", "STORAGE", "TRANSCEIVER"]
/components/component/state/serial-no:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "LINECARD", "POWER_SUPPLY", "STORAGE", "TRANSCEIVER"]
/components/component/state/type:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/state/temperature/alarm-status:
platform_type: ["SENSOR"]
/components/component/state/temperature/instant:
platform_type: ["SENSOR"]
/components/component/state/temperature/max:
platform_type: ["SENSOR"]
/components/component/state/temperature/max-time:
platform_type: ["SENSOR"]
/components/component/subcomponents/subcomponent/name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/subcomponents/subcomponent/state/name:
platform_type: ["CHASSIS", "CONTROLLER_CARD", "CPU", "FABRIC", "FAN", "FAN_TRAY", "INTEGRATED_CIRCUIT", "LINECARD", "POWER_SUPPLY", "SENSOR", "STORAGE", "TRANSCEIVER"]
/components/component/integrated-circuit/backplane-facing-capacity/state/available-pct:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/integrated-circuit/backplane-facing-capacity/state/consumed-capacity:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/integrated-circuit/backplane-facing-capacity/state/total:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/integrated-circuit/backplane-facing-capacity/state/total-operational-capacity:
platform_type: ["INTEGRATED_CIRCUIT"]
/components/component/controller-card/config/power-admin-state:
platform_type: ["CONTROLLER_CARD"]
/components/component/fabric/config/power-admin-state:
platform_type: ["FABRIC"]
/components/component/linecard/config/power-admin-state:
platform_type: ["LINECARD"]

rpcs:
gnmi:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,24 @@ platform_exceptions: {
model_name_unsupported: true
}
}
platform_exceptions: {
platform: {
vendor: JUNIPER
}
deviations: {
backplane_facing_capacity_unsupported: true
install_position_and_install_component_unsupported: true
model_name_unsupported: true
storage_component_unsupported: true
switch_chip_id_unsupported: true
}
}
platform_exceptions: {
platform: {
vendor: NOKIA
}
deviations: {
backplane_facing_capacity_unsupported: true
install_position_and_install_component_unsupported: true
model_name_unsupported: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var componentType = map[string]oc.E_PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT{
"Fabric": oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FABRIC,
"Linecard": oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_LINECARD,
"Fan": oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FAN,
"Fan Tray": oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FAN_TRAY,
"PowerSupply": oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_POWER_SUPPLY,
"Supervisor": oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_CONTROLLER_CARD,
"SwitchChip": oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_INTEGRATED_CIRCUIT,
Expand Down Expand Up @@ -115,6 +116,7 @@ func TestMain(m *testing.M) {
// - Fabric card
// - FabricChip
// - Fan
// - Fan Tray
// - Supervisor or Controller
// - Validate telemetry components/component/state/software-version.
// - SwitchChip
Expand Down Expand Up @@ -200,20 +202,36 @@ func TestHardwareCards(t *testing.T) {
}, {
desc: "Fan",
cardFields: properties{
descriptionValidation: true,
idValidation: false,
installPositionAndComponentValidation: true,
nameValidation: true,
partNoValidation: true,
serialNoValidation: true,
mfgNameValidation: false,
mfgDateValidation: false,
hwVerValidation: false,
fwVerValidation: false,
rrValidation: false,
operStatus: oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE,
parentValidation: false,
pType: componentType["Fan"],
descriptionValidation: true,
idValidation: false,
nameValidation: true,
partNoValidation: true,
serialNoValidation: true,
mfgNameValidation: false,
mfgDateValidation: false,
hwVerValidation: false,
fwVerValidation: false,
rrValidation: false,
operStatus: oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE,
parentValidation: true,
pType: componentType["Fan"],
},
}, {
desc: "Fan Tray",
cardFields: properties{
descriptionValidation: true,
idValidation: false,
nameValidation: true,
partNoValidation: true,
serialNoValidation: true,
mfgNameValidation: false,
mfgDateValidation: false,
hwVerValidation: false,
fwVerValidation: false,
rrValidation: false,
operStatus: oc.PlatformTypes_COMPONENT_OPER_STATUS_ACTIVE,
parentValidation: true,
pType: componentType["Fan Tray"],
},
}, {
desc: "Linecard",
Expand Down Expand Up @@ -338,6 +356,10 @@ func TestHardwareCards(t *testing.T) {
t.Skip("Skip Linecard Telemetry check for fixed form factor devices.")
} else if tc.desc == "Supervisor" && *args.NumControllerCards <= 0 {
t.Skip("Skip Supervisor Telemetry check for fixed form factor devices.")
} else if tc.desc == "Fan Tray" && *args.NumFanTrays == 0 {
t.Skip("Skip Fan Tray Telemetry check for fixed form factor devices.")
} else if tc.desc == "Fan" && *args.NumFans == 0 {
t.Skip("Skip Fan Telemetry check for fixed form factor devices.")
}
cards := components[tc.desc]
t.Logf("%s components count: %d", tc.desc, len(cards))
Expand Down
2 changes: 2 additions & 0 deletions internal/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ var (
NumControllerCards = flag.Int("arg_num_controller_cards", -1, "The expected number of controller cards. Some devices with a single controller report 0, which is a valid expected value. Expectation is not checked for values < 0.")
NumLinecards = flag.Int("arg_num_linecards", -1, "The expected number of linecards. Some devices with a single linecard report 0, which is a valid expected value. Expectation is not checked for values < 0.")
NumFabrics = flag.Int("arg_num_fabrics", -1, "The expected number of fabrics. Some devices with a single fabric report 0, which is a valid expected value. Expectation is not checked for values < 0.")
NumFans = flag.Int("arg_num_fans", 0, "The expected number of fans (default is 0, meaning the device is not expected to have fans so none are validated).")
NumFanTrays = flag.Int("arg_num_fan_trays", 0, "The expected number of fan trays (default is 0, meaning the device is not expected to have fan trays so none are validated).")
P4RTNodeName1 = flag.String("arg_p4rt_node_name_1", "", "The P4RT Node Name for the first FAP. Test that reserves ports in the same FAP should configure this P4RT Node. The value will only be used if deviation ExplicitP4RTNodeComponent is applied.")
P4RTNodeName2 = flag.String("arg_p4rt_node_name_2", "", "The P4RT Node Name for the second FAP. Test that reserves ports in two different FAPs should configure this P4RT Node in addition to the Node defined in P4RTNodeName1. The value will only be used if deviation ExplicitP4RTNodeComponent is applied.")
FullConfigReplaceTime = flag.Duration("arg_full_config_replace_time", 0, "Time taken for gNMI set operation to complete full configuration replace. Expected duration is in nanoseconds. Expectation is not checked when value is 0.")
Expand Down
5 changes: 2 additions & 3 deletions proto/metadata_go_proto/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading