Skip to content
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

Add new module azure_rm_afdroute to support Azure Frontdoor Standard and Premium #1595

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

jartoo
Copy link
Contributor

@jartoo jartoo commented Jun 11, 2024

SUMMARY

This module manages Frontdoor Routes for the Standard and Premium services. I propose building this as a separate module in lieu of complicating the azure_cdn_profile module so as to make the management of each of the elements easier. Azure Frontdoor is quite complex, so matching the modules with the Python SDK APIs seems to be the prudent design choice.

Continues to work on #1041 This does not complete this issue, yet.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

Module: azure_rm_afdroute

ADDITIONAL INFORMATION

Provides the ability to manage Routes, per the Python SDK here: https://learn.microsoft.com/en-us/python/api/azure-mgmt-cdn/azure.mgmt.cdn.operations.routesoperations?view=azure-python

Integration Tests: passed
Sanity Tests: passed


@Fred-sun Fred-sun added question Further information is requested medium_priority Medium priority work in In trying to solve, or in working with contributors labels Jun 12, 2024
@Fred-sun
Copy link
Collaborator

yaml[indentation]: Wrong indentation: expected 6 but found 8
plugins/modules/azure_rm_afdroute.py:168

yaml[indentation]: Wrong indentation: expected 10 but found 12
plugins/modules/azure_rm_afdroute.py:172

yaml[indentation]: Wrong indentation: expected 10 but found 12
plugins/modules/azure_rm_afdroute.py:174

yaml[indentation]: Wrong indentation: expected 10 but found 12
plugins/modules/azure_rm_afdroute.py:176

yaml[trailing-spaces]: Trailing spaces
tests/integration/targets/azure_rm_afdroute/tasks/main.yml:77

yaml[trailing-spaces]: Trailing spaces
tests/integration/targets/azure_rm_afdroute/tasks/main.yml:103

yaml[trailing-spaces]: Trailing spaces
tests/integration/targets/azure_rm_afdroute/tasks/main.yml:146

yaml[trailing-spaces]: Trailing spaces
tests/integration/targets/azure_rm_afdroute/tasks/main.yml:174

yaml[empty-lines]: Too many blank lines (1 > 0)
tests/integration/targets/azure_rm_afdroute/tasks/main.yml:260

@jartoo
Copy link
Contributor Author

jartoo commented Jun 14, 2024

Submitted this issue due to the inability to pass a NULL for clearing the cache_configuration.

Azure/azure-sdk-for-python#35801

Will need to test and adjust this code to ensure fully functioning. This may require the azure-mgmt-cdn module to then get bumped to 13.1.1, not 13.1.0 as previously thought and submitted in #1588

Planning to test and cycle back next week.

@jartoo
Copy link
Contributor Author

jartoo commented Jun 14, 2024

yaml[indentation]: Wrong indentation: expected 6 but found 8 plugins/modules/azure_rm_afdroute.py:168

yaml[indentation]: Wrong indentation: expected 10 but found 12 plugins/modules/azure_rm_afdroute.py:172

yaml[indentation]: Wrong indentation: expected 10 but found 12 plugins/modules/azure_rm_afdroute.py:174

yaml[indentation]: Wrong indentation: expected 10 but found 12 plugins/modules/azure_rm_afdroute.py:176

yaml[trailing-spaces]: Trailing spaces tests/integration/targets/azure_rm_afdroute/tasks/main.yml:77

yaml[trailing-spaces]: Trailing spaces tests/integration/targets/azure_rm_afdroute/tasks/main.yml:103

yaml[trailing-spaces]: Trailing spaces tests/integration/targets/azure_rm_afdroute/tasks/main.yml:146

yaml[trailing-spaces]: Trailing spaces tests/integration/targets/azure_rm_afdroute/tasks/main.yml:174

yaml[empty-lines]: Too many blank lines (1 > 0) tests/integration/targets/azure_rm_afdroute/tasks/main.yml:260

Which Sanity check, if one exists, is catching these? Would love to capture this before i submit...thanks!

@Fred-sun
Copy link
Collaborator

@jartoo You can check sanity by referring to the following connection methods, change to the installation directory!. Thanks!

https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
such as: ansible-test sanity plugins/modules/azure_rm_subnet.py

@Fred-sun
Copy link
Collaborator

@jartoo You can also install ansible-lint to check the ansible-playbooks format specification! Thanks!
such as:
pip3 install ansible-lint
ansible-lint tansible_collections_azure/tests/integration/targets/azure_rm_afdroute/tasks/main.yml

@Fred-sun
Copy link
Collaborator

This PR can be merged, but depends on #1588, #1589, #1590, #1591 and #1592, please merge this PR after merging these PRS. Thank you!

@Fred-sun Fred-sun added the ready_for_review The PR has been modified and can be reviewed and merged label Jun 27, 2024
@xuzhang3
Copy link
Collaborator

xuzhang3 commented Jul 1, 2024

@jartoo can you help resolve the file conflict.

@xuzhang3
Copy link
Collaborator

xuzhang3 commented Jul 3, 2024

test failed:

ERROR! couldn't resolve module/action 'azure_rm_afdendpoint'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/cloudtest/.ansible/ansible_collections/azure/azcollection/tests/output/.tmp/integration/azure_rm_afdroute-o4jxa8ls-ÅÑŚÌβŁÈ/tests/integration/targets/azure_rm_afdroute/tasks/main.yml': line 18, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Create EndPoint
  ^ here
Command exited with status 4 after 0.46235060691833496 seconds.
NOTICE: To resume at this test target, use the option: --start-at azure_rm_afdroute
FATAL: Command "ansible-playbook azure_rm_afdroute-kthbg3yx.yml -i inventory -vvvvvv" returned exit status 4.

@Fred-sun
Copy link
Collaborator

Fred-sun commented Jul 8, 2024

@jartoo There is a conflict in this PR, please help solve the conflict, thank you!

@Fred-sun Fred-sun removed the ready_for_review The PR has been modified and can be reviewed and merged label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority question Further information is requested work in In trying to solve, or in working with contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants