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

Module objects

source code

Transportable objects for Ganeti.

This module provides small, mostly data-only objects which are safe to pass to and from external parties.

Classes [hide private]
  ConfigObject
A generic config object.
  TaggableObject
An generic class supporting tags.
  MasterNetworkParameters
Network configuration parameters for the master
  ConfigData
Top-level config object.
  NIC
Config object representing a network card.
  Filter
Config object representing a filter rule.
  Maintenance
Config object representing the state of the maintenance daemon
  Disk
Config object representing a block device.
  InstancePolicy
Config object representing instance policy limits dictionary.
  Instance
Config object representing an instance.
  OS
Config object representing an operating system.
  ExtStorage
Config object representing an External Storage Provider.
  NodeHvState
Hypvervisor state on a node.
  NodeDiskState
Disk state on a node.
  Node
Config object representing a node.
  NodeGroup
Config object representing a node group.
  Cluster
Config object representing the cluster.
  BlockDevStatus
Config object representing the status of a block device.
  ImportExportStatus
Config object representing the status of an import or export.
  ImportExportOptions
Options for import/export daemon
  ConfdRequest
Object holding a confd request.
  ConfdReply
Object holding a confd reply.
  QueryFieldDefinition
Object holding a query field definition.
  _QueryResponseBase
  QueryResponse
Object holding the response to a query.
  QueryFieldsRequest
Object holding a request for querying available fields.
  QueryFieldsResponse
Object holding the response to a query for fields.
  MigrationStatus
Object holding the status of a migration.
  InstanceConsole
Object describing how to access the console of an instance.
  Network
Object representing a network definition for ganeti.
  SerializableConfigParser
Simple wrapper over ConfigParse that allows serialization.
  LvmPvInfo
Information about an LVM physical volume (PV).
Functions [hide private]
dict
FillDict(defaults_dict, custom_dict, skip_keys=None)
Basic function to apply settings on top a default dict.
source code
 
FillIPolicy(default_ipolicy, custom_ipolicy)
Fills an instance policy with defaults.
source code
 
FillDiskParams(default_dparams, custom_dparams, skip_keys=None)
Fills the disk parameter defaults.
source code
 
UpgradeGroupedParams(target, defaults)
Update all groups for the target parameter.
source code
 
UpgradeBeParams(target)
Update the be parameters dict to the new format.
source code
dict
UpgradeDiskParams(diskparams)
Upgrade the disk parameters.
source code
dict
UpgradeNDParams(ndparams)
Upgrade ndparams structure.
source code
 
MakeEmptyIPolicy()
Create empty IPolicy dictionary.
source code
string or NoneType
GetOSImage(osparams)
Gets the OS image value from the OS parameters.
source code
NoneType
PutOSImage(osparams, os_image)
Update OS image value in the OS parameters
source code
Variables [hide private]
  _TIMESTAMPS = ["ctime", "mtime"]
  _UUID = ["uuid"]

Imports: ConfigParser, re, copy, logging, time, StringIO, errors, constants, netutils, outils, utils, serializer, AF_INET


Function Details [hide private]

FillDict(defaults_dict, custom_dict, skip_keys=None)

source code 

Basic function to apply settings on top a default dict.

Parameters:
  • defaults_dict (dict) - dictionary holding the default values
  • custom_dict (dict) - dictionary holding customized value
  • skip_keys (list) - which keys not to fill
Returns: dict
dict with the 'full' values

FillDiskParams(default_dparams, custom_dparams, skip_keys=None)

source code 

Fills the disk parameter defaults.

See Also: FillDict for parameters and return value

UpgradeGroupedParams(target, defaults)

source code 

Update all groups for the target parameter.

Parameters:
  • target (dict of dicts) - {group: {parameter: value}}
  • defaults (dict) - default parameter values

UpgradeBeParams(target)

source code 

Update the be parameters dict to the new format.

Parameters:
  • target (dict) - "be" parameters dict

UpgradeDiskParams(diskparams)

source code 

Upgrade the disk parameters.

Parameters:
  • diskparams (dict) - disk parameters to upgrade
Returns: dict
the upgraded disk parameters dict

UpgradeNDParams(ndparams)

source code 

Upgrade ndparams structure.

Parameters:
  • ndparams (dict) - disk parameters to upgrade
Returns: dict
the upgraded node parameters dict

GetOSImage(osparams)

source code 

Gets the OS image value from the OS parameters.

Parameters:
  • osparams (dict or NoneType) - OS parameters or None
Returns: string or NoneType
value of OS image contained in OS parameters, or None if the OS parameters are None or the OS parameters do not contain an OS image

PutOSImage(osparams, os_image)

source code 

Update OS image value in the OS parameters

Parameters:
  • osparams (dict) - OS parameters
  • os_image (string) - OS image
Returns: NoneType
None