from .config import CrTplConfiguration
-__version__ = '0.10.4'
+__version__ = '0.10.5'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
msg = "Did not found an usable datastore."
raise ExpectedHandlerError(msg)
- self.tpl_data_store = random.choice(usable_ds)
- LOG.info("Using datastore {!r} for volume of temporary VM to create.".format(
- self.tpl_data_store.name))
+ for st_type in ('SATA', 'SAS', 'SSD'):
+
+ ds_list = []
+ for ds in usable_ds:
+ if ds.storage_type == st_type:
+ ds_list.append(ds)
+ if not len(ds_list):
+ continue
+
+ self.tpl_data_store = random.choice(ds_list)
+ LOG.info("Using datastore {!r} for volume of temporary VM to create.".format(
+ self.tpl_data_store.name))
+ break
# -------------------------------------------------------------------------
def create_vm(self):