Updating param name from connector_i_ds to connector_ids in RFmx VNA#1237
Updating param name from connector_i_ds to connector_ids in RFmx VNA#1237RahulBenaka wants to merge 1 commit intomainfrom
Conversation
| @@ -1,2 +1,91 @@ | |||
| functions_override_metadata = { | |||
| 'CalkitManagerCalkitCalibrationElementGetPortConnectors': { | |||
There was a problem hiding this comment.
Normally we fix this by adding a transform in scrapigen that updates grpc_name in the functions.py file. I have never used functions_addon (I think) since I've worked on grpc-device. Maybe that was originally for some MI APIs where functions.py was an external source-of-truth. But for RFmx, we are already generating the metadata for grpc-device from scrapigen, so we can include it in the primary functions.py metadata.
I wonder if just adding IDs or something similar to ADDITIONAL_ACRONYMS would fix this? Maybe this case is slightly different from other analyze_acronyms use-cases. You can also have a custom transform that patches a specific parameter name with a grpc_name.
There was a problem hiding this comment.
Hey thanks for the hint. I have used the existing ADDITIONAL_ACRONYMS for VNA in grpc-scrapigen to fix the param name and generate the appropriate grpc_name.
Could you please review my new changes. Thank you.
fd241ff to
34248ee
Compare
What does this Pull Request accomplish?
For APIs in VNA with parameter name as connectorIDs (in metadata), the name was appearing as connector_i_ds in proto and respective service files. This PR aims to resolve that naming issue and correct it to connector_ids. This is achieved by adding "IDs" in the
ADDITIONAL_ACRONYMSof VNA gRPC metadata in grpc-scrapigen repo and leverage that to generate 'grpc_name' field to add the appropriate name to be reflected in proto and respective service filesWhy should this Pull Request be merged?
This name change from connector_i_ds to connector_ids is required for legibility and this will help us to maintain python gRPC code for RFmx use the appropriate naming convention.
What testing has been done?
Manually inspected generated files.
Copied files from grpc-device-scrapigen/out/rfmxvna/export/ to grpc-device/source/codegen/metadata/nirfmxvna/ and hardcoded these new param names by using 'grpc_name' field and built grpc-device successfully.
Manually inspected nirfmxvna.proto file.