update authorize, revoke, and delete convenience methods to support VPC-linked groups #740

merged 5 commits into from May 14, 2012

2 participants


These changes allow the authorize, revoke, and delete convenience methods to be used on VPC-linked security groups while maintaining functionality for non-VPC groups.

Closes gh-561


It turns out this PR will break eucalyptus/openstack given that they don't currently support the new auto-generated security group ids. Updating this now to use group id only when using VPC.

jtriley added some commits May 14, 2012
@jtriley jtriley only use group id on VPC-linked security groups
This allows authorize(), revoke(), and delete() to be used with
VPC-linked groups without breaking systems using older AWS APIs such as
Eucalyptus, Openstack, etc.
@jtriley jtriley add vpc_id to VPC-linked group obj before returning
This commit fixes a bug where vpc_id attribute is not set on a newly
created group object when using vpc_id kwarg of create_security_group().
This breaks all of the authorize, revoke, and delete security group
convenience methods for VPC-linked groups. A separate call to
get_all_security_groups() to re-fetch the group correctly includes the
vpc_id but this fix ensures that the object immediately returned after
creating a VPC-linked group has the proper vpc_id attribute.

@garnaat @gholms @gtaylor I believe this PR is ready to go and will not break Euclayptus, Openstack, and other systems that do not currently support the new group id API. I've tested this by creating both VPC-linked and non-VPC security groups and confirmed, using pudb debugger, that only the group id is used for VPC-linked groups and that only group name is used for everything else when calling authorize, revoke, and delete convenience methods. I also fixed a bug in create_security_group where vpc_id attribute was not set on the newly created group object (6c7c864)

@garnaat garnaat merged commit 6c7c864 into boto:develop May 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment