connector
– Connector¶
Brick Connector objects for each supported transport protocol.
The connectors here are responsible for discovering and removing volumes for each of the supported transport protocols.
-
class
os_brick.initiator.connector.
InitiatorConnector
¶ -
static
factory
(protocol, root_helper, driver=None, use_multipath=False, device_scan_attempts=3, arch=None, *args, **kwargs)¶ Build a Connector object based upon protocol and architecture.
-
static
-
class
os_brick.initiator.connector.
ISCSIConnector
(root_helper, driver=None, execute=None, use_multipath=False, device_scan_attempts=3, transport='default', *args, **kwargs)¶ Connector class to attach/detach iSCSI volumes.
-
connect_volume
(connection_properties)¶ Attach the volume to instance_name.
- Parameters
connection_properties (dict) – The valid dictionary that describes all of the target volume attributes.
- Returns
dict
connection_properties for iSCSI must include: target_portal(s) - ip and optional port target_iqn(s) - iSCSI Qualified Name target_lun(s) - LUN id of the volume Note that plural keys may be used when use_multipath=True
-
disconnect_volume
(connection_properties, device_info, force=False, ignore_errors=False)¶ Detach the volume from instance_name.
- Parameters
connection_properties (dict that must include: target_portal(s) - IP and optional port target_iqn(s) - iSCSI Qualified Name target_lun(s) - LUN id of the volume) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
force (bool) – Whether to forcefully disconnect even if flush fails.
ignore_errors (bool) – When force is True, this will decide whether to ignore errors or raise an exception once finished the operation. Default is False.
-
-
class
os_brick.initiator.connector.
FibreChannelConnector
(root_helper, driver=None, execute=None, use_multipath=False, device_scan_attempts=3, *args, **kwargs)¶ Connector class to attach/detach Fibre Channel volumes.
-
connect_volume
(connection_properties)¶ Attach the volume to instance_name.
- Parameters
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
- Returns
dict
connection_properties for Fibre Channel must include: target_wwn - World Wide Name target_lun - LUN id of the volume
-
disconnect_volume
(connection_properties, device_info, force=False, ignore_errors=False)¶ Detach the volume from instance_name.
- Parameters
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
connection_properties for Fibre Channel must include: target_wwn - World Wide Name target_lun - LUN id of the volume
-
-
class
os_brick.initiator.connector.
AoEConnector
(root_helper, driver=None, device_scan_attempts=3, *args, **kwargs)¶ Connector class to attach/detach AoE volumes.
-
connect_volume
(connection_properties)¶ Discover and attach the volume.
- Parameters
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
- Returns
dict
connection_properties for AoE must include: target_shelf - shelf id of volume target_lun - lun id of volume
-
disconnect_volume
(connection_properties, device_info, force=False, ignore_errors=False)¶ Detach and flush the volume.
- Parameters
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
connection_properties for AoE must include: target_shelf - shelf id of volume target_lun - lun id of volume
-
-
class
os_brick.initiator.connector.
LocalConnector
(root_helper, driver=None, *args, **kwargs)¶ “Connector class to attach/detach File System backed volumes.
-
connect_volume
(connection_properties)¶ Connect to a volume.
- Parameters
connection_properties (dict) –
The dictionary that describes all of the target volume attributes.
connection_properties
must include:device_path
- path to the volume to be connected
- Returns
dict
-
disconnect_volume
(connection_properties, device_info, force=False, ignore_errors=False)¶ Disconnect a volume from the local host.
- Parameters
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
-
-
class
os_brick.initiator.connector.
HuaweiStorHyperConnector
(root_helper, driver=None, *args, **kwargs)¶ “Connector class to attach/detach SDSHypervisor volumes.
-
connect_volume
(connection_properties)¶ Connect to a volume.
- Parameters
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
- Returns
dict
-
disconnect_volume
(connection_properties, device_info, force=False, ignore_errors=False)¶ Disconnect a volume from the local host.
- Parameters
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
-