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

Class _BaseFabricModule

  object --+    
           |    
node.CFSNode --+
               |
              _BaseFabricModule
Known Subclasses:

Abstract Base clase for Fabric Modules. It can load modules, provide information about them and handle the configfs housekeeping. After instantiation, whether or not the fabric module is loaded depends on if a method requiring it (i.e. accessing configfs) is used. This helps limit loaded kernel modules to just the fabrics in use.

Instance Methods [hide private]
 
__init__(self, name)
Instantiate a FabricModule object, according to the provided name.
 
_check_self(self)
 
has_feature(self, feature)
 
_list_targets(self)
 
_get_version(self)
 
to_normalized_wwn(self, wwn)
Checks whether or not the provided WWN is valid for this fabric module according to the spec, and returns a tuple of our preferred string representation of the wwn, and what type it turned out to be.
 
to_fabric_wwn(self, wwn)
Some fabrics need WWNs in a format different than rtslib's internal format.
 
from_fabric_wwn(self, wwn)
Converts from WWN format used in this fabric's LIO configfs to canonical format.
 
needs_wwn(self)
This fabric requires wwn to be specified when creating a target, it cannot be autogenerated.
 
_assert_feature(self, feature)
 
clear_discovery_auth_settings(self)
 
_get_discovery_enable_auth(self)
 
_set_discovery_enable_auth(self, enable)
 
_get_discovery_authenticate_target(self)
 
_get_wwns(self)
Returns either iterable or None.
 
_get_disc_attr(self, *args, **kwargs)
 
_set_disc_attr(self, *args, **kwargs)
 
setup(self, fm, err_func)
Setup fabricmodule with settings from fm dict.
 
dump(self)

Inherited from node.CFSNode: __eq__, __ne__, delete, get_attribute, get_parameter, list_attributes, list_parameters, set_attribute, set_parameter

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from node.CFSNode: configfs_dir

Properties [hide private]
  discovery_enable_auth
Set or get the discovery enable_auth flag.
  discovery_authenticate_target
Get the boolean discovery authenticate target flag.
  discovery_userid
Set or get the initiator discovery userid.
  discovery_password
Set or get the initiator discovery password.
  discovery_mutual_userid
Set or get the mutual discovery userid.
  discovery_mutual_password
Set or get the mutual discovery password.
  targets
Get the list of target objects.
  version
Get the fabric module version string.
  wwns
iterable of WWNs present for this fabric

Inherited from node.CFSNode: exists, path

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

 

Instantiate a FabricModule object, according to the provided name.

Parameters:
  • name (str) - the name of the FabricModule object.
Overrides: object.__init__

_check_self(self)

 
Overrides: node.CFSNode._check_self

to_fabric_wwn(self, wwn)

 

Some fabrics need WWNs in a format different than rtslib's internal format. These fabrics should override this method.

from_fabric_wwn(self, wwn)

 

Converts from WWN format used in this fabric's LIO configfs to canonical format. Note: Do not call from wwns(). There's no guarantee fabric wwn format is the same as wherever wwns() is reading from.

_get_wwns(self)

 

Returns either iterable or None. None means fabric allows arbitrary WWNs.

dump(self)

 
Overrides: node.CFSNode.dump

Property Details [hide private]

discovery_enable_auth

Set or get the discovery enable_auth flag.

Get Method:
_get_discovery_enable_auth(self)
Set Method:
_set_discovery_enable_auth(self, enable)

discovery_authenticate_target

Get the boolean discovery authenticate target flag.

Get Method:
_get_discovery_authenticate_target(self)

discovery_userid

Set or get the initiator discovery userid.

Get Method:
<functools.partial object at 0x7fabfc1f0a48>
Set Method:
<functools.partial object at 0x7fabfc1f0aa0>

discovery_password

Set or get the initiator discovery password.

Get Method:
<functools.partial object at 0x7fabfc1f0b50>
Set Method:
<functools.partial object at 0x7fabfc1f0ba8>

discovery_mutual_userid

Set or get the mutual discovery userid.

Get Method:
<functools.partial object at 0x7fabfc1f0c58>
Set Method:
<functools.partial object at 0x7fabfc1f0cb0>

discovery_mutual_password

Set or get the mutual discovery password.

Get Method:
<functools.partial object at 0x7fabfc1f0d60>
Set Method:
<functools.partial object at 0x7fabfc1f0db8>

targets

Get the list of target objects.

Get Method:
_list_targets(self)

version

Get the fabric module version string.

Get Method:
_get_version(self)

wwns

iterable of WWNs present for this fabric

Get Method:
_get_wwns(self) - Returns either iterable or None.