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

Class Target

  object --+    
           |    
node.CFSNode --+
               |
              Target

This is an interface to Targets in configFS. A Target is identified by its wwn. To a Target is attached a list of TPG objects.

Instance Methods [hide private]
 
__repr__(self)
 
__init__(self, fabric_module, wwn=None, mode='any')
Returns: A Target object.
 
_list_tpgs(self)
 
has_feature(self, feature)
Whether or not this Target has a certain feature.
 
delete(self)
Recursively deletes a Target object.
 
dump(self)

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

Class Methods [hide private]
 
setup(cls, fm_obj, t, err_func)
Set up target objects based upon t dict, from saved config.
Class Variables [hide private]
  tpgs = property(_list_tpgs, doc= "Get the list of TPG for the ...

Inherited from node.CFSNode: configfs_dir, exists, path

Method Details [hide private]

__repr__(self)
(Representation operator)

 
Overrides: object.__repr__
(inherited documentation)

__init__(self, fabric_module, wwn=None, mode='any')
(Constructor)

 
Parameters:
  • fabric_module (FabricModule) - The target's fabric module.
  • wwn (string) - The optional Target's wwn. If no wwn is specified, one will be generated.
  • mode (string) - An optionnal string containing the object creation mode:
    • 'any' means the configFS object will be either looked up or created.
    • 'lookup' means the object MUST already exist configFS.
    • 'create' means the object must NOT already exist in configFS.
Returns:
A Target object.
Overrides: node.CFSNode.__init__

delete(self)

 

Recursively deletes a Target object. This will delete all attached TPG objects and then the Target itself.

Overrides: node.CFSNode.delete

setup(cls, fm_obj, t, err_func)
Class Method

 

Set up target objects based upon t dict, from saved config. Guard against missing or bad dict items, but keep going. Call 'err_func' for each error.

dump(self)

 
Overrides: node.CFSNode.dump

Class Variable Details [hide private]

tpgs

Value:
property(_list_tpgs, doc= "Get the list of TPG for the Target.")