Package rtslib :: Module fabric
[hide private]
[frames] | no frames]

Module fabric


Copyright (c) 2011 by RisingTide Systems LLC
Copyright (c) 2013 by Andy Grover

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, version 3 (AGPLv3).

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.


Description
-----------

Fabrics may differ in how fabric WWNs are represented, as well as
what capabilities they support


Available parameters
--------------------

* features
Lists the target fabric available features. Default value:
("discovery_auth", "acls", "acls_auth", "nps")
example: features = ("discovery_auth", "acls", "acls_auth")
example: features = () # no features supported

Detail of features:

  * tpgts
  The target fabric module is using iSCSI-style target portal group tags.

  * discovery_auth
  The target fabric module supports a fabric-wide authentication for
  discovery.

  * acls
  The target's TPGTs support explicit initiator ACLs.

  * acls_auth
  The target's TPGT's ACLs support per-ACL initiator authentication.

  * nps
  The TPGTs support iSCSI-like IPv4/IPv6 network portals, using IP:PORT
  group names.

  * nexus
  The TPGTs have a 'nexus' attribute that contains the local initiator
  serial unit. This attribute must be set before being able to create any
  LUNs.

  * wwn_types
  Sets the type of WWN expected by the target fabric. Defaults to 'free'.
  Usually a fabric will only support one type but iSCSI supports more.
  First entry is the "native" wwn type - i.e. if a wwn can be generated, it
  will be of this type.
  Example: wwn_types = ("eui",)
  Current valid types are:

    * free
    Freeform WWN.

    * iqn
    The fabric module targets are using iSCSI-type IQNs.

    * naa
    NAA FC or SAS address type WWN.

    * eui
    EUI-64. See http://en.wikipedia.org/wiki/MAC_address for info on this format.

    * unit_serial
    Disk-type unit serial.

* wwns
This property returns an iterable (either generator or list) of valid
target WWNs for the fabric, if WWNs should be chosen from existing
fabric interfaces. The most common case for this is hardware-set
WWNs. WWNs should conform to rtslib's normalized internal format: the wwn
type (see above), a period, then the wwn with interstitial dividers like
':' removed.

* to_fabric_wwn()
Converts WWNs from normalized format (see above) to whatever the kernel code
expects when getting a wwn. Only needed if different from normalized format.

* kernel_module
Sets the name of the kernel module implementing the fabric modules. If
not specified, it will be assumed to be MODNAME_target_mod, where
MODNAME is the name of the fabric module, from the fabrics list. Note
that you must not specify any .ko or such extension here.
Example: kernel_module = "my_module"

* configfs_group
Sets the name of the configfs group used by the fabric module. Defaults to the
name of the module from the fabrics list.
Example: configfs_group = "iscsi"

Classes [hide private]
  _BaseFabricModule
Abstract Base clase for Fabric Modules.
  ISCSIFabricModule
  LoopbackFabricModule
  SBPFabricModule
  Qla2xxxFabricModule
  SRPTFabricModule
  FCoEFabricModule
  USBGadgetFabricModule
  VhostFabricModule
  FabricModule
Variables [hide private]
  version_attributes = set(['lio_version', 'version'])
  discovery_auth_attributes = set(['discovery_auth'])
  target_names_excludes = set(['discovery_auth', 'lio_version', ...
  fabric_modules = {'iscsi': <class 'rtslib.fabric.ISCSIFabricMo...
  __package__ = 'rtslib'
Variables Details [hide private]

target_names_excludes

Value:
set(['discovery_auth', 'lio_version', 'version'])

fabric_modules

Value:
{'iscsi': <class 'rtslib.fabric.ISCSIFabricModule'>,
 'loopback': <class 'rtslib.fabric.LoopbackFabricModule'>,
 'qla2xxx': <class 'rtslib.fabric.Qla2xxxFabricModule'>,
 'sbp': <class 'rtslib.fabric.SBPFabricModule'>,
 'srpt': <class 'rtslib.fabric.SRPTFabricModule'>,
 'tcm_fc': <class 'rtslib.fabric.FCoEFabricModule'>,
 'vhost': <class 'rtslib.fabric.VhostFabricModule'>}