commit
cc2d333632
@ -104,7 +104,7 @@ class SecurityGroups(BaseResponse):
|
|||||||
if self.is_not_dryrun("GrantSecurityGroupIngress"):
|
if self.is_not_dryrun("GrantSecurityGroupIngress"):
|
||||||
for args in self._process_rules_from_querystring():
|
for args in self._process_rules_from_querystring():
|
||||||
self.ec2_backend.authorize_security_group_ingress(*args)
|
self.ec2_backend.authorize_security_group_ingress(*args)
|
||||||
return AUTHORIZE_SECURITY_GROUP_INGRESS_REPONSE
|
return AUTHORIZE_SECURITY_GROUP_INGRESS_RESPONSE
|
||||||
|
|
||||||
def create_security_group(self):
|
def create_security_group(self):
|
||||||
name = self._get_param("GroupName")
|
name = self._get_param("GroupName")
|
||||||
@ -158,7 +158,7 @@ class SecurityGroups(BaseResponse):
|
|||||||
if self.is_not_dryrun("RevokeSecurityGroupIngress"):
|
if self.is_not_dryrun("RevokeSecurityGroupIngress"):
|
||||||
for args in self._process_rules_from_querystring():
|
for args in self._process_rules_from_querystring():
|
||||||
self.ec2_backend.revoke_security_group_ingress(*args)
|
self.ec2_backend.revoke_security_group_ingress(*args)
|
||||||
return REVOKE_SECURITY_GROUP_INGRESS_REPONSE
|
return REVOKE_SECURITY_GROUP_INGRESS_RESPONSE
|
||||||
|
|
||||||
|
|
||||||
CREATE_SECURITY_GROUP_RESPONSE = """<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-15/">
|
CREATE_SECURITY_GROUP_RESPONSE = """<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-15/">
|
||||||
@ -265,12 +265,12 @@ DESCRIBE_SECURITY_GROUPS_RESPONSE = (
|
|||||||
</DescribeSecurityGroupsResponse>"""
|
</DescribeSecurityGroupsResponse>"""
|
||||||
)
|
)
|
||||||
|
|
||||||
AUTHORIZE_SECURITY_GROUP_INGRESS_REPONSE = """<AuthorizeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-15/">
|
AUTHORIZE_SECURITY_GROUP_INGRESS_RESPONSE = """<AuthorizeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-15/">
|
||||||
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
|
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
|
||||||
<return>true</return>
|
<return>true</return>
|
||||||
</AuthorizeSecurityGroupIngressResponse>"""
|
</AuthorizeSecurityGroupIngressResponse>"""
|
||||||
|
|
||||||
REVOKE_SECURITY_GROUP_INGRESS_REPONSE = """<RevokeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-15/">
|
REVOKE_SECURITY_GROUP_INGRESS_RESPONSE = """<RevokeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-15/">
|
||||||
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
|
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
|
||||||
<return>true</return>
|
<return>true</return>
|
||||||
</RevokeSecurityGroupIngressResponse>"""
|
</RevokeSecurityGroupIngressResponse>"""
|
||||||
|
@ -706,14 +706,14 @@ def test_create_autoscaling_group_boto3():
|
|||||||
"ResourceId": "test_asg",
|
"ResourceId": "test_asg",
|
||||||
"ResourceType": "auto-scaling-group",
|
"ResourceType": "auto-scaling-group",
|
||||||
"Key": "propogated-tag-key",
|
"Key": "propogated-tag-key",
|
||||||
"Value": "propogate-tag-value",
|
"Value": "propagate-tag-value",
|
||||||
"PropagateAtLaunch": True,
|
"PropagateAtLaunch": True,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ResourceId": "test_asg",
|
"ResourceId": "test_asg",
|
||||||
"ResourceType": "auto-scaling-group",
|
"ResourceType": "auto-scaling-group",
|
||||||
"Key": "not-propogated-tag-key",
|
"Key": "not-propogated-tag-key",
|
||||||
"Value": "not-propogate-tag-value",
|
"Value": "not-propagate-tag-value",
|
||||||
"PropagateAtLaunch": False,
|
"PropagateAtLaunch": False,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -744,14 +744,14 @@ def test_create_autoscaling_group_from_instance():
|
|||||||
"ResourceId": "test_asg",
|
"ResourceId": "test_asg",
|
||||||
"ResourceType": "auto-scaling-group",
|
"ResourceType": "auto-scaling-group",
|
||||||
"Key": "propogated-tag-key",
|
"Key": "propogated-tag-key",
|
||||||
"Value": "propogate-tag-value",
|
"Value": "propagate-tag-value",
|
||||||
"PropagateAtLaunch": True,
|
"PropagateAtLaunch": True,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ResourceId": "test_asg",
|
"ResourceId": "test_asg",
|
||||||
"ResourceType": "auto-scaling-group",
|
"ResourceType": "auto-scaling-group",
|
||||||
"Key": "not-propogated-tag-key",
|
"Key": "not-propogated-tag-key",
|
||||||
"Value": "not-propogate-tag-value",
|
"Value": "not-propagate-tag-value",
|
||||||
"PropagateAtLaunch": False,
|
"PropagateAtLaunch": False,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -1062,7 +1062,7 @@ def test_detach_one_instance_decrement():
|
|||||||
"ResourceId": "test_asg",
|
"ResourceId": "test_asg",
|
||||||
"ResourceType": "auto-scaling-group",
|
"ResourceType": "auto-scaling-group",
|
||||||
"Key": "propogated-tag-key",
|
"Key": "propogated-tag-key",
|
||||||
"Value": "propogate-tag-value",
|
"Value": "propagate-tag-value",
|
||||||
"PropagateAtLaunch": True,
|
"PropagateAtLaunch": True,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1116,7 +1116,7 @@ def test_detach_one_instance():
|
|||||||
"ResourceId": "test_asg",
|
"ResourceId": "test_asg",
|
||||||
"ResourceType": "auto-scaling-group",
|
"ResourceType": "auto-scaling-group",
|
||||||
"Key": "propogated-tag-key",
|
"Key": "propogated-tag-key",
|
||||||
"Value": "propogate-tag-value",
|
"Value": "propagate-tag-value",
|
||||||
"PropagateAtLaunch": True,
|
"PropagateAtLaunch": True,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1169,7 +1169,7 @@ def test_attach_one_instance():
|
|||||||
"ResourceId": "test_asg",
|
"ResourceId": "test_asg",
|
||||||
"ResourceType": "auto-scaling-group",
|
"ResourceType": "auto-scaling-group",
|
||||||
"Key": "propogated-tag-key",
|
"Key": "propogated-tag-key",
|
||||||
"Value": "propogate-tag-value",
|
"Value": "propagate-tag-value",
|
||||||
"PropagateAtLaunch": True,
|
"PropagateAtLaunch": True,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user