ds_to_use.name))
return
+ # -------------------------------------------------------------------------
+ def select_data_store_from_cluster(self):
+
+ ###################################
+ # TODO
+ ###################################
+ # Continue here ...
+
+ podsel = vim.storageDrs.PodSelectionSpec()
+ pod = get_obj(content, [vim.StoragePod], datastorecluster_name)
+ podsel.storagePod = pod
+
+ storagespec = vim.storageDrs.StoragePlacementSpec()
+ storagespec.podSelectionSpec = podsel
+ storagespec.type = 'create'
+ storagespec.folder = destfolder
+ storagespec.resourcePool = resource_pool
+ storagespec.configSpec = vmconf
+
+ try:
+ rec = content.storageResourceManager.RecommendDatastores(
+ storageSpec=storagespec)
+ rec_action = rec.recommendations[0].action[0]
+ real_datastore_name = rec_action.destination.name
+ except:
+ real_datastore_name = template.datastore[0].info.name
+
+ datastore = get_obj(content, [vim.Datastore], real_datastore_name)
+
+
# -------------------------------------------------------------------------
def select_simple_data_store(self):