Package rtslib :: Module target :: Class FabricModule
[hide private]
[frames] | no frames]

Class FabricModule

  object --+    
           |    
node.CFSNode --+
               |
              FabricModule

This is an interface to RTS Target Fabric Modules. It can load/unload modules, provide information about them and handle the configfs housekeeping. It uses module configuration files in /var/target/fabric/*.spec. After instanciation, whether or not the fabric module is loaded and

Instance Methods [hide private]
 
__init__(self, name)
Instanciate a FabricModule object, according to the provided name.
 
_check_self(self)
 
has_feature(self, feature)
Whether or not this FabricModule has a certain feature.
 
_load(self)
Attempt to load the target fabric kernel module as defined in the specfile.
 
_parse_spec(self)
Parses the fabric module spec file.
 
_list_targets(self)
 
_get_version(self)
 
is_valid_wwn(self, wwn)
Checks whether or not the provided WWN is valid for this fabric module according to the spec file.
 
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_mutual_password(self)
 
_set_discovery_mutual_password(self, password)
 
_get_discovery_mutual_userid(self)
 
_set_discovery_mutual_userid(self, userid)
 
_get_discovery_password(self)
 
_set_discovery_password(self, password)
 
_get_discovery_userid(self)
 
_set_discovery_userid(self, userid)
 
_get_discovery_enable_auth(self)
 
_set_discovery_enable_auth(self, enable)
 
setup(self, fm)
Setup fabricmodule with settings from fm dict.
 
dump(self)

Inherited from node.CFSNode: __str__, 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__, __subclasshook__

Class Variables [hide private]
  version_attributes = set(['lio_version', 'version'])
  discovery_auth_attributes = set(['discovery_auth'])
  target_names_excludes = set(['discovery_auth', 'lio_version', ...

Inherited from node.CFSNode: alua_metadata_dir, configfs_dir, spec_dir

Properties [hide private]
  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.
  discovery_enable_auth
Set or get the discovery enable_auth flag.
  targets
Get the list of target objects.
  version
Get the fabric module version string.

Inherited from node.CFSNode: exists, is_fresh, path

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

 

Instanciate a FabricModule object, according to the provided name.

Parameters:
  • name (str) - the name of the FabricModule object. It must match an existing target fabric module specfile (name.spec).
Overrides: object.__init__

_check_self(self)

 
Overrides: node.CFSNode._check_self

_load(self)

 

Attempt to load the target fabric kernel module as defined in the specfile.

Raises:
  • RTSLibError - For failure to load kernel module and/or create configfs group.

setup(self, fm)

 

Setup fabricmodule with settings from fm dict. Returns int of how many nonfatal errors were encountered

dump(self)

 
Overrides: node.CFSNode.dump

Class Variable Details [hide private]

target_names_excludes

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

Property Details [hide private]

discovery_userid

Set or get the initiator discovery userid.

Get Method:
_get_discovery_userid(self)
Set Method:
_set_discovery_userid(self, userid)

discovery_password

Set or get the initiator discovery password.

Get Method:
_get_discovery_password(self)
Set Method:
_set_discovery_password(self, password)

discovery_mutual_userid

Set or get the mutual discovery userid.

Get Method:
_get_discovery_mutual_userid(self)
Set Method:
_set_discovery_mutual_userid(self, userid)

discovery_mutual_password

Set or get the mutual discovery password.

Get Method:
_get_discovery_mutual_password(self)
Set Method:
_set_discovery_mutual_password(self, password)

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)

targets

Get the list of target objects.

Get Method:
_list_targets(self)

version

Get the fabric module version string.

Get Method:
_get_version(self)