Beispiel #1
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
     self._initiator = None
     self._default_root_device = 'vda'
     self.volume_drivers = {'smbfs': SMBFSVolumeDriver(),
                            'iscsi': ISCSIVolumeDriver()}
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
     self._initiator = None
     self._default_root_device = 'vda'
     self.volume_drivers = {'smbfs': SMBFSVolumeDriver(),
                            'iscsi': ISCSIVolumeDriver()}
Beispiel #3
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = utilsfactory.get_pathutils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._vif_driver = None
     self._load_vif_driver_class()
Beispiel #4
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = utilsfactory.get_pathutils()
     self._volumeops = volumeops.VolumeOps()
     self._vmops = vmops.VMOps()
     self._imagecache = imagecache.ImageCache()
Beispiel #5
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = utilsfactory.get_pathutils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._vif_driver = None
     self._load_vif_driver_class()
Beispiel #6
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = utilsfactory.get_pathutils()
     self._volumeops = volumeops.VolumeOps()
     self._vmops = vmops.VMOps()
     self._imagecache = imagecache.ImageCache()
    def __init__(self, state_change_callback=None,
                 running_state_callback=None):
        self._vmutils = utilsfactory.get_vmutils()
        self._listener = self._vmutils.get_vm_power_state_change_listener(
            timeframe=CONF.hyperv.power_state_check_timeframe,
            filtered_states=self._TRANSITION_MAP.keys())

        self._polling_interval = CONF.hyperv.power_state_event_polling_interval
        self._state_change_callback = state_change_callback
        self._running_state_callback = running_state_callback
Beispiel #8
0
    def __init__(self, state_change_callback=None,
                 running_state_callback=None):
        self._vmutils = utilsfactory.get_vmutils()
        self._listener = self._vmutils.get_vm_power_state_change_listener(
            timeframe=CONF.hyperv.power_state_check_timeframe,
            filtered_states=self._TRANSITION_MAP.keys())

        self._polling_interval = CONF.hyperv.power_state_event_polling_interval
        self._state_change_callback = state_change_callback
        self._running_state_callback = running_state_callback
Beispiel #9
0
    def _test_returned_class(self, expected_class, force_v1, os_supports_v2):
        CONF.set_override('force_hyperv_utils_v1', force_v1, 'hyperv')
        with mock.patch.object(
                hostutils.HostUtils,
                'check_min_windows_version') as mock_check_min_windows_version:
            mock_check_min_windows_version.return_value = os_supports_v2

            if os_supports_v2 and force_v1:
                self.assertRaises(vmutils.HyperVException,
                                  utilsfactory.get_vmutils)
            else:
                actual_class = type(utilsfactory.get_vmutils())
                self.assertEqual(actual_class, expected_class)
Beispiel #10
0
    def _test_returned_class(self, expected_class, force_v1, os_supports_v2):
        CONF.set_override('force_hyperv_utils_v1', force_v1, 'hyperv')
        with mock.patch.object(
            hostutils.HostUtils,
            'check_min_windows_version') as mock_check_min_windows_version:
            mock_check_min_windows_version.return_value = os_supports_v2

            if os_supports_v2 and force_v1:
                self.assertRaises(vmutils.HyperVException,
                                  utilsfactory.get_vmutils)
            else:
                actual_class = type(utilsfactory.get_vmutils())
                self.assertEqual(actual_class, expected_class)
Beispiel #11
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
     self._initiator = None
     self._default_root_device = 'vda'
Beispiel #12
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
     self._initiator = None
     self._default_root_device = 'vda'
Beispiel #13
0
 def __init__(self):
     self._pathutils = utilsfactory.get_pathutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
     self._username_regex = re.compile(r'user(?:name)?=([^, ]+)')
     self._password_regex = re.compile(r'pass(?:word)?=([^, ]+)')
Beispiel #14
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
Beispiel #15
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._netutils = utilsfactory.get_networkutils()
Beispiel #16
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
Beispiel #17
0
 def __init__(self):
     self._hostops = hostops.HostOps()
     self._vmutils = utilsfactory.get_vmutils()
     self._rdpconsoleutils = utilsfactory.get_rdpconsoleutils()
Beispiel #18
0
 def __init__(self):
     self._pathutils = utilsfactory.get_pathutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._volutils = utilsfactory.get_volumeutils()
     self._username_regex = re.compile(r'user(?:name)?=([^, ]+)')
     self._password_regex = re.compile(r'pass(?:word)?=([^, ]+)')
Beispiel #19
0
 def __init__(self):
     self._pathutils = utilsfactory.get_pathutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
Beispiel #20
0
 def __init__(self):
     self._pathutils = utilsfactory.get_pathutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
Beispiel #21
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._netutils = utilsfactory.get_networkutils()