# Path: os_brick/exception.py
# LOG = logging.getLogger(__name__)
# class BrickException(Exception):
# class NotFound(BrickException):
# class Invalid(BrickException):
# class InvalidParameterValue(Invalid):
# class NoFibreChannelHostsFound(BrickException):
# class NoFibreChannelVolumeDeviceFound(BrickException):
# class VolumeNotDeactivated(BrickException):
# class VolumeDeviceNotFound(BrickException):
# class VolumePathsNotFound(BrickException):
# class VolumePathNotRemoved(BrickException):
# class ProtocolNotSupported(BrickException):
# class TargetPortalNotFound(BrickException):
# class TargetPortalsNotFound(TargetPortalNotFound):
# class FailedISCSITargetPortalLogin(BrickException):
# class BlockDeviceReadOnly(BrickException):
# class VolumeGroupNotFound(BrickException):
# class VolumeGroupCreationFailed(BrickException):
# class CommandExecutionFailed(BrickException):
# class VolumeDriverException(BrickException):
# class InvalidIOHandleObject(BrickException):
# class VolumeEncryptionNotSupported(Invalid):
# class VolumeLocalCacheNotSupported(Invalid):
# class InvalidConnectorProtocol(ValueError):
# class ExceptionChainer(BrickException):
# class ExecutionTimeout(putils.ProcessExecutionError):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __nonzero__(self) -> bool:
#     def add_exception(self, exc_type, exc_val, exc_tb) -> None:
#     def context(self,
#                 catch_exception: bool,
#                 msg: str = '',
#                 *msg_args: Iterable):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# 
# Path: os_brick/initiator/windows/fibre_channel.py
# LOG = logging.getLogger(__name__)
# class WindowsFCConnector(win_conn_base.BaseWindowsConnector):
#     def __init__(self, *args, **kwargs):
#     def get_connector_properties(*args, **kwargs):
#     def connect_volume(self, connection_properties):
#     def get_volume_paths(self, connection_properties):
#     def _get_fc_volume_mappings(self, connection_properties):
#     def _get_fc_hba_mappings(self):
#     def _get_disk_paths_by_scsi_id(self, connection_properties, fcp_lun):
#     def _get_dev_nums_by_scsi_id(self, local_port_wwn, remote_port_wwn,
#                                  fcp_lun):
#     def _get_fc_hba_wwn_for_port(self, port_wwn):
#     def disconnect_volume(self, connection_properties, device_info=None,
#                           force=False, ignore_errors=False):
# 
# Path: os_brick/tests/windows/test_base.py
# class WindowsConnectorTestBase(base.TestCase):
#     def setUp(self):


from unittest import mock
from os_win import exceptions as os_win_exc
from os_brick import exception
from os_brick.initiator.windows import fibre_channel as fc
from os_brick.tests.windows import test_base
import ddt
                'wwnns': [mock.sentinel.node_name,
                          mock.sentinel.second_node_name]
            }
        else:
            expected_props = {}

        self.assertCountEqual(expected_props, props)

    @mock.patch.object(fc.WindowsFCConnector, '_get_scsi_wwn')
    @mock.patch.object(fc.WindowsFCConnector, 'get_volume_paths')
    def test_connect_volume(self, mock_get_vol_paths,
                            mock_get_scsi_wwn):
        mock_get_vol_paths.return_value = [mock.sentinel.dev_name]
        mock_get_dev_num = self._diskutils.get_device_number_from_device_name
        mock_get_dev_num.return_value = mock.sentinel.dev_num

        expected_device_info = dict(type='block',
                                    path=mock.sentinel.dev_name,
                                    number=mock.sentinel.dev_num,
                                    scsi_wwn=mock_get_scsi_wwn.return_value)
        device_info = self._connector.connect_volume(mock.sentinel.conn_props)

        self.assertEqual(expected_device_info, device_info)
        mock_get_vol_paths.assert_called_once_with(mock.sentinel.conn_props)
        mock_get_dev_num.assert_called_once_with(mock.sentinel.dev_name)
        mock_get_scsi_wwn.assert_called_once_with(mock.sentinel.dev_num)

    @mock.patch.object(fc.WindowsFCConnector, 'get_volume_paths')
    def test_connect_volume_not_found(self, mock_get_vol_paths):
        mock_get_vol_paths.return_value = []

# Path: os_brick/exception.py
# LOG = logging.getLogger(__name__)
# class BrickException(Exception):
# class NotFound(BrickException):
# class Invalid(BrickException):
# class InvalidParameterValue(Invalid):
# class NoFibreChannelHostsFound(BrickException):
# class NoFibreChannelVolumeDeviceFound(BrickException):
# class VolumeNotDeactivated(BrickException):
# class VolumeDeviceNotFound(BrickException):
# class VolumePathsNotFound(BrickException):
# class VolumePathNotRemoved(BrickException):
# class ProtocolNotSupported(BrickException):
# class TargetPortalNotFound(BrickException):
# class TargetPortalsNotFound(TargetPortalNotFound):
# class FailedISCSITargetPortalLogin(BrickException):
# class BlockDeviceReadOnly(BrickException):
# class VolumeGroupNotFound(BrickException):
# class VolumeGroupCreationFailed(BrickException):
# class CommandExecutionFailed(BrickException):
# class VolumeDriverException(BrickException):
# class InvalidIOHandleObject(BrickException):
# class VolumeEncryptionNotSupported(Invalid):
# class VolumeLocalCacheNotSupported(Invalid):
# class InvalidConnectorProtocol(ValueError):
# class ExceptionChainer(BrickException):
# class ExecutionTimeout(putils.ProcessExecutionError):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __nonzero__(self) -> bool:
#     def add_exception(self, exc_type, exc_val, exc_tb) -> None:
#     def context(self,
#                 catch_exception: bool,
#                 msg: str = '',
#                 *msg_args: Iterable):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# 
# Path: os_brick/initiator/windows/fibre_channel.py
# LOG = logging.getLogger(__name__)
# class WindowsFCConnector(win_conn_base.BaseWindowsConnector):
#     def __init__(self, *args, **kwargs):
#     def get_connector_properties(*args, **kwargs):
#     def connect_volume(self, connection_properties):
#     def get_volume_paths(self, connection_properties):
#     def _get_fc_volume_mappings(self, connection_properties):
#     def _get_fc_hba_mappings(self):
#     def _get_disk_paths_by_scsi_id(self, connection_properties, fcp_lun):
#     def _get_dev_nums_by_scsi_id(self, local_port_wwn, remote_port_wwn,
#                                  fcp_lun):
#     def _get_fc_hba_wwn_for_port(self, port_wwn):
#     def disconnect_volume(self, connection_properties, device_info=None,
#                           force=False, ignore_errors=False):
# 
# Path: os_brick/tests/windows/test_base.py
# class WindowsConnectorTestBase(base.TestCase):
#     def setUp(self):


# Path: os_brick/tests/windows/test_fibre_channel.py
from unittest import mock
from os_win import exceptions as os_win_exc
from os_brick import exception
from os_brick.initiator.windows import fibre_channel as fc
from os_brick.tests.windows import test_base
import ddt

                'wwnns': [mock.sentinel.node_name,
                          mock.sentinel.second_node_name]
            }
        else:
            expected_props = {}

        self.assertCountEqual(expected_props, props)

    @mock.patch.object(fc.WindowsFCConnector, '_get_scsi_wwn')
    @mock.patch.object(fc.WindowsFCConnector, 'get_volume_paths')
    def test_connect_volume(self, mock_get_vol_paths,
                            mock_get_scsi_wwn):
        mock_get_vol_paths.return_value = [mock.sentinel.dev_name]
        mock_get_dev_num = self._diskutils.get_device_number_from_device_name
        mock_get_dev_num.return_value = mock.sentinel.dev_num

        expected_device_info = dict(type='block',
                                    path=mock.sentinel.dev_name,
                                    number=mock.sentinel.dev_num,
                                    scsi_wwn=mock_get_scsi_wwn.return_value)
        device_info = self._connector.connect_volume(mock.sentinel.conn_props)

        self.assertEqual(expected_device_info, device_info)
        mock_get_vol_paths.assert_called_once_with(mock.sentinel.conn_props)
        mock_get_dev_num.assert_called_once_with(mock.sentinel.dev_name)
        mock_get_scsi_wwn.assert_called_once_with(mock.sentinel.dev_num)

    @mock.patch.object(fc.WindowsFCConnector, 'get_volume_paths')
    def test_connect_volume_not_found(self, mock_get_vol_paths):
        mock_get_vol_paths.return_value = []

        self.assertRaises(exception.NoFibreChannelVolumeDeviceFound,