hyper-v: Deprecates support for Windows / Hyper-V Server 2012
Starting with Rocky, we will support only Windows / Hyper-V Server 2012 R2 or newer. Change-Id: I223dabbc012092c4e89d6f6e655f989c54065996
This commit is contained in:
@@ -51,14 +51,21 @@ class HyperVDriverTestCase(test_base.HyperVBaseTestCase):
|
|||||||
self.driver._serialconsoleops = mock.MagicMock()
|
self.driver._serialconsoleops = mock.MagicMock()
|
||||||
self.driver._imagecache = mock.MagicMock()
|
self.driver._imagecache = mock.MagicMock()
|
||||||
|
|
||||||
|
@mock.patch.object(driver.LOG, 'warning')
|
||||||
@mock.patch.object(driver.utilsfactory, 'get_hostutils')
|
@mock.patch.object(driver.utilsfactory, 'get_hostutils')
|
||||||
def test_check_minimum_windows_version(self, mock_get_hostutils):
|
def test_check_minimum_windows_version(self, mock_get_hostutils,
|
||||||
|
mock_warning):
|
||||||
mock_hostutils = mock_get_hostutils.return_value
|
mock_hostutils = mock_get_hostutils.return_value
|
||||||
mock_hostutils.check_min_windows_version.return_value = False
|
mock_hostutils.check_min_windows_version.return_value = False
|
||||||
|
|
||||||
self.assertRaises(exception.HypervisorTooOld,
|
self.assertRaises(exception.HypervisorTooOld,
|
||||||
self.driver._check_minimum_windows_version)
|
self.driver._check_minimum_windows_version)
|
||||||
|
|
||||||
|
mock_hostutils.check_min_windows_version.side_effect = [True, False]
|
||||||
|
|
||||||
|
self.driver._check_minimum_windows_version()
|
||||||
|
self.assertTrue(mock_warning.called)
|
||||||
|
|
||||||
def test_public_api_signatures(self):
|
def test_public_api_signatures(self):
|
||||||
# NOTE(claudiub): wrapped functions do not keep the same signature in
|
# NOTE(claudiub): wrapped functions do not keep the same signature in
|
||||||
# Python 2.7, which causes this test to fail. Instead, we should
|
# Python 2.7, which causes this test to fail. Instead, we should
|
||||||
|
@@ -118,7 +118,8 @@ class HyperVDriver(driver.ComputeDriver):
|
|||||||
self._imagecache = imagecache.ImageCache()
|
self._imagecache = imagecache.ImageCache()
|
||||||
|
|
||||||
def _check_minimum_windows_version(self):
|
def _check_minimum_windows_version(self):
|
||||||
if not utilsfactory.get_hostutils().check_min_windows_version(6, 2):
|
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.
|
# the version is of Windows is older than Windows Server 2012 R2.
|
||||||
# Log an error, letting users know that this version is not
|
# Log an error, letting users know that this version is not
|
||||||
# supported any longer.
|
# supported any longer.
|
||||||
@@ -127,6 +128,12 @@ class HyperVDriver(driver.ComputeDriver):
|
|||||||
'Server 2012). The support for this version of '
|
'Server 2012). The support for this version of '
|
||||||
'Windows has been removed in Mitaka.')
|
'Windows has been removed in Mitaka.')
|
||||||
raise exception.HypervisorTooOld(version='6.2')
|
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.')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def need_legacy_block_device_info(self):
|
def need_legacy_block_device_info(self):
|
||||||
|
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
Support for Windows / Hyper-V Server 2012 has been deprecated in Queens
|
||||||
|
in nova and will be removed in Rocky. The supported versions are Windows /
|
||||||
|
Hyper-V Server 2012 R2 or newer.
|
Reference in New Issue
Block a user