Esempio n. 1
0
 def __init__(self):
     self._diskutils = utilsfactory.get_diskutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vmops = vmops.VMOps()
     self._api = api.API()
Esempio n. 2
0
 def __init__(self):
     self._diskutils = utilsfactory.get_diskutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vmops = vmops.VMOps()
     self._api = api.API()
Esempio n. 3
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._vmops = vmops.VMOps()
     self._imagecache = imagecache.ImageCache()
Esempio n. 4
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._vmops = vmops.VMOps()
     self._imagecache = imagecache.ImageCache()
Esempio n. 5
0
    def _compute_host_max_cpu_clock(self):
        hostutils = utilsfactory.get_hostutils()
        # host's number of CPUs and CPU clock speed will not change.
        cpu_info = hostutils.get_cpus_info()
        host_cpu_count = len(cpu_info)
        host_cpu_clock = cpu_info[0]['MaxClockSpeed']

        return float(host_cpu_clock * host_cpu_count)
Esempio n. 6
0
    def _compute_host_max_cpu_clock(self):
        hostutils = utilsfactory.get_hostutils()
        # host's number of CPUs and CPU clock speed will not change.
        cpu_info = hostutils.get_cpus_info()
        host_cpu_count = len(cpu_info)
        host_cpu_clock = cpu_info[0]['MaxClockSpeed']

        return float(host_cpu_clock * host_cpu_count)
Esempio n. 7
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._vmops = vmops.VMOps()
     self._imagecache = imagecache.ImageCache()
     self._block_dev_man = block_device_manager.BlockDeviceInfoManager()
Esempio n. 8
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._vmops = vmops.VMOps()
     self._imagecache = imagecache.ImageCache()
     self._block_dev_man = block_device_manager.BlockDeviceInfoManager()
Esempio n. 9
0
    def __init__(self, *args, **kwargs):
        super(WindowsDriver, self).__init__(*args, **kwargs)
        self.configuration = kwargs.get('configuration', None)
        if self.configuration:
            self.configuration.append_config_values(windows_opts)

        self._vhdutils = utilsfactory.get_vhdutils()
        self._tgt_utils = utilsfactory.get_iscsi_target_utils()
        self._hostutils = utilsfactory.get_hostutils()
Esempio n. 10
0
    def __init__(self, *args, **kwargs):
        super(WindowsDriver, self).__init__(*args, **kwargs)
        self.configuration = kwargs.get('configuration', None)
        if self.configuration:
            self.configuration.append_config_values(windows_opts)

        self._vhdutils = utilsfactory.get_vhdutils()
        self._tgt_utils = utilsfactory.get_iscsi_target_utils()
        self._hostutils = utilsfactory.get_hostutils()
Esempio n. 11
0
 def _check_minimum_windows_version(self):
     if not utilsfactory.get_hostutils().check_min_windows_version(6, 2):
         # the version is of Windows is older than Windows Server 2012 R2.
         # Log an error, letting users know that this version is not
         # supported any longer.
         LOG.error(_LE('You are running nova-compute on an unsupported '
                       'version of Windows (older than Windows / Hyper-V '
                       'Server 2012). The support for this version of '
                       'Windows has been removed in Mitaka.'))
         raise exception.HypervisorTooOld(version='6.2')
Esempio n. 12
0
 def _check_minimum_windows_version(self):
     if not utilsfactory.get_hostutils().check_min_windows_version(6, 2):
         # the version is of Windows is older than Windows Server 2012 R2.
         # Log an error, letting users know that this version is not
         # supported any longer.
         LOG.error('You are running nova-compute on an unsupported '
                   'version of Windows (older than Windows / Hyper-V '
                   'Server 2012). The support for this version of '
                   'Windows has been removed in Mitaka.')
         raise exception.HypervisorTooOld(version='6.2')
Esempio n. 13
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._vif_driver = None
     self._load_vif_driver_class()
     self._vm_log_writers = {}
Esempio n. 14
0
    def __init__(self):
        self._default_root_device = 'vda'

        self._hostutils = utilsfactory.get_hostutils()
        self._vmutils = utilsfactory.get_vmutils()

        self._verify_setup()
        self.volume_drivers = {'smbfs': SMBFSVolumeDriver(),
                               'iscsi': ISCSIVolumeDriver(),
                               'fibre_channel': FCVolumeDriver()}
Esempio n. 15
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._vif_driver = None
     self._load_vif_driver_class()
     self._vm_log_writers = {}
Esempio n. 16
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._vif_driver = None
     self._load_vif_driver_class()
Esempio n. 17
0
 def __init__(self):
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._vif_driver = None
     self._load_vif_driver_class()
Esempio n. 18
0
    def __init__(self):
        # Live migration is supported starting from Hyper-V Server 2012
        if utilsfactory.get_hostutils().check_min_windows_version(6, 2):
            self._livemigrutils = utilsfactory.get_livemigrationutils()
        else:
            self._livemigrutils = None

        self._pathutils = pathutils.PathUtils()
        self._vmops = vmops.VMOps()
        self._volumeops = volumeops.VolumeOps()
        self._imagecache = imagecache.ImageCache()
        self._vmutils = utilsfactory.get_vmutils()
Esempio n. 19
0
    def __init__(self):
        # Live migration is supported starting from Hyper-V Server 2012
        if utilsfactory.get_hostutils().check_min_windows_version(6, 2):
            self._livemigrutils = utilsfactory.get_livemigrationutils()
        else:
            self._livemigrutils = None

        self._pathutils = pathutils.PathUtils()
        self._vmops = vmops.VMOps()
        self._volumeops = volumeops.VolumeOps()
        self._imagecache = imagecache.ImageCache()
        self._vmutils = utilsfactory.get_vmutils()
Esempio n. 20
0
 def __init__(self, virtapi=None):
     self._virtapi = virtapi
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._block_dev_man = (block_device_manager.BlockDeviceInfoManager())
     self._vif_driver = vif_utils.HyperVVIFDriver()
Esempio n. 21
0
    def __init__(self):
        self._default_root_device = 'vda'

        self._hostutils = utilsfactory.get_hostutils()
        self._vmutils = utilsfactory.get_vmutils()

        self._verify_setup()
        self.volume_drivers = {
            'smbfs': SMBFSVolumeDriver(),
            'iscsi': ISCSIVolumeDriver(),
            'fibre_channel': FCVolumeDriver()
        }
Esempio n. 22
0
 def check_multipath_support(enforce_multipath):
     hostutils = utilsfactory.get_hostutils()
     mpio_enabled = hostutils.check_server_feature(hostutils.FEATURE_MPIO)
     if not mpio_enabled:
         err_msg = _LE(
             "Using multipath connections for iSCSI and FC disks "
             "requires the Multipath IO Windows feature to be "
             "enabled. MPIO must be configured to claim such devices.")
         LOG.error(err_msg)
         if enforce_multipath:
             raise exception.BrickException(err_msg)
         return False
     return True
 def __init__(self, virtapi=None):
     self._virtapi = virtapi
     self._vmutils = utilsfactory.get_vmutils()
     self._metricsutils = utilsfactory.get_metricsutils()
     self._vhdutils = utilsfactory.get_vhdutils()
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
     self._serial_console_ops = serialconsoleops.SerialConsoleOps()
     self._volumeops = volumeops.VolumeOps()
     self._imagecache = imagecache.ImageCache()
     self._vif_driver_cache = {}
     self._block_device_manager = (
         block_device_manager.BlockDeviceInfoManager())
Esempio n. 24
0
 def check_multipath_support(enforce_multipath):
     hostutils = utilsfactory.get_hostutils()
     mpio_enabled = hostutils.check_server_feature(
         hostutils.FEATURE_MPIO)
     if not mpio_enabled:
         err_msg = _("Using multipath connections for iSCSI and FC disks "
                     "requires the Multipath IO Windows feature to be "
                     "enabled. MPIO must be configured to claim such "
                     "devices.")
         LOG.error(err_msg)
         if enforce_multipath:
             raise exception.BrickException(err_msg)
         return False
     return True
Esempio n. 25
0
 def _check_minimum_windows_version(self):
     hostutils = utilsfactory.get_hostutils()
     if not hostutils.check_min_windows_version(6, 2):
         # the version is of Windows is older than Windows Server 2012 R2.
         # Log an error, letting users know that this version is not
         # supported any longer.
         LOG.error('You are running nova-compute on an unsupported '
                   'version of Windows (older than Windows / Hyper-V '
                   'Server 2012). The support for this version of '
                   'Windows has been removed in Mitaka.')
         raise exception.HypervisorTooOld(version='6.2')
     elif not hostutils.check_min_windows_version(6, 3):
         # TODO(claudiub): replace the warning with an exception in Rocky.
         LOG.warning('You are running nova-compute on Windows / Hyper-V '
                     'Server 2012. The support for this version of Windows '
                     'has been deprecated In Queens, and will be removed '
                     'in Rocky.')
Esempio n. 26
0
 def _check_minimum_windows_version(self):
     hostutils = utilsfactory.get_hostutils()
     if not hostutils.check_min_windows_version(6, 2):
         # the version is of Windows is older than Windows Server 2012 R2.
         # Log an error, letting users know that this version is not
         # supported any longer.
         LOG.error('You are running nova-compute on an unsupported '
                   'version of Windows (older than Windows / Hyper-V '
                   'Server 2012). The support for this version of '
                   'Windows has been removed in Mitaka.')
         raise exception.HypervisorTooOld(version='6.2')
     elif not hostutils.check_min_windows_version(6, 3):
         # TODO(claudiub): replace the warning with an exception in Rocky.
         LOG.warning('You are running nova-compute on Windows / Hyper-V '
                     'Server 2012. The support for this version of Windows '
                     'has been deprecated In Queens, and will be removed '
                     'in Rocky.')
Esempio n. 27
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()
Esempio n. 28
0
 def __init__(self):
     self._hostutils = utilsfactory.get_hostutils()
     self._pathutils = pathutils.PathUtils()