Open aredmon8551 opened 2 years ago
Good questions, thanks for identifying these issues. The components should be referenced by their identity and not the name.
The MfgName and MfgDate for components with identity "TRANSCEIVER" should be required. For the other components, I believe they should not be required.
@sezhang2 for comment
@aredmon8551
We are making changes to look up the component by standard type instead of component name..
I tried to look up basic inventory info list SN number and description etc. For now, I just print out info if it exists. For required ones like MfgName and MfgDate for components with identity "TRANSCEIVER", the test should fail if they are missing.
@sezhang2 ,
Please update latest on this. Thank you.
@azubaidhar
The code update is completed. We will update the test code.
https://github.com/openconfig/featureprofiles/blob/add3abf3b18f2774d35ea416082af39e6bff64a3/feature/platform/ate_tests/telemetry_inventory_test/telemetry_inventory_test.go#L43
https://github.com/openconfig/featureprofiles/blob/add3abf3b18f2774d35ea416082af39e6bff64a3/feature/platform/ate_tests/telemetry_inventory_test/telemetry_inventory_test.go#L44
The above are two examples of vendor proprietary component names being mapped to OC naming conventions.
Further, it looks like per component there's logic as to whether certain state leaves (mfgName/mfgDate) are mandatory:
https://github.com/openconfig/featureprofiles/blob/add3abf3b18f2774d35ea416082af39e6bff64a3/feature/platform/ate_tests/telemetry_inventory_test/telemetry_inventory_test.go#L285
https://github.com/openconfig/featureprofiles/blob/add3abf3b18f2774d35ea416082af39e6bff64a3/feature/platform/ate_tests/telemetry_inventory_test/telemetry_inventory_test.go#L229
Two questions:
What is the preferred means for supporting other vendor component naming schemes? Extend the mapping and add more regex patterns?
What is the logic behind whether some state variables are mandatory or not? Is it based on whether the implementation actually has the state?