Add StateTransitionReason to ec2:DescribeInstances response (#7495)
This commit is contained in:
parent
009d0191f9
commit
3e90012509
@ -463,7 +463,7 @@ INSTANCE_TEMPLATE = """<item>
|
||||
<privateDnsName>{{ instance.private_dns }}</privateDnsName>
|
||||
<publicDnsName>{{ instance.public_dns }}</publicDnsName>
|
||||
<dnsName>{{ instance.public_dns }}</dnsName>
|
||||
<reason/>
|
||||
<reason>{{ instance._reason }}</reason>
|
||||
{% if instance.key_name is not none %}
|
||||
<keyName>{{ instance.key_name }}</keyName>
|
||||
{% endif %}
|
||||
|
@ -973,6 +973,7 @@ def test_instance_start_and_stop():
|
||||
|
||||
instance1.reload()
|
||||
assert instance1.state == {"Code": 80, "Name": "stopped"}
|
||||
assert instance1.state_transition_reason.startswith("User initiated")
|
||||
|
||||
with pytest.raises(ClientError) as ex:
|
||||
client.start_instances(InstanceIds=[instance1.id], DryRun=True)
|
||||
|
Loading…
Reference in New Issue
Block a user