コード例 #1
0
 def setUp(self):
     super(DiskUtilsTestCase, self).setUp()
     self._diskutils = diskutils.DiskUtils()
     self._diskutils._conn_cimv2 = mock.MagicMock()
     self._diskutils._conn_storage = mock.MagicMock()
     self._mock_run = self._diskutils._win32_utils.run_and_check_output
     self._pathutils = self._diskutils._pathutils
コード例 #2
0
    def __init__(self):
        self._win32_utils = win32utils.Win32Utils()
        self._disk_utils = diskutils.DiskUtils()

        self._vhd_info_members = {
            w_const.GET_VIRTUAL_DISK_INFO_SIZE: 'Size',
            w_const.GET_VIRTUAL_DISK_INFO_PARENT_LOCATION: 'ParentLocation',
            w_const.GET_VIRTUAL_DISK_INFO_VIRTUAL_STORAGE_TYPE:
            'VirtualStorageType',
            w_const.GET_VIRTUAL_DISK_INFO_PROVIDER_SUBTYPE: 'ProviderSubtype',
            w_const.GET_VIRTUAL_DISK_INFO_IS_LOADED: 'IsLoaded'
        }

        # Describes the way error handling is performed
        # for virtdisk.dll functions.
        self._virtdisk_run_args = dict(
            failure_exc=exceptions.VHDWin32APIException,
            error_on_nonzero_ret_val=True,
            ret_val_is_err_code=True)
コード例 #3
0
 def __init__(self):
     self._win32utils = win32utils.Win32Utils()
     self._diskutils = diskutils.DiskUtils()