Example #1
0
 def __init__(self, virtapi, read_only=False, scheme="https"):
     super(VMwareVCDriver, self).__init__(virtapi)
     self._cluster_name = CONF.vmware.cluster_name
     if not self._cluster_name:
         self._cluster = None
     else:
         self._cluster = vm_util.get_cluster_ref_from_name(
                         self._session, self._cluster_name)
         if self._cluster is None:
             raise exception.NotFound(_("VMware Cluster %s is not found")
                                        % self._cluster_name)
     self._datastore_regex = None
     if CONF.vmware.datastore_regex:
         try:
             self._datastore_regex = re.compile(CONF.vmware.datastore_regex)
         except re.error:
             raise exception.InvalidInput(reason=
             _("Invalid Regular Expression %s")
             % CONF.vmware.datastore_regex)
     self._volumeops = volumeops.VMwareVolumeOps(self._session,
                                                 self._cluster)
     self._vmops = vmops.VMwareVMOps(self._session, self.virtapi,
                                     self._volumeops, self._cluster,
                                     self._datastore_regex)
     self._vc_state = None
Example #2
0
 def __init__(self, session, cluster_name=None):
     self._session = session
     if not cluster_name:
         self._cluster = None
     else:
         self._cluster = vm_util.get_cluster_ref_from_name(
                                     self._session, cluster_name)
Example #3
0
 def __init__(self, virtapi, read_only=False, scheme="https"):
     super(VMwareVCDriver, self).__init__(virtapi)
     if not self._cluster_name:
         self._cluster = None
     else:
         self._cluster = vm_util.get_cluster_ref_from_name(self._session, self._cluster_name)
         if self._cluster is None:
             raise exception.NotFound(_("VMware Cluster %s is not found") % self._cluster_name)
     self._vc_state = None
Example #4
0
 def __init__(self, virtapi, read_only=False, scheme="https"):
     super(VMwareVCDriver, self).__init__(virtapi)
     if not self._cluster_name:
         self._cluster = None
     else:
         self._cluster = vm_util.get_cluster_ref_from_name(
             self._session, self._cluster_name)
         if self._cluster is None:
             raise exception.NotFound(
                 _("VMware Cluster %s is not found") % self._cluster_name)
     self._vc_state = None