gNMI-1.10 - Changes for Vendor specific component names#652
Conversation
Pull Request Test Coverage Report for Build 4187548594
💛 - Coveralls |
| "Supervisor": "Chassis", | ||
| "SwitchChip": "Linecard", | ||
| }, | ||
| } |
There was a problem hiding this comment.
Should there be a default component list and a vendor specific list? With this change we are restricting only to ARISTA and CISCO
There was a problem hiding this comment.
The code should be refactored to find components by the openconfig defined types. For example, a NOS (network operating system) should use the appropriate type for their CONTROLLER_CARD and will use a NOS specific 'name' value for the. (routing-engine vs. supervisor, etc).
There was a problem hiding this comment.
Example code to look up component name based on component identity (type):
featureprofiles/internal/components/components.go
Lines 40 to 59 in 04860e1
There was a problem hiding this comment.
@dplore , Changed to using FindComponentsByType
prinikasn
left a comment
There was a problem hiding this comment.
Does the regex under subtest TestSupervisorLastRebootInfo also need to be updated?
|
|
||
| r := regexp.MustCompile("^CPU") | ||
| supervisorMap := map[ondatra.Vendor]string{ | ||
| ondatra.ARISTA: "^Supervisor[0-9]", |
There was a problem hiding this comment.
There should be a lookup for a component with identity "CPU". Supervisor is an Arista EOS name for an OpenConfig "CONTROLLER_CARD".
There was a problem hiding this comment.
Changed to oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_CPU for CPU component
| t.Fatalf("Get CPU list for %q: got 0, want > 0", dut.Model()) | ||
| } | ||
| cpus := components.FindComponentsByType(t, dut, cpuType) | ||
| t.Logf("Found card list: %v", cpus) |
There was a problem hiding this comment.
nit. "Found CPU list" ? Since this is looking for CPU?
| if len(cpus) == 0 { | ||
| t.Fatalf("Get CPU list for %q: got 0, want > 0", dut.Model()) | ||
| } | ||
| cpus := components.FindComponentsByType(t, dut, cpuType) |
There was a problem hiding this comment.
Also, should we keep the check for cpus length here? It seems right now if there is some error and 0 CPU found, this test will pass w/o actually testing anything (which is not ideal)
There was a problem hiding this comment.
Sim. applicable for all len check in other subtests
| linecardType = oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_LINECARD | ||
| powerSupplyType = oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_POWER_SUPPLY | ||
| fabricType = oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FABRIC | ||
| fabricChipType = oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_FRU |
There was a problem hiding this comment.
Shouldn't fabric chip type be "integrated circuit" ?
|
@MarcCharlebois can you help review it for Nokia? Thanks. |
Perhaps not specifically to this PR, but relating to this test. In this replace, there's no value set in My suggestion is to replace how the component is created and update the Replace call for the func TestP4rtNodeID(t *testing.T) {
// TODO: add p4rtNodeName to Ondatra's netutil
dut := ondatra.DUT(t, "dut")
d := &oc.Root{}
comp := d.GetOrCreateComponent(*p4rtNodeName)
comp.Name = ygot.String(*p4rtNodeName)
ic := comp.GetOrCreateIntegratedCircuit()
gnmi.Replace(t, dut, gnmi.OC().Component(*p4rtNodeName).Config(), comp)If required, I can raise a PR for that - else we can take care of it in this one. |
| ) | ||
|
|
||
| const ( | ||
| chasisType = oc.PlatformTypes_OPENCONFIG_HARDWARE_COMPONENT_CHASSIS |
|
/gcbrun |
|
The internal test result: b/264892365. |
|
/gcbrun |
* Changes for Vendor specific component names * Review comments * Review comments * Review comments * Changing fabric chip type as integrated circuit * Add check for switchchip and fabricchip parent component * Modifying parent component check * Optimize run time * Changes to p4rt test * Fix Typo --------- Co-authored-by: vbhan-cisco <[email protected]>
) * Replicate PR545/546 in OTG telemetry basic test References: - #545 - #546 * Replicate PR642 in OTG telemetry basic test Reference: #642 * Replicate PR890 in OTG telemetry basic test Reference: #890 * Replicate PR1025 in OTG telemetry basic test Reference: #1025 * Replicate PR652 in OTG telemetry basic test Reference: #652 * Replicate PR1196 in OTG telemetry basic test Reference: #1196 * Replicate PR1195 in OTG telemetry basic test Reference: #1195 * Replicate PR1211 in OTG telemetry basic test Reference: #1211 * Replicate PR1248 in OTG telemetry basic test Reference: #1248 * Replicate PR1212 in OTG telemetry basic test Reference: #1212 * Replicate PR1317 in OTG telemetry basic test Reference: #1317 * Remove extra subintf enabled bit not guarded by correct deviations
* Changes for Vendor specific component names * Review comments * Review comments * Review comments * Changing fabric chip type as integrated circuit * Add check for switchchip and fabricchip parent component * Modifying parent component check * Optimize run time * Changes to p4rt test * Fix Typo --------- Co-authored-by: vbhan-cisco <[email protected]>
) * Replicate PR545/546 in OTG telemetry basic test References: - #545 - #546 * Replicate PR642 in OTG telemetry basic test Reference: #642 * Replicate PR890 in OTG telemetry basic test Reference: #890 * Replicate PR1025 in OTG telemetry basic test Reference: #1025 * Replicate PR652 in OTG telemetry basic test Reference: #652 * Replicate PR1196 in OTG telemetry basic test Reference: #1196 * Replicate PR1195 in OTG telemetry basic test Reference: #1195 * Replicate PR1211 in OTG telemetry basic test Reference: #1211 * Replicate PR1248 in OTG telemetry basic test Reference: #1248 * Replicate PR1212 in OTG telemetry basic test Reference: #1212 * Replicate PR1317 in OTG telemetry basic test Reference: #1317 * Remove extra subintf enabled bit not guarded by correct deviations
Changes for Vendor specific component names