From 0712d40f71016d03f71f3348ebc0721a69927662 Mon Sep 17 00:00:00 2001 From: Jon Haddad Date: Thu, 5 Dec 2013 16:39:25 -0800 Subject: [PATCH] added vpc_id to deletion --- moto/ec2/responses/security_groups.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moto/ec2/responses/security_groups.py b/moto/ec2/responses/security_groups.py index 9ec5eaa46..5e8eebaa4 100644 --- a/moto/ec2/responses/security_groups.py +++ b/moto/ec2/responses/security_groups.py @@ -42,8 +42,10 @@ class SecurityGroups(object): 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 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: # There was no such group return "There was no security group with name {0}".format(name), dict(status=404)