LOG.error("Could not find VSphere cluster {!r}.".format(self.config.vsphere_cluster))
return 6
+ self.vsphere.ensure_vm_folder(self.config.folder)
+
return 0
try:
# self.get_cluster()
- self.ensure_vm_folder()
+# self.ensure_vm_folder()
self.check_for_temp_tpl_vm()
self.select_data_store()
if self.rotate_only:
return None
- # -------------------------------------------------------------------------
- def ensure_vm_folder(self):
-
- content = self.service_instance.RetrieveContent()
- dc = self.get_obj(content, [vim.Datacenter], self.config.dc)
-
- tpl_vm_folder = self.get_tpl_folder(dc.vmFolder)
- if tpl_vm_folder:
- self.tpl_vm_folder = tpl_vm_folder
- return True
-
- self._create_folder(dc.vmFolder, self.config.folder, 'VM')
-
- self.tpl_vm_folder = self.get_tpl_folder()
-
- return True
-
# -------------------------------------------------------------------------
def check_for_temp_tpl_vm(self):