Ejemplo n.º 1
0
    def __init__(self):
        self._conn_wmi = self._get_wmi_conn('//./root/wmi')
        self._ensure_wt_provider_available()

        self._pathutils = pathutils.PathUtils()
        self._hostutils = hostutils.HostUtils()
        self._win32utils = win32utils.Win32Utils()

        self._win_gteq_6_3 = self._hostutils.check_min_windows_version(6, 3)
Ejemplo n.º 2
0
    def setUp(self):
        self._hostutils = hostutils.HostUtils()
        self._hostutils._conn_cimv2 = mock.MagicMock()
        self._hostutils._conn_scimv2 = mock.MagicMock()
        self._hostutils._conn_attr = mock.MagicMock()
        self._hostutils._netutils_prop = mock.MagicMock()
        self._conn = self._hostutils._conn
        self._conn_scimv2 = self._hostutils._conn_scimv2
        self._netutils = self._hostutils._netutils

        super(HostUtilsTestCase, self).setUp()
Ejemplo n.º 3
0
from os_win import exceptions
from os_win.utils import hostutils
from os_win.utils.io import namedpipe
from os_win.utils.storage.initiator import iscsi_cli_utils

hyper_opts = [
    cfg.BoolOpt('force_volumeutils_v1',
                default=False,
                help='DEPRECATED: Force V1 volume utility class',
                deprecated_for_removal=True),
]

CONF = cfg.CONF
CONF.register_opts(hyper_opts, 'hyperv')

utils = hostutils.HostUtils()

utils_map = {
    'diskutils': {
        'DiskUtils': {
            'min_version': 6.2,
            'max_version': None,
            'path': 'os_win.utils.storage.diskutils.DiskUtils'}},
    'hostutils': {
        'HostUtils': {
            'min_version': 6.2,
            'max_version': 10,
            'path': 'os_win.utils.hostutils.HostUtils'},
        'HostUtils10': {
            'min_version': 10,
            'max_version': None,
Ejemplo n.º 4
0
    def setUp(self):
        self._hostutils = hostutils.HostUtils()
        self._hostutils._conn_cimv2 = mock.MagicMock()
        self._hostutils._conn_attr = mock.MagicMock()

        super(HostUtilsTestCase, self).setUp()