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

Fix ec2_vpc_net tags #34725

Merged
merged 2 commits into from
Jan 16, 2018
Merged

Fix ec2_vpc_net tags #34725

merged 2 commits into from
Jan 16, 2018

Conversation

brandond
Copy link
Contributor

SUMMARY

PR #33105 broke the tags returned by ec2_vpc_net - it was returning the raw boto3 list instead of a dict as expected.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_vpc_net

ANSIBLE VERSION
ansible 2.5.0
  config file = /home/ec2-user/repos/cmb-infosec-ansible/ansible.cfg
  configured module search path = [u'/home/ec2-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ec2-user/ansible-env/lib/python2.7/site-packages/ansible
  executable location = /home/ec2-user/ansible-env/bin/ansible
  python version = 2.7.13+ (default, Feb 24 2017, 13:51:49) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
ADDITIONAL INFORMATION

before:

   "item": {
        "cidr_block": "10.12.64.0/20",
        "cidr_block_association_set": [
            {
                "association_id": "vpc-cidr-assoc-29026741",
                "cidr_block": "10.12.64.0/20",
                "cidr_block_state": {
                    "state": "associated"
                }
            }
        ],
        "classic_link_enabled": false,
        "dhcp_options_id": "dopt-7a2be01f",
        "id": "vpc-4eac0c28",
        "instance_tenancy": "default",
        "is_default": false,
        "state": "available",
        "tags": [
            {
                "key": "Environment",
                "value": "P03"
            },
            {
                "key": "TechOwner",
                "value": "InfoSec"
            },
            {
                "key": "SecurityClass",
                "value": "005"
            },
            {
                "key": "Product",
                "value": "INT|INT|InfoSec"
            },
            {
                "key": "Name",
                "value": "P03-Integration"
            },
            {
                "key": "BillingId",
                "value": "F301|InfoSec"
            }
        ]
    },

after:

    "item": {
        "cidr_block": "10.12.64.0/20",
        "cidr_block_association_set": [
            {
                "association_id": "vpc-cidr-assoc-29026741",
                "cidr_block": "10.12.64.0/20",
                "cidr_block_state": {
                    "state": "associated"
                }
            }
        ],
        "classic_link_enabled": false,
        "dhcp_options_id": "dopt-7a2be01f",
        "id": "vpc-4eac0c28",
        "instance_tenancy": "default",
        "is_default": false,
        "state": "available",
        "tags": {
            "BillingId": "F301|InfoSec",
            "Environment": "P03",
            "Name": "P03-Integration",
            "Product": "INT|INT|InfoSec",
            "SecurityClass": "005",
            "TechOwner": "InfoSec"
        }

PR #33105 broke the tags returned by ec2_vpc_net - it was returning the raw boto3 list instead of a dict as expected.
@ansibot
Copy link
Contributor

ansibot commented Jan 10, 2018

cc @defionscode @s-hertel @willthames
click here for bot help

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 aws bugfix_pull_request cloud core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jan 10, 2018
@willthames
Copy link
Contributor

This should have been caught by tests - let me know if you're willing to add tests that tags are correctly applied and updated (if not, we'll just have to add some tests later!)

Copy link
Contributor

@willthames willthames left a comment

Choose a reason for hiding this comment

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

Would prefer to have tests but this looks otherwise good to me

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jan 11, 2018
@ansibot ansibot added the test This PR relates to tests. label Jan 16, 2018
@s-hertel s-hertel merged commit 240024e into ansible:devel Jan 16, 2018
@s-hertel
Copy link
Contributor

@willthames Added a test!

Thanks @brandond!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 aws bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. 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

4 participants