openconfig / featureprofiles

Feature Profiles are groups of OpenConfig paths and tests which verify their behavior
Apache License 2.0
52 stars 149 forks source link

Vendor proprietary component names #459

Open aredmon8551 opened 2 years ago

aredmon8551 commented 2 years ago

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:

  1. What is the preferred means for supporting other vendor component naming schemes? Extend the mapping and add more regex patterns?

  2. What is the logic behind whether some state variables are mandatory or not? Is it based on whether the implementation actually has the state?

dplore commented 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

sezhang2 commented 2 years ago

@aredmon8551

  1. We are making changes to look up the component by standard type instead of component name..

  2. 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.

azubaidhar commented 1 year ago

@sezhang2 ,

Please update latest on this. Thank you.

sezhang2 commented 1 year ago

@azubaidhar

The code update is completed. We will update the test code.