-
Notifications
You must be signed in to change notification settings - Fork 337
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
protocol
parameter case mismatch azure_rm_securitygroup
#1358
Comments
@Mohammad-Atif-Khan You are welcome to submit any questions you encounter, The protocol option is based on the Python SDK (described in the SDK with first capitalize letters). The information obtained in azure_rm_securitygroup_info.py is returned directly by the server, and we just print it out. Thank you! |
hi @Fred-sun , Otherwise we will have to update every single list item returned so the case is 'appropriate'. I suppose the best way to address this at the ansible module level is by setting the 'right' case before calling the Python SDK to create/update, thereby making it more robust and impervious to case mismatch typos. Here are similar issues: #1096 - this one also support my case it seems. |
Hi @Fred-sun , the info module returns access_policies in the following format:
while the create/update module asks for the input for access_policies on this format:
can this be included in the same issue please? |
@Mohammad-Atif-Khan Sorry to reply you so late, #726 is because msrest will be abandoned, we manually processed the return value ourselves! #1096 is handled this way, and this is also handled to avoid the problem of character capitalization! Now our future design patterns are designed according to the SDK standards. Thank you! |
Hi @Fred-sun , If you’re going to ignore feedback on improvement and close this issue then should this be logged as a feature request instead? |
@Mohammad-Atif-Khan Yes, it really helps to improve the experience, I will discuss with other developers how to solve this problem, thanks! |
@Mohammad-Atif-Khan The SDK also returns uppercase letters, like the following!
|
Add upper letter protocol in #1381 |
SUMMARY
I'm trying to extract NSG rules from an NSG in Azure and then apply those to another NSG, however, the data returned by
azure_rm_securitygroup_info
module has theprotocol
attribute in all upper case while theazure_rm_securitygroup
module expects it with only the first letter capitalizedISSUE TYPE
COMPONENT NAME
azure.azcollection.azure_rm_securitygroup_info
azure.azcollection.azure_rm_securitygroup
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Execution Environment via ansible-navigator
STEPS TO REPRODUCE
you get output like:
then try to apply it via azure.azcollection.azure_rm_securitygroup :
you get the error:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "value of protocol must be one of: Udp, Tcp, Icmp, *, got: TCP found in rules"}
EXPECTED RESULTS
Either the
azure.azcollection.azure_rm_securitygroup_info
should return output that is compatible with input forazure.azcollection.azure_rm_securitygroup
OR
azure.azcollection.azure_rm_securitygroup
should not care about the case of the protocol parameter value suppliedACTUAL RESULTS
The text was updated successfully, but these errors were encountered: