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

Class Group

object --+
         |
        Group
Known Subclasses:

An abstract base class akin to CFSNode, but for classes that emulate a higher-level group object across the actual NodeACL configfs structure.

Instance Methods [hide private]
 
__init__(self, members_func)
members_func is a function that takes a self argument and returns an iterator of the objects that the derived Group class is grouping.
 
_get_first_member(self)
 
_get_prop(self, prop)
Helper fn to use with partial() to support getting a property value from the first member of the group.
 
_set_prop(self, value, prop)
Helper fn to use with partial() to support setting a property value in all members of the group.
 
list_attributes(self, writable=None, readable=None)
 
list_parameters(self, writable=None, readable=None)
 
set_attribute(self, attribute, value)
 
set_parameter(self, parameter, value)
 
get_attribute(self, attribute)
 
get_parameter(self, parameter)
 
delete(self)
Delete all members of the group.

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

Properties [hide private]
  exists

Inherited from object: __class__

Method Details [hide private]

__init__(self, members_func)
(Constructor)

 

members_func is a function that takes a self argument and returns an iterator of the objects that the derived Group class is grouping.

Overrides: object.__init__

_get_prop(self, prop)

 

Helper fn to use with partial() to support getting a property value from the first member of the group. (All members of the group should be identical.)

_set_prop(self, value, prop)

 

Helper fn to use with partial() to support setting a property value in all members of the group.

Caution: Arguments reversed! This is so partial() can be used on property name.


Property Details [hide private]

exists

Get Method:
unreachable.exists(self)