Example #1
0
    def __init__(self, virtapi):
        super(HyperVDriver, self).__init__(virtapi)

        self._hostops = hostops.HostOps()
        self._volumeops = volumeops.VolumeOps()
        self._vmops = vmops.VMOps()
        self._snapshotops = snapshotops.SnapshotOps()
        self._livemigrationops = livemigrationops.LiveMigrationOps()
        self._migrationops = migrationops.MigrationOps()
        self._rdpconsoleops = rdpconsoleops.RDPConsoleOps()
    def setUp(self):
        super(MigrationOpsTestCase, self).setUp()
        self.context = 'fake-context'

        # utilsfactory will check the host OS version via get_hostutils,
        # in order to return the proper Utils Class, so it must be mocked.
        patched_func = mock.patch.object(migrationops.utilsfactory,
                                         "get_hostutils")
        patched_func.start()
        self.addCleanup(patched_func.stop)

        self._migrationops = migrationops.MigrationOps()
Example #3
0
    def setUp(self):
        super(MigrationOpsTestCase, self).setUp()
        self.context = 'fake-context'

        self._migrationops = migrationops.MigrationOps()
        self._migrationops._hostutils = mock.MagicMock()
        self._migrationops._vmops = mock.MagicMock()
        self._migrationops._vmutils = mock.MagicMock()
        self._migrationops._pathutils = mock.Mock()
        self._migrationops._vhdutils = mock.MagicMock()
        self._migrationops._pathutils = mock.MagicMock()
        self._migrationops._volumeops = mock.MagicMock()
        self._migrationops._imagecache = mock.MagicMock()
Example #4
0
    def __init__(self, virtapi):
        # check if the current version of Windows is supported before any
        # further driver initialisation.
        self._check_minimum_windows_version()

        super(HyperVDriver, self).__init__(virtapi)

        self._hostops = hostops.HostOps()
        self._volumeops = volumeops.VolumeOps()
        self._vmops = vmops.VMOps()
        self._snapshotops = snapshotops.SnapshotOps()
        self._livemigrationops = livemigrationops.LiveMigrationOps()
        self._migrationops = migrationops.MigrationOps()
        self._rdpconsoleops = rdpconsoleops.RDPConsoleOps()
Example #5
0
    def __init__(self, virtapi):
        super(HyperVDriver, self).__init__(virtapi)

        self._hostops = hostops.HostOps()
        self._volumeops = volumeops.VolumeOps()
        self._vmops = vmops.VMOps()
        self._snapshotops = snapshotops.SnapshotOps()
        self._livemigrationops = livemigrationops.LiveMigrationOps()
        self._migrationops = migrationops.MigrationOps()
        self._rdpconsoleops = rdpconsoleops.RDPConsoleOps()

        # check if the current version is older than kernel version 6.2
        # (Windows Server 2012)
        if not hostutils.HostUtils().check_min_windows_version(6, 2):
            # the version is Windows Server 2008 R2. Log a warning, letting
            # users know that this version is deprecated in Liberty.
            LOG.warning(
                _LW('You are running nova-compute on Windows / Hyper-V Server '
                    '2008 R2. This version of Windows is deprecated in the '
                    'current version of OpenStack and the support for it will '
                    'be removed in the next cycle.'))
Example #6
0
 def setUp(self):
     super(MigrationOpsTestCase, self).setUp()
     self.context = 'fake-context'
     self.flags(force_hyperv_utils_v1=True, group='hyperv')
     self.flags(force_volumeutils_v1=True, group='hyperv')
     self._migrationops = migrationops.MigrationOps()