# Path: os_brick/initiator/windows/base.py
# LOG = logging.getLogger(__name__)
#     DEFAULT_DEVICE_SCAN_INTERVAL = 2
# class BaseWindowsConnector(initiator_connector.InitiatorConnector):
#     def __init__(self, root_helper=None, *args, **kwargs):
#     def check_multipath_support(enforce_multipath):
#     def get_connector_properties(*args, **kwargs):
#     def _get_scsi_wwn(self, device_number):
#     def check_valid_device(self, path, *args, **kwargs):
#     def get_all_available_volumes(self):
#     def _check_device_paths(self, device_paths):
#     def extend_volume(self, connection_properties):
#     def get_search_path(self):
# 
# Path: os_brick/remotefs/windows_remotefs.py
# LOG = logging.getLogger(__name__)
# class WindowsRemoteFsClient(remotefs.RemoteFsClient):
#     def __init__(self, mount_type, root_helper=None,
#                  execute=None, *args, **kwargs):
#     def get_local_share_path(self, share, expect_existing=True):
#     def _get_share_norm_path(self, share):
#     def get_share_name(self, share):
#     def get_share_subdir(self, share):
#     def mount(self, share, flags=None):
#     def unmount(self, share):
#     def _create_mount_point(self, share, use_local_path):
#     def _parse_credentials(self, opts_str):
# 
# Path: os_brick/utils.py
# def _sleep(secs: float) -> None:
#     def __init__(self, codes: Union[int, Tuple[int, ...]]):
#     def _check_exit_code(self, exc: Type[Exception]) -> bool:
# def retry(retry_param: Union[None,
#                              Type[Exception],
#                              Tuple[Type[Exception], ...],
#                              int,
#                              Tuple[int, ...]],
#           interval: float = 1,
#           retries: int = 3,
#           backoff_rate: float = 2,
#           retry: Callable = tenacity.retry_if_exception_type) -> Callable:
#     def _decorator(f):
#         def _wrapper(*args, **kwargs):
# def platform_matches(current_platform: str, connector_platform: str) -> bool:
# def os_matches(current_os: str, connector_os: str) -> bool:
# def merge_dict(dict1: dict, dict2: dict) -> dict:
# def trace(f: Callable) -> Callable:
#     def trace_logging_wrapper(*args, **kwargs):
# def convert_str(text: Union[bytes, str]) -> str:
# def get_host_nqn():
# LOG = logging.getLogger(__name__)
# class retry_if_exit_code(tenacity.retry_if_exception):


import os
from os_win import utilsfactory
from os_brick.initiator.windows import base as win_conn_base
from os_brick.remotefs import windows_remotefs as remotefs
from os_brick import utils
#    under the License.





# The Windows SMBFS connector expects to receive VHD/x images stored on SMB
# shares, exposed by the Cinder SMBFS driver.
class WindowsSMBFSConnector(win_conn_base.BaseWindowsConnector):
    def __init__(self, *args, **kwargs):
        super(WindowsSMBFSConnector, self).__init__(*args, **kwargs)
        # If this flag is set, we use the local paths in case of local
        # shares. This is in fact mandatory in some cases, for example
        # for the Hyper-C scenario.
        self._local_path_for_loopback = kwargs.get('local_path_for_loopback',
                                                   True)

        self._expect_raw_disk = kwargs.get('expect_raw_disk', False)
        self._remotefsclient = remotefs.WindowsRemoteFsClient(
            mount_type='smbfs',
            *args, **kwargs)
        self._smbutils = utilsfactory.get_smbutils()
        self._vhdutils = utilsfactory.get_vhdutils()
        self._diskutils = utilsfactory.get_diskutils()

    @staticmethod
    def get_connector_properties(*args, **kwargs):
        # No connector properties updates in this case.
        return {}


# Path: os_brick/initiator/windows/base.py
# LOG = logging.getLogger(__name__)
#     DEFAULT_DEVICE_SCAN_INTERVAL = 2
# class BaseWindowsConnector(initiator_connector.InitiatorConnector):
#     def __init__(self, root_helper=None, *args, **kwargs):
#     def check_multipath_support(enforce_multipath):
#     def get_connector_properties(*args, **kwargs):
#     def _get_scsi_wwn(self, device_number):
#     def check_valid_device(self, path, *args, **kwargs):
#     def get_all_available_volumes(self):
#     def _check_device_paths(self, device_paths):
#     def extend_volume(self, connection_properties):
#     def get_search_path(self):
# 
# Path: os_brick/remotefs/windows_remotefs.py
# LOG = logging.getLogger(__name__)
# class WindowsRemoteFsClient(remotefs.RemoteFsClient):
#     def __init__(self, mount_type, root_helper=None,
#                  execute=None, *args, **kwargs):
#     def get_local_share_path(self, share, expect_existing=True):
#     def _get_share_norm_path(self, share):
#     def get_share_name(self, share):
#     def get_share_subdir(self, share):
#     def mount(self, share, flags=None):
#     def unmount(self, share):
#     def _create_mount_point(self, share, use_local_path):
#     def _parse_credentials(self, opts_str):
# 
# Path: os_brick/utils.py
# def _sleep(secs: float) -> None:
#     def __init__(self, codes: Union[int, Tuple[int, ...]]):
#     def _check_exit_code(self, exc: Type[Exception]) -> bool:
# def retry(retry_param: Union[None,
#                              Type[Exception],
#                              Tuple[Type[Exception], ...],
#                              int,
#                              Tuple[int, ...]],
#           interval: float = 1,
#           retries: int = 3,
#           backoff_rate: float = 2,
#           retry: Callable = tenacity.retry_if_exception_type) -> Callable:
#     def _decorator(f):
#         def _wrapper(*args, **kwargs):
# def platform_matches(current_platform: str, connector_platform: str) -> bool:
# def os_matches(current_os: str, connector_os: str) -> bool:
# def merge_dict(dict1: dict, dict2: dict) -> dict:
# def trace(f: Callable) -> Callable:
#     def trace_logging_wrapper(*args, **kwargs):
# def convert_str(text: Union[bytes, str]) -> str:
# def get_host_nqn():
# LOG = logging.getLogger(__name__)
# class retry_if_exit_code(tenacity.retry_if_exception):


# Path: os_brick/initiator/windows/smbfs.py
import os
from os_win import utilsfactory
from os_brick.initiator.windows import base as win_conn_base
from os_brick.remotefs import windows_remotefs as remotefs
from os_brick import utils

#    under the License.





# The Windows SMBFS connector expects to receive VHD/x images stored on SMB
# shares, exposed by the Cinder SMBFS driver.
class WindowsSMBFSConnector(win_conn_base.BaseWindowsConnector):
    def __init__(self, *args, **kwargs):
        super(WindowsSMBFSConnector, self).__init__(*args, **kwargs)
        # If this flag is set, we use the local paths in case of local
        # shares. This is in fact mandatory in some cases, for example
        # for the Hyper-C scenario.
        self._local_path_for_loopback = kwargs.get('local_path_for_loopback',
                                                   True)

        self._expect_raw_disk = kwargs.get('expect_raw_disk', False)
        self._remotefsclient = remotefs.WindowsRemoteFsClient(
            mount_type='smbfs',
            *args, **kwargs)
        self._smbutils = utilsfactory.get_smbutils()
        self._vhdutils = utilsfactory.get_vhdutils()
        self._diskutils = utilsfactory.get_diskutils()

    @staticmethod
    def get_connector_properties(*args, **kwargs):
        # No connector properties updates in this case.
        return {}


    @utils.trace