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

Class Instance

source code


Config object representing an instance.

Instance Methods [hide private]
string
FindDisk(self, idx)
Find a disk given having a specified index.
source code
 
ToDict(self, _with_private=False)
Instance-specific conversion to standard python types.
source code
 
UpgradeConfig(self)
Fill defaults for missing configuration values.
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 instances.
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]

FindDisk(self, idx)

source code 

Find a disk given having a specified index.

This is just a wrapper that does validation of the index.

Parameters:
  • idx (int) - the disk index
Returns: string
the corresponding disk's uuid
Raises:

ToDict(self, _with_private=False)

source code 

Instance-specific conversion to standard python types.

This replaces the children lists of objects with lists of 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 instances.

Overrides: ConfigObject.FromDict

UpgradeConfig(self)

source code 

Fill defaults for missing configuration values.

Overrides: ConfigObject.UpgradeConfig