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]
 
__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.

Inherited from node.CFSNode: __nonzero__, __str__, get_attribute, get_auth_attr, get_parameter, list_attributes, list_auth_attrs, list_parameters, set_attribute, set_auth_attr, set_parameter

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

Class Variables [hide private]

Inherited from node.CFSNode: alua_metadata_dir, configfs_dir

Properties [hide private]
  tpgs
Get the list of TPG for the Target.

Inherited from node.CFSNode: exists, is_fresh, path

Inherited from object: __class__

Method Details [hide private]

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

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • fabric_module (FabricModule) - The target's fabric module.
  • wwn (string) - The optionnal Target's wwn. If no wwn or an empty wwn is specified, one will be generated for you.
  • 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: object.__init__

delete(self)

 

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

Overrides: node.CFSNode.delete

Property Details [hide private]

tpgs

Get the list of TPG for the Target.

Get Method:
_list_tpgs(self)