Package ganeti :: Module opcodes :: 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.

Instance Methods [hide private]
 
__init__(self, **kwargs)
Constructor for BaseOpCode.
source code
dict
__getstate__(self)
Generic serializer.
source code
 
__setstate__(self, state)
Generic unserializer.
source code

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

Class Methods [hide private]
 
_all_slots(cls)
Compute the list of all declared slots for a class.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 

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.

Overrides: object.__init__

__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