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)
repr(x)
 
__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

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

Class Methods [hide private]
 
setup(cls, tpg_obj, p, err_func)
Class Variables [hide private]

Inherited from node.CFSNode: configfs_dir

Properties [hide private]
  parent_tpg
Get the parent TPG object.
  port
Get the NetworkPortal's TCP port as an int.
  ip_address
Get the NetworkPortal's IP address as a string.
  iser
Get or set a boolean value representing if this NetworkPortal supports iSER.

Inherited from node.CFSNode: exists, path

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

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

 

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

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: object.__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

Property Details [hide private]

parent_tpg

Get the parent TPG object.

Get Method:
_get_parent_tpg(self)

port

Get the NetworkPortal's TCP port as an int.

Get Method:
_get_port(self)

ip_address

Get the NetworkPortal's IP address as a string.

Get Method:
_get_ip_address(self)

iser

Get or set a boolean value representing if this NetworkPortal supports iSER.

Get Method:
_get_iser(self)
Set Method:
_set_iser(self, boolean)