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

Class Target

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

This is an interface to loopback SAS Targets in configFS. A Target is identified by its naa SAS address. To a Target is attached a list of Nexus objects.

Instance Methods [hide private]
 
__init__(self, naa=None, mode='any')
Returns: A Target object.
 
__str__(self)
str(x)
 
_list_nexuses(self)
 
_get_naa(self)
 
delete(self)
Recursively deletes a Target object.
 
nexus(self, tag, mode='any')
Same as Nexus() but without the parent_target parameter.

Inherited from node.CFSNode: __nonzero__, 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, spec_dir

Properties [hide private]
  naa
Get the naa of the Target object as a string.
  nexuses
Get the list of Nexus objects currently attached to the Target.

Inherited from node.CFSNode: exists, is_fresh, path

Inherited from object: __class__

Method Details [hide private]

__init__(self, naa=None, mode='any')
(Constructor)

 

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

Parameters:
  • naa (string) - The optionnal Target's address. If no address or an empty address 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__

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

delete(self)

 

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

Overrides: node.CFSNode.delete

Property Details [hide private]

naa

Get the naa of the Target object as a string.

Get Method:
_get_naa(self)

nexuses

Get the list of Nexus objects currently attached to the Target.

Get Method:
_list_nexuses(self)