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

feat: add security_group to scaleway compute resource #45699

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

abarbare
Copy link
Contributor

SUMMARY

Let the scaleway user assigning a Security Group resource to a compute server

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

scaleway_compute

ANSIBLE VERSION
ansible 2.8.0.dev0 (scw_compute_sg 8ff9e60012) last updated 2018/09/16 21:03:04 (GMT +200)
  config file = /Users/abarbare/.ansible.cfg
  configured module search path = [u'/Users/abarbare/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/abarbare/Documents/ansible/lib/ansible
  executable location = /Users/abarbare/Documents/ansible/bin/ansible
  python version = 2.7.15 (default, Jul 23 2018, 21:27:06) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]

@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.8 This issue/PR affects Ansible v2.8 cloud feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. scaleway support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 16, 2018
@ansibot
Copy link
Contributor

ansibot commented Sep 16, 2018

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

lib/ansible/modules/cloud/scaleway/scaleway_compute.py:0:0: E309 version_added for new option (security_group) should be 2.8. Currently 0.0

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Sep 16, 2018
@ryansb ryansb removed the needs_triage Needs a first human triage before being processed. label Sep 18, 2018
@pilou-
Copy link
Contributor

pilou- commented Sep 21, 2018

@abarbare a rebase is required here

@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Sep 21, 2018
@ansibot
Copy link
Contributor

ansibot commented Sep 21, 2018

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

lib/ansible/modules/cloud/scaleway/scaleway_compute.py:0:0: E309 version_added for new option (security_group) should be 2.8. Currently 0.0

click here for bot help

@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Sep 21, 2018
@abarbare abarbare changed the title WIP: feat: add security_group to scaleway compute resource feat: add security_group to scaleway compute resource Sep 23, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. ci_verified Changes made in this PR are causing tests to fail. labels Sep 23, 2018
@abarbare
Copy link
Contributor Author

Cc @sieben

@@ -354,7 +376,7 @@ def present_strategy(compute_api, wished_server):
if compute_api.module.check_mode:
return changed, {"status": "Server %s attributes would be changed." % target_server["id"]}

server_change_attributes(compute_api=compute_api, target_server=target_server, wished_server=wished_server)
target_server = server_change_attributes(compute_api=compute_api, target_server=target_server, wished_server=wished_server)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather use another variable name, maybe created_server ? server_change_attributes method should also use another variable name for the returned object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I can't modify only this variable as it is returned by the function.
The function will return target_server for existing server or updated one. Changing only this variable will cause an undefined variable error on return.

@abarbare abarbare changed the title feat: add security_group to scaleway compute resource WIP feat: add security_group to scaleway compute resource Sep 24, 2018
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Sep 24, 2018
@ansibot
Copy link
Contributor

ansibot commented Sep 24, 2018

@ansibot ansibot added the test This PR relates to tests. label Sep 24, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed shipit This PR is ready to be merged by Core needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Oct 6, 2018
@abarbare
Copy link
Contributor Author

Rebased to relauch CI.

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html 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 Oct 11, 2018
@pilou-
Copy link
Contributor

pilou- commented Oct 14, 2018

@abarbare another rebase is needed

@abarbare
Copy link
Contributor Author

Rebased to relauch CI.

@abarbare abarbare closed this Oct 20, 2018
@abarbare abarbare reopened this Oct 20, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 20, 2018
@abarbare
Copy link
Contributor Author

shipit

@remyleone
Copy link
Contributor

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 Oct 23, 2018
@abarbare
Copy link
Contributor Author

bot_status

@ansibot
Copy link
Contributor

ansibot commented Oct 23, 2018

Components

lib/ansible/modules/cloud/scaleway/scaleway_compute.py
support: community
maintainers:

test/legacy/roles/scaleway_compute/tasks/main.yml
support: core
maintainers:

test/legacy/roles/scaleway_compute/tasks/security_group.yml
support: core
maintainers:

Metadata

waiting_on: ansible
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 2
ansible_shipits (core team members): 0
shipit_actors (maintainers or core team members): abarbare sieben
shipit_actors_other: []
automerge: automerge !module file(s) test failed

click here for bot help

@gundalow gundalow merged commit b4a9b29 into ansible:devel Oct 24, 2018
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 cloud feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) scaleway 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

6 participants