Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str Str Str Str Str Str Str Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Str Assert Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return NameLoad Return Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return NameLoad Return BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr comprehension NameStore Call NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assert CompareNotIn Str NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert BoolOpOr CompareNotIn Str NameLoad CompareIn SubscriptLoad NameLoad Index Str NameLoad BinOpMod Str NameLoad Assert BoolOpOr CompareNotIn Str NameLoad Call NameLoad SubscriptLoad NameLoad Index Str BinOpMod Str TupleLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Return ListComp NameLoad comprehension TupleStore NameStore NameStore NameStore NameStore NameLoad decorator_list NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad For TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body If BoolOpAnd CompareNotIn NameLoad NameLoad Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str ListLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str For TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr body Assert Call NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad body If NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad orelse If BoolOpAnd Call AttributeLoad NameLoad attr NameLoad Call NameLoad Call NameLoad NameLoad body If NameLoad body Expr Call NameLoad NameLoad NameLoad Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Raise Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr ListLoad NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad NameLoad
N/A N/A OpCodes base module

This module implements part of the data structures which define the
cluster operations - the so-called opcodes.

Every operation which modifies the cluster state is expressed via
opcodes.

 N/A copy N/A logging N/A re ganeti constants ganeti errors ganeti ht ganeti outils N/A _OPID_RE N/A N/A re compile ([a-z])([A-Z]) N/A SUMMARY_PREFIX N/A CLUSTER_ GROUP_ NODE_ INSTANCE_ C_ G_ N_ I_ N/A DEPEND_ATTR depends N/A COMMENT_ATTR comment _NameComponents N/A N/A name N/A N/A N/A Split an opcode class name into its components

  @type name: string
  @param name: the class name, as OpXxxYyy
  @rtype: array of strings
  @return: the components of the name

   N/A N/A N/A name startswith Op N/A name N/A N/A _OPID_RE sub \1,\2 name N/A elems N/A N/A name split , N/A elems N/A _NameToId N/A N/A name N/A N/A N/A Convert an opcode class name to an OP_ID.

  @type name: string
  @param name: the class name, as OpXxxYyy
  @rtype: string
  @return: the name in the OP_XXXX_YYYY format

   N/A N/A N/A N/A name startswith Op N/A N/A None N/A N/A N/A _ join N/A N/A N/A n upper N/A n N/A _NameComponents name N/A NameToReasonSrc N/A N/A name prefix N/A N/A N/A Convert an opcode class name to a source string for the reason trail

  @type name: string
  @param name: the class name, as OpXxxYyy
  @type prefix: string
  @param prefix: the prefix that will be prepended to the opcode name
  @rtype: string
  @return: the name in the OP_XXXX_YYYY format

   N/A N/A N/A N/A name startswith Op N/A N/A None N/A N/A %s:%s N/A prefix N/A N/A _ join N/A N/A N/A n lower N/A n N/A _NameComponents name N/A _AutoOpParamSlots N/A N/A outils AutoSlots N/A N/A Meta class for opcode definitions.

   __new__ N/A N/A mcs name bases attrs N/A N/A N/A Called when a class should be created.

    @param mcs: The meta class
    @param name: Name of created class
    @param bases: Base classes
    @type attrs: dict
    @param attrs: Class attributes

     N/A N/A OP_ID attrs N/A Class '%s' defining OP_ID name N/A slots N/A N/A mcs _GetSlots attrs N/A N/A N/A OP_DSC_FIELD attrs N/A N/A attrs N/A OP_DSC_FIELD slots N/A Class '%s' uses unknown field in OP_DSC_FIELD name N/A N/A N/A OP_DSC_FORMATTER attrs N/A callable N/A attrs N/A OP_DSC_FORMATTER N/A Class '%s' uses non-callable in OP_DSC_FORMATTER (%s) N/A name N/A type N/A attrs N/A OP_DSC_FORMATTER N/A N/A attrs N/A OP_ID N/A _NameToId name N/A N/A N/A N/A outils AutoSlots __new__ mcs name bases attrs N/A _GetSlots N/A N/A mcs attrs N/A N/A N/A Build the slots out of OP_PARAMS.

     N/A params N/A N/A attrs setdefault OP_PARAMS N/A N/A N/A pname N/A N/A pname _ _ _ params N/A classmethod N/A BaseOpCode N/A N/A outils ValidatedSlots N/A N/A A simple serializable object.

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

   N/A __metaclass__ _AutoOpParamSlots __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A N/A outils ValidatedSlots __init__ self kwargs N/A N/A key default _ _ N/A N/A N/A self __class__ GetAllParams N/A N/A N/A N/A hasattr self key N/A N/A N/A setattr self key default N/A __getstate__ N/A N/A self N/A N/A N/A Generic serializer.

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

    @rtype:  C{dict}
    @return: the instance attributes and their values

     N/A state N/A N/A name N/A N/A self GetAllSlots N/A N/A N/A hasattr self name N/A N/A N/A state N/A name N/A getattr self name N/A state N/A __setstate__ N/A N/A self state N/A N/A N/A Generic unserializer.

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

    @param state: the serialized opcode data
    @type state:  C{dict}

     N/A N/A N/A isinstance state dict N/A N/A N/A ValueError N/A Invalid data to __setstate__: expected dict, got %s N/A type state N/A name N/A N/A self GetAllSlots N/A N/A N/A N/A name state N/A hasattr self name N/A N/A N/A delattr self name N/A name state N/A N/A N/A setattr self name N/A state N/A name N/A GetAllParams N/A N/A cls N/A N/A N/A Compute list of all parameters for an opcode.

     N/A slots N/A N/A parent N/A cls __mro__ N/A N/A N/A N/A slots extend N/A getattr parent OP_PARAMS N/A N/A slots N/A classmethod Validate N/A N/A self set_defaults N/A N/A N/A Validate opcode parameters, optionally setting default values.

    @type set_defaults: bool
    @param set_defaults: whether to set default values

    @rtype: NoneType
    @return: L{None}, if the validation succeeds
    @raise errors.OpPrereqError: when a parameter value doesn't match
                                 requirements

     N/A N/A attr_name default test _ N/A N/A self GetAllParams N/A N/A N/A callable test N/A N/A hasattr self attr_name N/A N/A attr_val N/A getattr self attr_name N/A N/A attr_val N/A N/A copy deepcopy default N/A N/A test attr_val N/A N/A set_defaults N/A N/A N/A setattr self attr_name attr_val N/A N/A N/A N/A N/A ht TInt attr_val N/A test N/A float attr_val N/A N/A set_defaults N/A N/A N/A setattr self attr_name N/A float attr_val N/A N/A N/A N/A logging error OpCode %s, parameter %s, has invalid type %s/value '%s' expecting type %s N/A self OP_ID attr_name N/A type attr_val attr_val test N/A N/A attr_val None N/A N/A N/A N/A logging error OpCode %s, parameter %s, has default value None which is does not check against the parameter's type: this means this parameter is required but no value was given N/A self OP_ID attr_name N/A N/A N/A errors OpPrereqError N/A Parameter '%s.%s' fails validation N/A N/A self OP_ID attr_name N/A errors ECODE_INVAL N/A N/A BuildJobDepCheck N/A N/A relative N/A N/A N/A Builds check for job dependencies (L{DEPEND_ATTR}).

  @type relative: bool
  @param relative: Whether to accept relative job IDs (negative)
  @rtype: callable

   N/A relative N/A N/A job_id N/A N/A ht TOr N/A ht TJobId N/A ht TRelativeJobId N/A N/A job_id N/A ht TJobId N/A job_dep N/A N/A ht TAnd N/A N/A ht TOr N/A N/A ht TListOf N/A ht TAny N/A ht TTuple N/A N/A ht TIsLength 2 N/A N/A ht TItems N/A job_id N/A N/A ht TListOf N/A N/A ht TElemOf N/A constants JOBS_FINALIZED N/A N/A N/A ht TMaybe N/A N/A ht TListOf job_dep N/A N/A TNoRelativeJobDependencies N/A BuildJobDepCheck False