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

Class NetworkPortal

  object --+    
           |    
node.CFSNode --+
               |
              NetworkPortal

This is an interface to NetworkPortals in configFS. A NetworkPortal is identified by its IP and port, but here we also require the parent TPG, so instance objects represent both the NetworkPortal and its association to a TPG. This is necessary to get path information in order to create the portal in the proper configFS hierarchy.

Instance Methods [hide private]
 
__repr__(self)
 
__init__(self, parent_tpg, ip_address, port=3260, mode='any')
Returns: A NetworkPortal object.
 
_get_ip_address(self)
 
_get_port(self)
 
_get_parent_tpg(self)
 
_get_iser(self)
 
_set_iser(self, boolean)
 
delete(self)
If the underlying configFS object does not exist, this method does nothing.
 
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, tpg_obj, p, err_func)
Class Variables [hide private]
  parent_tpg = property(_get_parent_tpg, doc= "Get the parent TP...
  port = property(_get_port, doc= "Get the NetworkPortal's TCP p...
  ip_address = property(_get_ip_address, doc= "Get the NetworkPo...
  iser = property(_get_iser, _set_iser, doc= "Get or set a boole...

Inherited from node.CFSNode: configfs_dir, exists, path

Method Details [hide private]

__repr__(self)
(Representation operator)

 
Overrides: object.__repr__
(inherited documentation)

__init__(self, parent_tpg, ip_address, port=3260, mode='any')
(Constructor)

 
Parameters:
  • parent_tpg (TPG) - The parent TPG object.
  • ip_address (string) - The ipv4/v6 IP address of the NetworkPortal. ipv6 addresses should be surrounded by '[]'.
  • port (int) - The optional (defaults to 3260) NetworkPortal TCP/IP port.
  • 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 NetworkPortal object.
Overrides: node.CFSNode.__init__

delete(self)

 

If the underlying configFS object does not exist, this method does nothing. If the underlying configFS object exists, this method attempts to delete it.

Overrides: node.CFSNode.delete
(inherited documentation)

dump(self)

 
Overrides: node.CFSNode.dump

Class Variable Details [hide private]

parent_tpg

Value:
property(_get_parent_tpg, doc= "Get the parent TPG object.")

port

Value:
property(_get_port, doc= "Get the NetworkPortal's TCP port as an int."\
)

ip_address

Value:
property(_get_ip_address, doc= "Get the NetworkPortal's IP address as \
a string.")

iser

Value:
property(_get_iser, _set_iser, doc= "Get or set a boolean value repres\
enting if this "+ "NetworkPortal supports iSER.")