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 synchronizing of VNet peering when sync level is LocalNotInSync #1025

Merged
merged 7 commits into from
Jan 12, 2023

Conversation

kmj251
Copy link
Contributor

@kmj251 kmj251 commented Nov 16, 2022

SUMMARY

Added a method to sync VNet Peering when the peering_sync_level value is LocalNotInSync.

Fixes #1023

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

azure_rm_virtualnetworkpeering

ADDITIONAL INFORMATION

1.) Add a CIDR block of address space to an existing peered VNet.

2.) The peering is now "Out of sync".

3.) The peering where the sync_level is "LocalNotInSync" needs to be re-synched.

{
    "changed": false,
    "failed": false
}

{
    "changed": true,
    "failed": false,
    "peering_sync_level": "FullyInSync"
}

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Nov 22, 2022
Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sanity errors need to be improved

plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
return vnetpeering_to_dict(response)
except Exception as exc:
self.fail("Error creating Azure Virtual Network Peering: {0}.".format(exc.message))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed whitespace.

plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small change request!

plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_virtualnetworkpeering.py Outdated Show resolved Hide resolved
@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Dec 19, 2022
@xuzhang3
Copy link
Collaborator

@kmj251 LGTM

@xuzhang3 xuzhang3 merged commit d503fde into ansible-collections:dev Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically synchronize peered VNet using the azure.azcollection.azure_rm_virtualnetworkpeering module
3 participants