-
Notifications
You must be signed in to change notification settings - Fork 332
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
NotImplementedError: APIVersion 2019-06-01 is not available for azure_rm_virtualnetwork and related #121
Comments
@mark100net I'm glad you are interested in ansilbe-collections. I tested your playbook and it was successful. The test results are as follows:
|
@mark100net I suspect that your ansible and ansible-collection refer to azure-mgmt-network differently. Can you help confirm this? Thank you very much! |
@Fred-sun Thanks for trying to reproduce my issue. I am not completely sure what you are asking. I do have My My
If that does not answer your question please let me know what I need to do to answer your question. Thanks again. |
@mark100net Can you do such a verification, edit "/usr/local/lib/python3.7/site-packages/ansible/module_utils/azure_rm_common.py". Then test with default tasks and share the fail log to me! Thank you very much!
|
Hello @Fred-sun , thanks for getting back to me. I was not sure what you meant by "default tasks". But I made the edits you suggested and ran the playbook with the tasks above and got this fail log: |
@mark100net Sorry for misunderstand to you. default tasks from the cloud/ansible module. Thank you very much! |
@mark100net Thank you very much for your feedback. First of all, you should definitely report an error after changing the API version, because the network API does not have these two versions. So your two task executions use different APIs. Second , that I have encountered such a similar problem, ansible and ansible-collection use azure-mgmt-network in different locations. Could you help remove ansible and ansible-collection and reinstall to retry? Thank you very much! |
@mark100net Thanks for your feedback! I see! |
@Fred-sun Do you have any other suggestions then? |
As you can see from your log, ansible and ansible-collections use the same network_management_client.py, the two test results should be the same, and you should not go wrong here. I am still thinking about how to clarify, thank you! |
@mark100net Please delete “/usr/local/lib/python3.7/site-packages/azure/mgmt/network/”, reinstall azure-mgmt-network and try again, thank you!
|
@Fred-sun Thanks for the suggestion. I was able to get past the original error after doing your suggestion, but I got another error later on in my playbook when creating a virtual network. I will get you the details on that at a later date. In the meantime, did you want me to do that with or without the edits to the Thanks again. |
@mark100net Without the edits to the azure_rm_common.py, Thank you very much! |
@Fred-sun After deleting the Thanks again. |
@mark100net Please help provide "pip3 list |grep azure-mgmt-network" information and send me these two files. Thank you!
|
@Fred-sun here you go:
I do not have a network_management_client.py.txt Thanks |
@mark100net You are using an old version of azure-mgmt-network, please delete ”/Users/mark/Library/Python/3.7/lib/python/site-packages/azure/mgmt/network“ folder and reinstall azure-mgmt-network (sudo pip3 install azure-mgmt-network==10.1.0 -I). Thank you! |
@Fred-sun I am going to close this issue because clearly the problem relates to my setup. But if you have any further suggestions please let me know. When I deleted the 'network' folder as you instructed and then ran the Then I removed ~/Library/Python altogether and the problem went away. Clearly this applies to me: :( Thanks again for all your time and help with this. |
SUMMARY
ISSUE TYPE
As noted in the coment in the code below, I do not have a problem if I use the default tasks from the cloud/ansible module. But if I use the most recent code from the collection, create virtual network and several related tasks break in the same way.
COMPONENT NAME
ansible-collection version 0.1.3 installed via:
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
MacOS 10.15.4
STEPS TO REPRODUCE
Configure Azure CLI with credentials then run following tasks:
EXPECTED RESULTS
Virtual network is created in azure.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: