ELBV2 - Ensure ResourceARN is returned when describing tags (#4990)
This commit is contained in:
parent
bd6b90a6ab
commit
d6bec75e43
@ -635,9 +635,9 @@ REMOVE_TAGS_TEMPLATE = """<RemoveTagsResponse xmlns="http://elasticloadbalancing
|
|||||||
DESCRIBE_TAGS_TEMPLATE = """<DescribeTagsResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/">
|
DESCRIBE_TAGS_TEMPLATE = """<DescribeTagsResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/">
|
||||||
<DescribeTagsResult>
|
<DescribeTagsResult>
|
||||||
<TagDescriptions>
|
<TagDescriptions>
|
||||||
{% for resource, tags in resource_tags.items() %}
|
{% for resource_arn, tags in resource_tags.items() %}
|
||||||
<member>
|
<member>
|
||||||
<ResourceArn>{{ resource.arn }}</ResourceArn>
|
<ResourceArn>{{ resource_arn }}</ResourceArn>
|
||||||
<Tags>
|
<Tags>
|
||||||
{% for key, value in tags.items() %}
|
{% for key, value in tags.items() %}
|
||||||
<member>
|
<member>
|
||||||
|
@ -30,10 +30,12 @@ def test_create_load_balancer():
|
|||||||
)
|
)
|
||||||
lb.get("CreatedTime").tzinfo.should_not.be.none
|
lb.get("CreatedTime").tzinfo.should_not.be.none
|
||||||
lb.get("State").get("Code").should.equal("provisioning")
|
lb.get("State").get("Code").should.equal("provisioning")
|
||||||
|
lb_arn = lb.get("LoadBalancerArn")
|
||||||
|
|
||||||
# Ensure the tags persisted
|
# Ensure the tags persisted
|
||||||
response = conn.describe_tags(ResourceArns=[lb.get("LoadBalancerArn")])
|
tag_desc = conn.describe_tags(ResourceArns=[lb_arn])["TagDescriptions"][0]
|
||||||
tags = {d["Key"]: d["Value"] for d in response["TagDescriptions"][0]["Tags"]}
|
tag_desc.should.have.key("ResourceArn").equals(lb_arn)
|
||||||
|
tags = {d["Key"]: d["Value"] for d in tag_desc["Tags"]}
|
||||||
tags.should.equal({"key_name": "a_value"})
|
tags.should.equal({"key_name": "a_value"})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user