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

Added new module for supporting DNS recordset operations in Private DNS zone and Resolved issue #265 #286

Merged
merged 6 commits into from
Oct 28, 2020
Merged

Conversation

aparna-patil
Copy link
Contributor

SUMMARY
This module introduces following DNS record sets operations for a Private DNS zone.

  1. Create DNS record set in a Private DNS zone
  2. Update DNS record set in a Private DNS zone
  3. Delete DNS record set in a Private DNS zone
  4. Get DNS record set details from Private DNS zone

Fixes #265

ISSUE TYPE

  • New Module Pull Request

COMPONENT NAME
azure_rm_privatednsrecordset

ADDITIONAL INFORMATION
This module allows to perform the create/update, delete and list operations on DNS record sets in an existing Private DNS zone. Azure API doc - https://docs.microsoft.com/en-us/rest/api/dns/privatedns/recordsets/createorupdate

@aparna-patil
Copy link
Contributor Author

Hi @Fred-sun, Could you please review this PR and provide your feedback? Thank you!

@Fred-sun
Copy link
Collaborator

Hi @Fred-sun, Could you please review this PR and provide your feedback? Thank you!

I will start reviewing this soon! Thank you!

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.

None of the parameters in the document have defined types!
"return" in the return value should be changed to "returned"!
The 72, 92, 125 lines of azure_rm_privatednsrecordset_info are repeated!

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.

Please add the following two lines in ‘tests/sanity/ignore-2.10.txt’ and ’tests/sanity/ignore-2.11.txt‘!

plugins/modules/azure_rm_privatednsrecordset.py validate-modules:doc-elements-mismatch
plugins/modules/azure_rm_privatednsrecordset.py validate-modules:invalid-ansiblemodule-schema

plugins/modules/azure_rm_privatednsrecordset_info.py Outdated Show resolved Hide resolved
@Fred-sun Fred-sun added medium_priority Medium priority new_module_pr Add new modules work in In trying to solve, or in working with contributors labels Oct 12, 2020
@aparna-patil
Copy link
Contributor Author

Please add the following two lines in ‘tests/sanity/ignore-2.10.txt’ and ’tests/sanity/ignore-2.11.txt‘!

plugins/modules/azure_rm_privatednsrecordset.py validate-modules:doc-elements-mismatch
plugins/modules/azure_rm_privatednsrecordset.py validate-modules:invalid-ansiblemodule-schema

Done, Added these 2 lines in ‘tests/sanity/ignore-2.10.txt’ and ’tests/sanity/ignore-2.11.txt‘. Thank you

@aparna-patil
Copy link
Contributor Author

None of the parameters in the document have defined types!
"return" in the return value should be changed to "returned"!
The 72, 92, 125 lines of azure_rm_privatednsrecordset_info are repeated!

@Fred-sun , Done, Added the changes as suggested, Please review again and let me know if any other changes are required, Thank you!

@aparna-patil
Copy link
Contributor Author

Hi @Fred-sun, Kindly let me know if any other changes required in this PR? I have incorporated all the previous suggested changes. could you please take a look at it once and share your feedback? Thank you!

@Fred-sun
Copy link
Collaborator

@aparna-patil There are still many formatting errors in the document! Please refer to the link ---"https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html", the command is --"ansible-test sanity --color -v --junit”

ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:23:118: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-choices-do-not-match-spec: Argument 'auth_source' in argument_spec defines choices as (['auto', 'cli', 'env', 'credential_file', 'msi']) but documentation defines choices as ([])
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-choices-do-not-match-spec: Argument 'cert_validation_mode' in argument_spec defines choices as (['validate', 'ignore']) but documentation defines choices as ([])
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'api_profile' in argument_spec defines default as ('latest') but documentation defines default as (None)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'append_tags' in argument_spec defines default as (True) but documentation defines default as (False)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'auth_source' in argument_spec defines default as ('auto') but documentation defines default as (None)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'cloud_environment' in argument_spec defines default as ('AzureCloud') but documentation defines default as (None)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'ad_user' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'adfs_authority_url' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'api_profile' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'append_tags' in argument_spec defines type as 'bool' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'auth_source' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'cert_validation_mode' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'client_id' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'cloud_environment' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'password' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'profile' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'record_type' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'relative_name' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'resource_group' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'secret' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'subscription_id' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'tags' in argument_spec defines type as 'dict' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'tenant' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'top' in argument_spec defines type as 'int' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'zone_name' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:43:5: documentation-syntax-error: DOCUMENTATION is not valid YAML
ERROR: tests/sanity/ignore-2.10.txt:725:1: A100: Ignoring 'doc-elements-mismatch' on 'plugins/modules/azure_rm_privatednsrecordset.py' is unnecessar

@aparna-patil
Copy link
Contributor Author

@aparna-patil There are still many formatting errors in the document! Please refer to the link ---"https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html", the command is --"ansible-test sanity --color -v --junit”

ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:23:118: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-choices-do-not-match-spec: Argument 'auth_source' in argument_spec defines choices as (['auto', 'cli', 'env', 'credential_file', 'msi']) but documentation defines choices as ([])
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-choices-do-not-match-spec: Argument 'cert_validation_mode' in argument_spec defines choices as (['validate', 'ignore']) but documentation defines choices as ([])
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'api_profile' in argument_spec defines default as ('latest') but documentation defines default as (None)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'append_tags' in argument_spec defines default as (True) but documentation defines default as (False)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'auth_source' in argument_spec defines default as ('auto') but documentation defines default as (None)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: doc-default-does-not-match-spec: Argument 'cloud_environment' in argument_spec defines default as ('AzureCloud') but documentation defines default as (None)
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'ad_user' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'adfs_authority_url' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'api_profile' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'append_tags' in argument_spec defines type as 'bool' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'auth_source' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'cert_validation_mode' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'client_id' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'cloud_environment' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'password' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'profile' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'record_type' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'relative_name' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'resource_group' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'secret' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'subscription_id' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'tags' in argument_spec defines type as 'dict' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'tenant' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'top' in argument_spec defines type as 'int' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:0:0: parameter-type-not-in-doc: Argument 'zone_name' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/azure_rm_privatednsrecordset_info.py:43:5: documentation-syntax-error: DOCUMENTATION is not valid YAML
ERROR: tests/sanity/ignore-2.10.txt:725:1: A100: Ignoring 'doc-elements-mismatch' on 'plugins/modules/azure_rm_privatednsrecordset.py' is unnecessar

Hi @Fred-sun , I have corrected the documentation errors. Could you please check once and provide your feedback? Thanks.

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.

fixes sanity errors!

tests/sanity/ignore-2.10.txt Outdated Show resolved Hide resolved
tests/sanity/ignore-2.11.txt Outdated Show resolved Hide resolved
aparna-patil and others added 2 commits October 26, 2020 18:07
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
@aparna-patil
Copy link
Contributor Author

@Fred-sun Committed the suggested changes in sanity tests files

@Fred-sun Fred-sun added the ready_for_review The PR has been modified and can be reviewed and merged label Oct 26, 2020
@Fred-sun
Copy link
Collaborator

@Fred-sun Committed the suggested changes in sanity tests files

All test pass! I will push for merge! Thank you very much!

@haiyuazhang haiyuazhang merged commit 6004362 into ansible-collections:dev Oct 28, 2020
@aparna-patil aparna-patil deleted the 265-privateDNSRecordset branch October 29, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority new_module_pr Add new modules ready_for_review The PR has been modified and can be reviewed and merged work in In trying to solve, or in working with contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azure_rm_dnsrecordset does not support private dnszones
3 participants