Commit 1c3a6549 by James Cammarata

Conditionally try to get ebs_optimized parameter from instance

parent 38c29e1f
......@@ -570,13 +570,17 @@ def get_instance_info(inst):
'root_device_type': inst.root_device_type,
'root_device_name': inst.root_device_name,
'state': inst.state,
'hypervisor': inst.hypervisor,
'ebs_optimized': inst.ebs_optimized}
'hypervisor': inst.hypervisor}
try:
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
except AttributeError:
instance_info['virtualization_type'] = None
try:
instance_info['ebs_optimized'] = getattr(inst, 'ebs_optimized')
except AttributeError:
instance_info['ebs_optimized'] = False
return instance_info
def boto_supports_associate_public_ip_address(ec2):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment