def setUp(self): super(PathUtilsTestCase, self).setUp() self._setup_lib_mocks() self._pathutils = pathutils.PathUtils() self._pathutils._win32_utils = mock.Mock() self._mock_run = self._pathutils._win32_utils.run_and_check_output
def __init__(self, host='.'): super(VMUtils, self).__init__(host) self._jobutils = jobutils.JobUtils(host) self._pathutils = pathutils.PathUtils() self._enabled_states_map = { v: k for k, v in six.iteritems(self._vm_power_states_map) }
def __init__(self): self._conn_cimv2 = self._get_wmi_conn(self._wmi_cimv2_namespace) self._conn_storage = self._get_wmi_conn(self._wmi_storage_namespace) self._win32_utils = win32utils.Win32Utils() # Physical device names look like \\.\PHYSICALDRIVE1 self._phys_dev_name_regex = re.compile(r'\\\\.*\\[a-zA-Z]*([\d]+)') self._pathutils = pathutils.PathUtils()
def __init__(self): self._conn_wmi = self._get_wmi_conn('//./root/wmi') self._ensure_wt_provider_available() self._pathutils = pathutils.PathUtils() self._hostutils = hostutils.HostUtils() self._win32utils = win32utils.Win32Utils() self._win_gteq_6_3 = self._hostutils.check_min_windows_version(6, 3)
def __init__(self, host='.'): self._vs_man_svc_attr = None self._jobutils = jobutils.JobUtils() self._pathutils = pathutils.PathUtils() self._enabled_states_map = { v: k for k, v in six.iteritems(self._vm_power_states_map) } if sys.platform == 'win32': self._init_hyperv_wmi_conn(host) # Physical device names look like \\.\PHYSICALDRIVE1 self._phys_dev_name_regex = re.compile(r'\\\\.*\\[\w]*([\d])')