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:
parent
1bb3879d6b
commit
ec8a8cd0d6
@ -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:
|
||||
|
@ -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"])()
|
||||
|
Loading…
x
Reference in New Issue
Block a user