# 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/initiator/connectors/base_iscsi.py
# class BaseISCSIConnector(initiator_connector.InitiatorConnector):
#     def _iterate_all_targets(self, connection_properties):
#     def _get_luns(con_props, iqns=None):
#     def _get_all_targets(self, connection_properties):


from os_brick.initiator.connectors import base
from os_brick.initiator.connectors import base_iscsi



class FakeConnector(base.BaseLinuxConnector):

    fake_path = '/dev/vdFAKE'

    def connect_volume(self, connection_properties):
        fake_device_info = {'type': 'fake',
                            'path': self.fake_path}
        return fake_device_info

    def disconnect_volume(self, connection_properties, device_info,
                          force=False, ignore_errors=False):
        pass

    def get_volume_paths(self, connection_properties):
        return [self.fake_path]

    def get_search_path(self):
        return '/dev/disk/by-path'

    def extend_volume(self, connection_properties):
        return None

    def get_all_available_volumes(self, connection_properties=None):
        return ['/dev/disk/by-path/fake-volume-1',
                '/dev/disk/by-path/fake-volume-X']



# 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/initiator/connectors/base_iscsi.py
# class BaseISCSIConnector(initiator_connector.InitiatorConnector):
#     def _iterate_all_targets(self, connection_properties):
#     def _get_luns(con_props, iqns=None):
#     def _get_all_targets(self, connection_properties):


# Path: os_brick/initiator/connectors/fake.py
from os_brick.initiator.connectors import base
from os_brick.initiator.connectors import base_iscsi




class FakeConnector(base.BaseLinuxConnector):

    fake_path = '/dev/vdFAKE'

    def connect_volume(self, connection_properties):
        fake_device_info = {'type': 'fake',
                            'path': self.fake_path}
        return fake_device_info

    def disconnect_volume(self, connection_properties, device_info,
                          force=False, ignore_errors=False):
        pass

    def get_volume_paths(self, connection_properties):
        return [self.fake_path]

    def get_search_path(self):
        return '/dev/disk/by-path'

    def extend_volume(self, connection_properties):
        return None

    def get_all_available_volumes(self, connection_properties=None):
        return ['/dev/disk/by-path/fake-volume-1',
                '/dev/disk/by-path/fake-volume-X']



class FakeBaseISCSIConnector(FakeConnector, base_iscsi.BaseISCSIConnector):