class documentation
class InstancePolicy(ConfigObject):
Config object representing instance policy limits dictionary.
Note that this object is not actually used in the config, it's just used as a placeholder for a few functions.
Class Method |
|
Checks the disk templates for validity. |
Class Method |
|
Check the instance policy specs for validity. |
Class Method |
|
Checks a parameter. |
Class Method |
|
Check the instance policy for validity. |
Class Method |
|
Upgrades the ipolicy configuration. |
Class Method | _ |
Undocumented |
Class Method | _ |
Check the instance policy specs for validity on a given key. |
Inherited from ConfigObject
:
Class Method |
|
Create an object from a dictionary. |
Method | __getattr__ |
Undocumented |
Method | __repr__ |
Implement __repr__ for ConfigObjects. |
Method | __setstate__ |
Undocumented |
Method |
|
Makes a deep copy of the current object and its children. |
Method |
|
Convert to a dict holding only standard python types. |
Method |
|
Fill defaults for missing configuration values. |
Method |
|
Validates the slots. |
Class Variable | __slots__ |
Undocumented |
Inherited from ValidatedSlots
(via ConfigObject
):
Class Method |
|
Compute the list of all declared slots for a class. |
Method | __init__ |
Constructor for BaseOpCode. |
Check the instance policy specs for validity.
Parameters | |
ipolicy:dict | dictionary with min/max/std specs |
check | Whether to check std value or just assume compliance |
Raises | |
errors.ConfigurationError | when specs are not valid |
Check the instance policy for validity.
Parameters | |
ipolicy:dict | dictionary with min/max/std specs and policies |
check | Whether to check std value or just assume compliance |
Raises | |
errors.ConfigurationError | when the policy is not legal |
Check the instance policy specs for validity on a given key.
We check if the instance specs makes sense for a given key, that is if minmaxspecs[min][name] <= stdspec[name] <= minmaxspec[max][name].
Parameters | |
minmaxspecs:dict | dictionary with min and max instance spec |
stdspec:dict | dictionary with standard instance spec |
name:string | what are the limits for |
check | Whether to check std value or just assume compliance |
Returns | |
bool | True when specs are valid, False when standard spec for the given name is not valid |
Raises | |
errors.ConfigurationError | when min/max specs for the given name are not valid |