Package ganeti :: Module opcodes_base :: Class BaseOpCode
[hide private]
[frames] | no frames]

Class BaseOpCode

source code


A simple serializable object.

This object serves as a parent class for OpCode without any custom field handling.

Nested Classes [hide private]
  __metaclass__
Meta class for opcode definitions.
Instance Methods [hide private]
dict
__getstate__(self)
Generic serializer.
source code
 
__setstate__(self, state)
Generic unserializer.
source code
 
Validate(self, set_defaults)
Validate opcode parameters, optionally setting default values.
source code

Inherited from outils.ValidatedSlots: __init__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
GetAllParams(cls)
Compute list of all parameters for an opcode.
source code

Inherited from outils.ValidatedSlots: GetAllSlots

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__getstate__(self)

source code 

Generic serializer.

This method just returns the contents of the instance as a dictionary.

Returns: dict
the instance attributes and their values

__setstate__(self, state)

source code 

Generic unserializer.

This method just restores from the serialized state the attributes of the current instance.

Parameters:
  • state (dict) - the serialized opcode data

Validate(self, set_defaults)

source code 

Validate opcode parameters, optionally setting default values.

Parameters:
  • set_defaults (bool) - Whether to set default values
Raises:
Overrides: outils.ValidatedSlots.Validate