neutron.get_secgroup_uuids calls resource_by_refid

Bug #1250286 reported by Steve Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Steve Baker

Bug Description

As discussed at summit, calls to resource_by_refid should be replaced with API calls to achieve the same end, wherever that is possible.

Changed in heat:
importance: Undecided → Medium
assignee: nobody → Steve Baker (steve-stevebaker)
milestone: none → icehouse-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/55946

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/55947

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/55946
Committed: http://github.com/openstack/heat/commit/902154c5b1bd4222e5c0ef484a417885ae1e8991
Submitter: Jenkins
Branch: master

commit 902154c5b1bd4222e5c0ef484a417885ae1e8991
Author: Steve Baker <email address hidden>
Date: Tue Nov 12 11:28:14 2013 +1300

    Rewrite get_secgroup_uuids to avoid resource_by_refid

    get_secgroup_uuids has changed in the following ways:
    * No longer attempts to find a security group name via
      a resource_by_refid lookup. resource_by_refid only exists
      as a workaround for AWS compatibility resource which are
      not backed by an API. Usage of resource_by_refid should be
      avoided in native resources if at all possible.
    * If the security group looks like a UUID, assume it is
      a UUID for a security group that exists
    * Call client.list_security_groups only once, and only if
      there is a non-uuid security group specified
    * Do not attempt to reduce duplicate security groups to a unique
      list. If that is important for resources it can be done in
      validation.
    * Raise PhysicalResourceNotFound if name maps to no group
    * Raise PhysicalResourceNameAmbiguity if name maps to more than one
      group

    Change-Id: I106adc15a7882192884d37c0806947470d139434
    Closes-Bug: #1250286

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

Reviewed: https://review.openstack.org/55947
Committed: http://github.com/openstack/heat/commit/14439e8deb8141abd2448e592917a00574bf430e
Submitter: Jenkins
Branch: master

commit 14439e8deb8141abd2448e592917a00574bf430e
Author: Steve Baker <email address hidden>
Date: Tue Nov 12 11:28:53 2013 +1300

    Use get_secgroup_uuids in Instance

    Instance._get_security_groups_id serves the same
    purpose as neutron.get_secgroup_uuids. This change switches
    Instance to using get_secgroup_uuids instead.

    Updating the test has the side-effect on getting full test
    coverage on get_secgroup_uuids, albeit indirectly.

    Change-Id: I8cdc51692fd8d96e68c6c947891c9708f77d54c3
    Related-Bug: #1250286

Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.