class documentation

Config object representing the cluster.

Class Method FromDict Custom function for cluster.
Static Method SimpleFillDiskState Fill an disk_state sub dict with cluster defaults.
Static Method SimpleFillHvState Fill an hv_state sub dict with cluster defaults.
Method FillBE Fill an instance's beparams dict with cluster defaults.
Method FillHV Fill an instance's hvparams dict with cluster defaults.
Method FillND Return filled out ndparams for objects.NodeGroup and objects.Node
Method FillNDGroup Return filled out ndparams for just objects.NodeGroup
Method GetHVDefaults Get the default hypervisor parameters for the cluster.
Method IsDiskTemplateEnabled Checks if a particular disk template is enabled.
Method IsFileStorageEnabled Checks if file storage is enabled.
Method IsSharedFileStorageEnabled Checks if shared file storage is enabled.
Method SimpleFillBE Fill a given beparams dict with cluster defaults.
Method SimpleFillDP Fill a given diskparams dict with cluster defaults.
Method SimpleFillHV Fill a given hvparams dict with cluster defaults.
Method SimpleFillIPolicy Fill instance policy dict with defaults.
Method SimpleFillND Fill a given ndparams dict with defaults.
Method SimpleFillNIC Fill a given nicparams dict with cluster defaults.
Method SimpleFillOS Fill an instance's osparams dict with cluster defaults.
Method ToDict Custom function for cluster.
Method UpgradeConfig Fill defaults for missing configuration values.
Class Variable __slots__ Undocumented
Instance Variable beparams Undocumented
Instance Variable blacklisted_os Undocumented
Instance Variable candidate_certs Undocumented
Instance Variable compression_tools Undocumented
Instance Variable default_bridge Undocumented
Instance Variable default_hypervisor Undocumented
Instance Variable default_iallocator Undocumented
Instance Variable default_iallocator_params Undocumented
Instance Variable disk_state_static Undocumented
Instance Variable diskparams Undocumented
Instance Variable enabled_hypervisors Undocumented
Instance Variable enabled_user_shutdown Undocumented
Instance Variable gluster_storage_dir Undocumented
Instance Variable hidden_os Undocumented
Instance Variable hv_state_static Undocumented
Instance Variable hvparams Undocumented
Instance Variable install_image Undocumented
Instance Variable instance_communication_network Undocumented
Instance Variable ipolicy Undocumented
Instance Variable maintain_node_health Undocumented
Instance Variable master_netmask Undocumented
Instance Variable max_running_jobs Undocumented
Instance Variable max_tracked_jobs Undocumented
Instance Variable modify_etc_hosts Undocumented
Instance Variable modify_ssh_setup Undocumented
Instance Variable ndparams Undocumented
Instance Variable nicparams Undocumented
Instance Variable os_hvp Undocumented
Instance Variable osparams Undocumented
Instance Variable osparams_private_cluster Undocumented
Instance Variable prealloc_wipe_disks Undocumented
Instance Variable primary_ip_family Undocumented
Instance Variable reserved_lvs Undocumented
Instance Variable shared_file_storage_dir Undocumented
Instance Variable ssh_key_bits Undocumented
Instance Variable ssh_key_type Undocumented
Instance Variable uid_pool Undocumented
Instance Variable use_external_mip_script Undocumented
Property primary_hypervisor The first hypervisor is the primary.

Inherited from TaggableObject:

Class Method ValidateTag Check if a tag is valid.
Method AddTag Add a new tag.
Method GetTags Return the tags list.
Method RemoveTag Remove a tag.
Constant VALID_TAG_RE Undocumented
Instance Variable tags Undocumented

Inherited from ConfigObject (via TaggableObject):

Method __getattr__ Undocumented
Method __repr__ Implement __repr__ for ConfigObjects.
Method __setstate__ Undocumented
Method Copy Makes a deep copy of the current object and its children.
Method Validate Validates the slots.

Inherited from ValidatedSlots (via TaggableObject, ConfigObject):

Class Method GetAllSlots Compute the list of all declared slots for a class.
Method __init__ Constructor for BaseOpCode.
@classmethod
def FromDict(cls, val):

Custom function for cluster.

@staticmethod
def SimpleFillDiskState(disk_state):

Fill an disk_state sub dict with cluster defaults.

@staticmethod
def SimpleFillHvState(hv_state):

Fill an hv_state sub dict with cluster defaults.

def FillBE(self, instance):

Fill an instance's beparams dict with cluster defaults.

Parameters
instance:objects.Instancethe instance parameter to fill
Returns
dicta copy of the instance's beparams with missing keys filled from the cluster defaults
def FillHV(self, instance, skip_globals=False):

Fill an instance's hvparams dict with cluster defaults.

Parameters
instance:objects.Instancethe instance parameter to fill
skip_globals:booleanif True, the global hypervisor parameters will not be filled
Returns
dicta copy of the instance's hvparams with missing keys filled from the cluster defaults
def FillND(self, node, nodegroup):

Return filled out ndparams for objects.NodeGroup and objects.Node

Parameters
node:objects.NodeA Node object to fill
nodegroup:objects.NodeGroupA Node object to fill @return a copy of the node's ndparams with defaults filled
def FillNDGroup(self, nodegroup):

Return filled out ndparams for just objects.NodeGroup

Parameters
nodegroup:objects.NodeGroupA Node object to fill @return a copy of the node group's ndparams with defaults filled
def GetHVDefaults(self, hypervisor, os_name=None, skip_keys=None):

Get the default hypervisor parameters for the cluster.

Parameters
hypervisorthe hypervisor name
os_nameif specified, we'll also update the defaults for this OS
skip_keysif passed, list of keys not to use
Returns
the defaults dict
def IsDiskTemplateEnabled(self, disk_template):

Checks if a particular disk template is enabled.

def IsFileStorageEnabled(self):

Checks if file storage is enabled.

def IsSharedFileStorageEnabled(self):

Checks if shared file storage is enabled.

def SimpleFillBE(self, beparams):

Fill a given beparams dict with cluster defaults.

Parameters
beparams:dictthe dict to fill
Returns
dicta copy of the passed in beparams with missing keys filled from the cluster defaults
def SimpleFillDP(self, diskparams):

Fill a given diskparams dict with cluster defaults.

Parameters
diskparamsThe diskparams
Returns
The defaults dict
def SimpleFillHV(self, hv_name, os_name, hvparams, skip_globals=False):

Fill a given hvparams dict with cluster defaults.

Parameters
hv_name:stringthe hypervisor to use
os_name:stringthe OS to use for overriding the hypervisor defaults
hvparamsUndocumented
skip_globals:booleanif True, the global hypervisor parameters will not be filled
Returns
dicta copy of the given hvparams with missing keys filled from the cluster defaults
def SimpleFillIPolicy(self, ipolicy):

Fill instance policy dict with defaults.

Parameters
ipolicy:dictthe dict to fill
Returns
dicta copy of passed ipolicy with missing keys filled from the cluster defaults
def SimpleFillND(self, ndparams):

Fill a given ndparams dict with defaults.

Parameters
ndparams:dictthe dict to fill
Returns
dicta copy of the passed in ndparams with missing keys filled from the cluster defaults
def SimpleFillNIC(self, nicparams):

Fill a given nicparams dict with cluster defaults.

Parameters
nicparams:dictthe dict to fill
Returns
dicta copy of the passed in nicparams with missing keys filled from the cluster defaults
def SimpleFillOS(self, os_name, os_params_public, os_params_private=None, os_params_secret=None):

Fill an instance's osparams dict with cluster defaults.

Parameters
os_name:stringthe OS name to use
os_params_public:dictthe dict to fill with default values
os_params_private:dictthe dict with private fields to fill with default values. Not passing this field results in no private fields being added to the return value. Private fields will be wrapped in Private objects.
os_params_secret:dictthe dict with secret fields to fill with default values. Not passing this field results in no secret fields being added to the return value. Private fields will be wrapped in Private objects.
Returns
dicta copy of the instance's osparams with missing keys filled from the cluster defaults. Private and secret parameters are not included unless the respective optional parameters are supplied.
def ToDict(self, _with_private=False):

Custom function for cluster.

def UpgradeConfig(self):

Fill defaults for missing configuration values.

__slots__ =
beparams =

Undocumented

blacklisted_os: list =

Undocumented

candidate_certs: dict =

Undocumented

compression_tools =

Undocumented

default_bridge =

Undocumented

default_hypervisor =

Undocumented

default_iallocator: str =

Undocumented

default_iallocator_params: dict =

Undocumented

disk_state_static: dict =

Undocumented

diskparams =

Undocumented

enabled_hypervisors =

Undocumented

enabled_user_shutdown: bool =

Undocumented

gluster_storage_dir: str =

Undocumented

hidden_os: list =

Undocumented

hv_state_static: dict =

Undocumented

hvparams =

Undocumented

install_image: str =

Undocumented

instance_communication_network: str =

Undocumented

ipolicy =

Undocumented

maintain_node_health: bool =

Undocumented

master_netmask =

Undocumented

max_running_jobs =

Undocumented

max_tracked_jobs =

Undocumented

modify_etc_hosts: bool =

Undocumented

modify_ssh_setup: bool =

Undocumented

ndparams =

Undocumented

nicparams =

Undocumented

os_hvp: dict =

Undocumented

osparams: dict =

Undocumented

osparams_private_cluster: dict =

Undocumented

prealloc_wipe_disks: bool =

Undocumented

primary_ip_family =

Undocumented

reserved_lvs: list =

Undocumented

shared_file_storage_dir: str =

Undocumented

ssh_key_bits =

Undocumented

ssh_key_type =

Undocumented

uid_pool: list =

Undocumented

use_external_mip_script: bool =

Undocumented

@property
primary_hypervisor =

The first hypervisor is the primary.

Useful, for example, for Node's hv/disk state.