correctly getting the vpc address back
This commit is contained in:
parent
c3e4b5401c
commit
9ae144bad8
2 changed files with 9 additions and 5 deletions
|
|
@ -31,7 +31,8 @@ class SecurityGroups(object):
|
|||
def create_security_group(self):
|
||||
name = self.querystring.get('GroupName')[0]
|
||||
description = self.querystring.get('GroupDescription')[0]
|
||||
group = ec2_backend.create_security_group(name, description)
|
||||
vpc_id = self.querystring.get("VpcId", [None])[0]
|
||||
group = ec2_backend.create_security_group(name, description, vpc_id=vpc_id)
|
||||
if not group:
|
||||
# There was an exisitng group
|
||||
return "There was an existing security group with name {0}".format(name), dict(status=409)
|
||||
|
|
@ -83,7 +84,7 @@ DESCRIBE_SECURITY_GROUPS_RESPONSE = """<DescribeSecurityGroupsResponse xmlns="ht
|
|||
<groupId>{{ group.id }}</groupId>
|
||||
<groupName>{{ group.name }}</groupName>
|
||||
<groupDescription>{{ group.description }}</groupDescription>
|
||||
<vpcId/>
|
||||
<vpcId>{{ group.vpc_id if group.vpc_id != None}}</vpcId>
|
||||
<ipPermissions>
|
||||
{% for rule in group.ingress_rules %}
|
||||
<item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue