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

Class ConfigData

source code


Top-level config object.

Instance Methods [hide private]
 
ToDict(self, _with_private=False)
Custom function for top-level config data.
source code
list of disks
DisksOfType(self, dev_type)
Check if in there is at disk of the given type in the configuration.
source code
 
UpgradeConfig(self)
Fill defaults for missing configuration values.
source code
 
_UpgradeEnabledDiskTemplates(self)
Upgrade the cluster's enabled disk templates by inspecting the currently enabled and/or used disk templates.
source code

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 top-level config data
source code

Inherited from outils.ValidatedSlots: GetAllSlots

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

ToDict(self, _with_private=False)

source code 

Custom function for top-level config data.

This just replaces the list of nodes, instances, nodegroups, networks, disks and the cluster with standard python types.

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 top-level config data

Overrides: ConfigObject.FromDict

DisksOfType(self, dev_type)

source code 

Check if in there is at disk of the given type in the configuration.

Parameters:
  • dev_type (constants.DTS_BLOCK) - the type to look for
Returns: list of disks
all disks of the dev_type

UpgradeConfig(self)

source code 

Fill defaults for missing configuration values.

Overrides: ConfigObject.UpgradeConfig