-
Notifications
You must be signed in to change notification settings - Fork 26
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
Underscores in query arguments gets converted to hyphens in RPC request #35
Comments
@Balakrishnan-Easwaran hyphen is reserved for subtraction in many programming lang. If we have hyphen in the variable then the program will get confused. say:
how to make out whether profit-loss is a variable or mathematical operation. Any variable should ideally consist of [A-Za-z0-9_]. Hence we take underscore from user input but convert it to hyphen in RPC call (as RPC tags should contain hyphen and not underscore). In this case |
Thanks Nitin. I understand that you are standardizing the RPC calls to have only "hyphens". As of now I am going ahead by commenting out the underscore to hyphen conversion statement, but I'm not sure whether someother requests will be affected by this. To make sure things are not blocked I'm going ahead by commenting out line 492 in Please let me know once the issue is fixed. Thanks. |
If you comment the given line, it will impact other RPC calls. on the other hand, you can put a check to ignore, if the arg is verbose_level. hope that helps. |
Correct Nitin. Will do. Please let me know when this issue is fixed. Thanks. |
Issue Juniper#35 : For fields which are not predefined in %methods, use the input as it is without changing _ to -. Issue Juniper#37 : Included quotes Issue Juniper#38 : Commented out the print statement. Additional change : Commented out 'Disconnecting' carp call.
I am using Net::Netconf::Manager to query a device with RPC commands. In the query I should send a list of arguments. So I'm adding query arguments in a hash. One such argument is verbosity_level
Please note I am using underscore ( _ ) in this argument. When I print the hash, it is still underscore.But when I print the XML RPC request that is sent to the device, the argument is changed to verbosity-level
abcd
instead of<verbosity_level>abcd</verbosity_level> So the device throws error.
Why is the underscore gets convered to hyphen??
Waiting for your kind quick response.
Thanks in advance.
The text was updated successfully, but these errors were encountered: