# Path: os_brick/i18n.py
# DOMAIN = 'os-brick'
# 
# Path: os_brick/initiator/connectors/base.py
# LOG = logging.getLogger(__name__)
# class BaseLinuxConnector(initiator_connector.InitiatorConnector):
#     def __init__(self, root_helper: str, driver=None, execute=None,
#                  *args, **kwargs):
#     def get_connector_properties(root_helper: str, *args, **kwargs) -> dict:
#     def check_valid_device(self, path: str, run_as_root: bool = True) -> bool:
#     def get_all_available_volumes(self, connection_properties=None):
#     def _discover_mpath_device(self,
#                                device_wwn: str,
#                                connection_properties: dict,
#                                device_name: str) -> tuple:
# 
# 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):


from os_brick.i18n import _
from os_brick.initiator.connectors import base
from os_brick import utils
                                             *args, **kwargs)

    @staticmethod
    def get_connector_properties(root_helper, *args, **kwargs):
        """The Local connector properties."""
        return {}

    def get_volume_paths(self, connection_properties):
        path = connection_properties['device_path']
        return [path]

    def get_search_path(self):
        return None

    def get_all_available_volumes(self, connection_properties=None):
        # TODO(walter-boring): not sure what to return here.
        return []

    @utils.trace
    def connect_volume(self, connection_properties):
        """Connect to a volume.

        :param connection_properties: The dictionary that describes all of the
          target volume attributes. ``connection_properties`` must include:

          - ``device_path`` - path to the volume to be connected
        :type connection_properties: dict
        :returns: dict
        """
        if 'device_path' not in connection_properties:

# Path: os_brick/i18n.py
# DOMAIN = 'os-brick'
# 
# Path: os_brick/initiator/connectors/base.py
# LOG = logging.getLogger(__name__)
# class BaseLinuxConnector(initiator_connector.InitiatorConnector):
#     def __init__(self, root_helper: str, driver=None, execute=None,
#                  *args, **kwargs):
#     def get_connector_properties(root_helper: str, *args, **kwargs) -> dict:
#     def check_valid_device(self, path: str, run_as_root: bool = True) -> bool:
#     def get_all_available_volumes(self, connection_properties=None):
#     def _discover_mpath_device(self,
#                                device_wwn: str,
#                                connection_properties: dict,
#                                device_name: str) -> tuple:
# 
# 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/connectors/local.py
from os_brick.i18n import _
from os_brick.initiator.connectors import base
from os_brick import utils

                                             *args, **kwargs)

    @staticmethod
    def get_connector_properties(root_helper, *args, **kwargs):
        """The Local connector properties."""
        return {}

    def get_volume_paths(self, connection_properties):
        path = connection_properties['device_path']
        return [path]

    def get_search_path(self):
        return None

    def get_all_available_volumes(self, connection_properties=None):
        # TODO(walter-boring): not sure what to return here.
        return []

    @utils.trace
    def connect_volume(self, connection_properties):
        """Connect to a volume.

        :param connection_properties: The dictionary that describes all of the
          target volume attributes. ``connection_properties`` must include:

          - ``device_path`` - path to the volume to be connected
        :type connection_properties: dict
        :returns: dict
        """
        if 'device_path' not in connection_properties:

            msg = (_("Invalid connection_properties specified "