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 ns1_record module and tests #53964

Open
wants to merge 3 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@mburtless
Copy link

mburtless commented Mar 18, 2019

SUMMARY

NS1 (https://ns1.com/) would like to contribute an official module for working with resources in our managed DNS platform to Ansible. The intent of this PR is to establish the necessary namespace, module utils, documentation fragments, and the first module, ns1_record. This module maintains DNS records in existing DNS zones that are hosted with NS1.

This PR also contains the necessary changes to enable integration testing, a cloud config template (as an API key is required) and integration tests for the first module.

Following this PR we have several other modules we would like to add, including ns1_zone to manage hosted DNS zones and ns1_facts to gather facts about resources hosted with NS1.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

ns1_record

ADDITIONAL INFORMATION

The NS1 python SDK, ns1-python, is required for testing and using this module. This can be installed via pip (pip install ns1-python). An NS1 API key must be defined in test/integration/cloud-config-ns1.ini in order to run integration tests against the NS1 platform. A key can be obtained by signing up for a free NS1 developer account at https://ns1.com/signup

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 18, 2019

@ansibot

This comment was marked as resolved.

Copy link
Contributor

ansibot commented Mar 18, 2019

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/net_tools/ns1/ns1_record.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/net_tools/ns1/ns1_record.py:298:31: SyntaxError: for key, value in subparam.items()

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/net_tools/ns1/ns1_record.py:298:31: SyntaxError: invalid syntax

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/net_tools/ns1/ns1_record.py:194:13: W291 trailing whitespace

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/net_tools/ns1/ns1_record.py:0:0: E307 version_added should be '2.8'. Currently '2.7'

click here for bot help

Show resolved Hide resolved lib/ansible/module_utils/ns1.py Outdated
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 18, 2019

@mburtless This PR contains @ mentions in at least one commit message. Those mentions can cause cascading notifications through GitHub and need to be removed. Please squash or amend your commits to remove the mentions.

click here for bot help

@ansibot ansibot removed the ci_verified label Mar 18, 2019

Adds fixes for sanity test and review results
- Fix dictionary comprehension format to be py2.6 compatable
- Fix whitespace error
- Fix version number in version_added
- Removes unused import per review by mattclay
- Modifies lisence in module util to BSD per review by resmo

@mburtless mburtless force-pushed the mburtless:add-ns1-record-module branch to ef2c834 Mar 18, 2019

@mburtless

This comment has been minimized.

Copy link
Author

mburtless commented Mar 18, 2019

Issues from previous sanity tests and reviews by @resmo and @mattclay should now be resolved.

Shippable tests seemed to fail with no error after a timeout. Console output seemed to be hung on a step unrelated to this module (Create user with ssh key). Can anyone point me in the right direction to ensure CI tests are passing as expected? Seems to have sorted itself out on a subsequent run.

@ansibot ansibot added core_review and removed needs_revision labels Mar 18, 2019

@ansibot ansibot added the stale_ci label Mar 28, 2019

@mburtless

This comment has been minimized.

Copy link
Author

mburtless commented Apr 1, 2019

At this point all issues from sanity tests and reviews have been resolved. Can anyone comment on what the next step is here?

@@ -0,0 +1,3 @@
shippable/cloud/group1

This comment has been minimized.

Copy link
@mattclay

mattclay Apr 1, 2019

Member

Use unsupported here instead, since these tests cannot run on Shippable.

This comment has been minimized.

Copy link
@mburtless

mburtless Apr 2, 2019

Author

Makes sense, thanks. Should be all set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.