Make VMCollection return sorted VM list on iteration

This makes it much easier to write tests...
This commit is contained in:
Marek Marczykowski-Górecki 2017-05-25 16:10:39 +02:00
parent 9cdf9a0e60
commit 93d7249ef0
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -101,7 +101,7 @@ class VMCollection(object):
def __iter__(self):
self.refresh_cache()
for vm in self._vm_list:
for vm in sorted(self._vm_list):
yield self[vm]
def keys(self):