Package ganeti :: Module objects :: Class NodeGroup
[hide private]
[frames] | no frames]

Class NodeGroup

source code


Config object representing a node group.

Instance Methods [hide private]
 
ToDict(self, _with_private=False)
Custom function for nodegroup.
source code
 
UpgradeConfig(self)
Fill defaults for missing configuration values.
source code
 
FillND(self, node)
Return filled out ndparams for objects.Node
source code
dict
SimpleFillND(self, ndparams)
Fill a given ndparams dict with defaults.
source code

Inherited from TaggableObject: AddTag, GetTags, RemoveTag

Inherited from ConfigObject: Copy, Validate, __eq__, __getattr__, __getstate__, __repr__, __setstate__

Inherited from outils.ValidatedSlots: __init__

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

Class Methods [hide private]
 
FromDict(cls, val)
Custom function for nodegroup.
source code

Inherited from TaggableObject: ValidateTag

Inherited from outils.ValidatedSlots: GetAllSlots

Class Variables [hide private]

Inherited from TaggableObject: VALID_TAG_RE

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

ToDict(self, _with_private=False)

source code 

Custom function for nodegroup.

This discards the members object, which gets recalculated and is only kept in memory.

Parameters:
  • _with_private - if True, the object will leak its private fields in the dictionary representation. If False, the values will be replaced with None.
Overrides: ConfigObject.ToDict

FromDict(cls, val)
Class Method

source code 

Custom function for nodegroup.

The members slot is initialized to an empty list, upon deserialization.

Overrides: ConfigObject.FromDict

UpgradeConfig(self)

source code 

Fill defaults for missing configuration values.

Overrides: ConfigObject.UpgradeConfig

FillND(self, node)

source code 

Return filled out ndparams for objects.Node

Parameters:
  • node (objects.Node) - A Node object to fill @return a copy of the node's ndparams with defaults filled

SimpleFillND(self, ndparams)

source code 

Fill a given ndparams dict with defaults.

Parameters:
  • ndparams (dict) - the dict to fill
Returns: dict
a copy of the passed in ndparams with missing keys filled from the node group defaults