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 hcloud_network module #59366

Merged
merged 7 commits into from
Jul 30, 2019
Merged

Add hcloud_network module #59366

merged 7 commits into from
Jul 30, 2019

Conversation

LKaemmerling
Copy link
Contributor

@LKaemmerling LKaemmerling commented Jul 22, 2019

SUMMARY

This adds the first of our Network modules for Ansible 2.9.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

hcloud_network

ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Jul 22, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 cloud core_review In order to be merged, this PR must follow the core review workflow. hcloud module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Jul 22, 2019
@ansibot
Copy link
Contributor

ansibot commented Jul 22, 2019

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named hcloud

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named hcloud

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

test/runner/requirements/integration.cloud.hcloud.txt:1:7: put constraints in `test/runner/requirements/constraints.txt`

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jul 22, 2019
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jul 23, 2019
@LKaemmerling
Copy link
Contributor Author

@mattclay i guess for getting the test running you need to rebuild the testcontainer or am i wrong?

Our hcloud-python now officially support python 3.8.

@ansibot
Copy link
Contributor

ansibot commented Jul 29, 2019

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named hcloud

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named hcloud

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

test/runner/requirements/integration.cloud.hcloud.txt:1:7: put constraints in `test/runner/requirements/constraints.txt`

click here for bot help

@ansibot ansibot added has_issue and removed ci_verified Changes made in this PR are causing tests to fail. labels Jul 29, 2019
@ansibot
Copy link
Contributor

ansibot commented Jul 29, 2019

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named hcloud

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named hcloud

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ImportError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

lib/ansible/modules/cloud/hcloud/hcloud_network.py:112:0: ModuleNotFoundError: No module named 'hcloud'

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

test/runner/requirements/integration.cloud.hcloud.txt:1:7: put constraints in `test/runner/requirements/constraints.txt`

click here for bot help

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM

LKaemmerling and others added 2 commits July 30, 2019 06:31
@ansibot ansibot added the core_review In order to be merged, this PR must follow the core review workflow. label Jul 30, 2019
@ghost
Copy link

ghost commented Jul 30, 2019

shipit

@LKaemmerling
Copy link
Contributor Author

/cc @resmo

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jul 30, 2019
lib/ansible/modules/cloud/hcloud/hcloud_network.py Outdated Show resolved Hide resolved
lib/ansible/modules/cloud/hcloud/hcloud_network.py Outdated Show resolved Hide resolved
lib/ansible/modules/cloud/hcloud/hcloud_network.py Outdated Show resolved Hide resolved
lib/ansible/modules/cloud/hcloud/hcloud_network.py Outdated Show resolved Hide resolved
lib/ansible/modules/cloud/hcloud/hcloud_network.py Outdated Show resolved Hide resolved
id:
description:
- The ID of the Hetzner Cloud Networks to manage.
- Only required if no Network I(name) is given
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing that would be noteworthy to users: if the user specifies both id and name during creation, the network will not necessarily have the ID the user specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not really sure if we need to handle this, because we don't handle this in the other modules as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

It would mostly reduce the potential number of support queries when users wonder why something is not working from their POV ;-) Feel free to ignore this; I'm mostly pointing out what I would be wondering about if I would be a user of the module :-)

test/integration/targets/hcloud_network/tasks/main.yml Outdated Show resolved Hide resolved
test/integration/targets/hcloud_network/tasks/main.yml Outdated Show resolved Hide resolved
Co-Authored-By: Felix Fontein <felix@fontein.de>
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed shipit This PR is ready to be merged by Core core_review In order to be merged, this PR must follow the core review workflow. labels Jul 30, 2019
@felixfontein
Copy link
Contributor

It looks like the tests failed because the network shippable-134407-132-integ already exists?!

It's probably best to make sure at the beginning of the tests that the network doesn't exist. (And to clean up with a block/always construct so that the network is also removed if execution of the tests fail somewhere inbetween.)

@LKaemmerling
Copy link
Contributor Author

It looks like the tests failed because the network shippable-134407-132-integ already exists?!

It's probably best to make sure at the beginning of the tests that the network doesn't exist. (And to clean up with a block/always construct so that the network is also removed if execution of the tests fail somewhere inbetween.)

Already working on it :)

@LKaemmerling LKaemmerling reopened this Jul 30, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 30, 2019
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jul 30, 2019
@felixfontein
Copy link
Contributor

LGTM as well!

@felixfontein felixfontein merged commit 5bddd2f into ansible:devel Jul 30, 2019
@felixfontein
Copy link
Contributor

Thanks for creating this module!

@LKaemmerling LKaemmerling deleted the add-hcloud_network branch July 30, 2019 12:03
@ansible ansible locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 cloud has_issue hcloud module This issue/PR relates to a module. new_module This PR includes a new module. new_plugin This PR includes a new plugin. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants