Commit 63f45026 by Feanil Patel

Ensure instances are sorted.

parent f4aa25b8
...@@ -269,7 +269,8 @@ class Ec2Inventory(object): ...@@ -269,7 +269,8 @@ class Ec2Inventory(object):
reservations = conn.get_all_instances() reservations = conn.get_all_instances()
for reservation in reservations: for reservation in reservations:
for instance in reservation.instances: instances = sorted(reservation.instances)
for instance in instances:
self.add_instance(instance, region) self.add_instance(instance, region)
except boto.exception.BotoServerError as e: except boto.exception.BotoServerError as e:
......
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