added vpc_id to deletion

This commit is contained in:
Jon Haddad 2013-12-05 16:39:25 -08:00
parent 4fc7317804
commit 0712d40f71

View File

@ -42,8 +42,10 @@ class SecurityGroups(object):
def delete_security_group(self): def delete_security_group(self):
# TODO this should raise an error if there are instances in the group. See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSecurityGroup.html # TODO this should raise an error if there are instances in the group. See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSecurityGroup.html
name = self.querystring.get('GroupName')[0] name = self.querystring.get('GroupName')[0]
group = ec2_backend.delete_security_group(name) vpc_id = self.querystring.get("VpcId", [None])[0]
# needs vpc now
group = ec2_backend.delete_security_group(name, vpc_id)
if not group: if not group:
# There was no such group # There was no such group
return "There was no security group with name {0}".format(name), dict(status=404) return "There was no security group with name {0}".format(name), dict(status=404)