Fix win2k16 extend volume during specialize

The WMI api used to enumerate volumes on 2016 is not available during the
specialize step.
The WMI namespace in cause is '//./Root/Microsoft/Windows/Storage'

We need to fallback on win2k16 to the previous used storage management (VDS).

Change-Id: Ib082443c34dcba64697f165c9b2902f3f61c7e39
Closes-bug: #1661725
This commit is contained in:
Adrian Vladu 2017-02-03 22:04:27 +02:00
parent 1bb3879d6b
commit ec8a8cd0d6
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ class TestStorageManager(unittest.TestCase):
return
self.mock_os.name = "nt"
mock_get_os_utils.return_value.check_os_version.return_value = nano
mock_get_os_utils.return_value.is_nano_server.return_value = nano
mock_load_class = mock_class_loader.return_value.load_class
response = self.factory.get_storage_manager()
if nano:

View File

@ -30,7 +30,7 @@ def get_storage_manager():
cl = classloader.ClassLoader()
if os.name == "nt":
if osutils.check_os_version(10, 0):
if osutils.is_nano_server():
# VDS is not available on Nano Server
# WSM supersedes VDS since Windows Server 2012 / Windows 8
return cl.load_class(class_paths["WSM"])()