class documentation
A simple serializable object.
This object serves as a parent class for OpCode without any custom field handling.
Class Method |
|
Compute list of all parameters for an opcode. |
Method | __getstate__ |
Generic serializer. |
Method | __init__ |
Constructor for BaseOpCode. |
Method | __setstate__ |
Generic unserializer. |
Method |
|
Validate opcode parameters, optionally setting default values. |
Inherited from ValidatedSlots
:
Class Method |
|
Compute the list of all declared slots for a class. |
Class Variable | __slots__ |
Undocumented |
overridden in
ganeti.opcodes.OpCode
Generic serializer.
This method just returns the contents of the instance as a dictionary.
Returns | |
dict | the instance attributes and their values |
overrides
ganeti.outils.ValidatedSlots.__init__
Constructor for BaseOpCode.
The constructor takes only keyword arguments and will set attributes on this object based on the passed arguments. As such, it means that you should not pass arguments which are not in the __slots__ attribute for this class.
overridden in
ganeti.opcodes.OpInstanceMultiAllocBase
Generic unserializer.
This method just restores from the serialized state the attributes of the current instance.
Parameters | |
state:dict | the serialized opcode data |
overrides
ganeti.outils.ValidatedSlots.Validate
overridden in
ganeti.opcodes.OpInstanceMultiAllocBase
Validate opcode parameters, optionally setting default values.
Parameters | |
set | whether to set default values |
Returns | |
NoneType | None , if the validation succeeds |
Raises | |
errors.OpPrereqError | when a parameter value doesn't match requirements |