Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad orelse If NameLoad body Return Call NameLoad NameLoad orelse Return NameLoad decorator_list Return NameLoad decorator_list Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str Assign NameStore Dict Assign NameStore ListLoad Assign NameStore Dict FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Dict AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Return NameLoad orelse If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse Raise Call NameLoad BinOpMod Call NameLoad Str AttributeLoad Call NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num If NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Return Call NameLoad NameLoad orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BoolOpOr CompareIs NameLoad NameLoad Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If BoolOpAnd CompareNotEq NameLoad NameLoad CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareIsNot NameLoad NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Raise Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore ListLoad Str Str Str FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Dict Str Str TupleLoad NameLoad Str TupleLoad NameLoad NameLoad Assign NameStore ListLoad Str Str Str Str Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Dict Str TupleLoad NameLoad Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Dict Str TupleLoad NameLoad Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body If CompareIn Str NameLoad body Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list Assign NameStore Str Assign NameStore Dict Str Str Str TupleLoad NameLoad Str TupleLoad NameLoad NameLoad TupleLoad NameLoad Str Assign NameStore ListLoad Str Str Str Str Assign NameStore Dict Str NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore ListLoad Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Str If CompareIn AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Str If CompareIn Str NameLoad body Delete SubscriptDel NameLoad Index Str If CompareIn Str NameLoad body Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn Str NameLoad body For NameStore SubscriptLoad NameLoad Index Str body If CompareIn Str NameLoad body Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list Assign NameStore Str Assign NameStore ListLoad Str Assign NameStore Dict Str Str NameLoad NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore ListLoad Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Dict Str Str TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad decorator_list
N/A N/A Provides means to wrap dicts coming from DB layer in objects.

The Conductor can fetch only values represented by JSON.
That limitation comes from Oslo RPC implementation.
This module provides means to wrap a fetched value, always
dictionary, into an immutable Resource object. A descendant of
Resource class might provide back references to parent objects
and helper methods.
 N/A datetime N/A six sahara.conductor objects sahara exceptions ex sahara.i18n _ sahara.swift swift_helper sahara.utils types wrap N/A N/A resource_class N/A N/A N/A A decorator wraps dict returned by a given function into a Resource. decorator N/A N/A func N/A N/A handle N/A N/A N/A args kwargs N/A N/A ret N/A func args kwargs N/A N/A isinstance ret list N/A N/A N/A N/A resource_class el N/A el ret N/A N/A ret N/A N/A N/A resource_class ret N/A N/A None N/A N/A handle N/A N/A decorator N/A Resource N/A N/A types FrozenDict N/A N/A Represents dictionary as an immutable object.

    Enhancing it with back references and helper methods.

    For instance, the following dictionary:
    {'first': {'a': 1, 'b': 2}, 'second': [1,2,3]}

    after wrapping with Resource will look like an object, let it be
    'res' with the following fields:
    res.first
    res.second

    'res.first' will in turn be wrapped into Resource with two fields:
    res.first.a == 1
    res.first.b == 2

    'res.second', which is a list, will be transformed into a tuple
    for immutability:
    res.second == (1,2,3)

    Additional helper methods could be specified in descendant
    classes. '_children' specifies children of that specific Resource
    in the following format: {refname: (child_class, backref_name)}
    Back reference is a reference to parent object which is
    injected into a Resource during wrapping.
     N/A _resource_name resource N/A _children N/A N/A _filter_fields N/A N/A _sanitize_fields N/A __init__ N/A N/A self dct N/A N/A N/A N/A N/A N/A super Resource self __setattr__ _initial_dict dct N/A newdct N/A dict N/A N/A refname entity N/A N/A six iteritems dct N/A N/A N/A newdct N/A refname N/A N/A self _wrap_entity refname entity N/A N/A N/A N/A super Resource self __init__ newdct N/A to_dict N/A N/A self N/A N/A N/A Return dictionary representing the Resource for REST API.

        On the way filter out fields which shouldn't be exposed.
         N/A N/A N/A self _to_dict None N/A to_wrapped_dict N/A N/A self N/A N/A N/A N/A N/A self _resource_name N/A N/A self to_dict N/A _wrap_entity N/A N/A self refname entity N/A N/A N/A N/A isinstance entity Resource N/A N/A entity N/A N/A N/A isinstance entity list N/A N/A N/A N/A self _wrap_list refname entity N/A N/A N/A isinstance entity dict N/A N/A N/A N/A self _wrap_dict refname entity N/A N/A N/A N/A self _is_passthrough_type entity N/A N/A entity N/A N/A N/A TypeError N/A N/A _ Unsupported type: %s N/A N/A type entity __name__ N/A _wrap_list N/A N/A self refname lst N/A N/A N/A newlst N/A N/A N/A self _wrap_entity refname entity N/A entity lst N/A N/A N/A types FrozenList newlst N/A _wrap_dict N/A N/A self refname dct N/A N/A N/A N/A refname N/A self _children N/A N/A dct N/A dict dct N/A child_class N/A N/A N/A self _children N/A refname N/A 0 N/A backref_name N/A N/A N/A self _children N/A refname N/A 1 N/A backref_name N/A N/A N/A dct N/A backref_name self N/A N/A child_class dct N/A N/A N/A Resource dct N/A _is_passthrough_type N/A N/A self entity N/A N/A N/A N/A N/A entity None N/A isinstance entity N/A N/A six integer_types float N/A datetime datetime N/A six string_types N/A _to_dict N/A N/A self backref N/A N/A N/A dct N/A dict N/A N/A refname entity N/A N/A six iteritems self N/A N/A N/A N/A refname backref N/A refname N/A self _filter_fields N/A N/A childs_backref None N/A N/A refname N/A self _children N/A N/A childs_backref N/A N/A N/A self _children N/A refname N/A 1 N/A N/A dct N/A refname N/A N/A self _entity_to_dict entity childs_backref N/A sanitize N/A N/A N/A self _sanitize_fields get refname N/A N/A sanitize None N/A N/A N/A dct N/A refname N/A sanitize self N/A dct N/A refname N/A dct N/A _entity_to_dict N/A N/A self entity childs_backref N/A N/A N/A N/A isinstance entity Resource N/A N/A N/A N/A entity _to_dict childs_backref N/A N/A N/A isinstance entity list N/A N/A N/A N/A self _list_to_dict entity childs_backref N/A N/A N/A entity None N/A N/A entity N/A _list_to_dict N/A N/A self lst childs_backref N/A N/A N/A N/A N/A N/A self _entity_to_dict entity childs_backref N/A entity lst N/A __getattr__ N/A N/A self item N/A N/A N/A N/A self N/A item N/A __setattr__ N/A N/A self N/A args N/A N/A N/A N/A ex FrozenClassError self N/A N/A NodeGroupTemplateResource N/A Resource N/A objects NodeGroupTemplate N/A N/A _resource_name node_group_template N/A InstanceResource N/A Resource N/A objects Instance N/A N/A _filter_fields N/A tenant_id node_group_id volumes cluster_id N/A N/A self N/A N/A N/A N/A N/A self node_group cluster_id N/A property cluster N/A N/A self N/A N/A N/A N/A N/A self node_group cluster N/A property N/A NodeGroupResource N/A Resource N/A objects NodeGroup N/A N/A _children N/A instances node_group_template N/A InstanceResource node_group N/A NodeGroupTemplateResource None N/A _filter_fields N/A tenant_id cluster_id cluster_template_id image_username open_ports N/A ClusterTemplateResource N/A Resource N/A objects ClusterTemplate N/A N/A _resource_name cluster_template N/A _children N/A node_groups N/A NodeGroupResource cluster_template N/A ClusterHealthCheckResource N/A Resource N/A objects ClusterHealthCheck N/A N/A _resource_name cluster_health_check N/A ClusterVerificationResource N/A Resource N/A objects ClusterVerification N/A N/A _resource_name cluster_verification N/A _children N/A checks N/A ClusterHealthCheckResource verification N/A ClusterResource N/A Resource N/A objects Cluster N/A sanitize_cluster_configs N/A N/A self cluster_configs N/A N/A N/A N/A proxy_configs cluster_configs N/A N/A N/A cluster_configs N/A proxy_configs N/A cluster_configs N/A N/A _resource_name cluster N/A _children N/A node_groups cluster_template verification N/A NodeGroupResource cluster N/A ClusterTemplateResource None N/A ClusterVerificationResource cluster N/A _filter_fields N/A management_private_key extra rollback_info sahara_info N/A _sanitize_fields N/A cluster_configs sanitize_cluster_configs N/A DataSource N/A Resource N/A objects DataSource N/A N/A _resource_name data_source N/A _filter_fields N/A credentials N/A JobExecution N/A Resource N/A objects JobExecution N/A sanitize_job_configs N/A N/A self job_configs N/A N/A N/A N/A configs job_configs N/A N/A configs N/A job_configs N/A configs N/A N/A N/A swift_helper HADOOP_SWIFT_USERNAME configs N/A N/A N/A configs N/A N/A swift_helper HADOOP_SWIFT_USERNAME N/A N/A N/A swift_helper HADOOP_SWIFT_PASSWORD configs N/A N/A N/A configs N/A N/A swift_helper HADOOP_SWIFT_PASSWORD N/A N/A trusts job_configs N/A N/A N/A job_configs N/A trusts N/A N/A proxy_configs job_configs N/A N/A N/A job_configs N/A proxy_configs N/A job_configs N/A sanitize_info N/A N/A self info N/A N/A N/A N/A actions info N/A N/A d N/A info N/A actions N/A N/A N/A conf d N/A N/A N/A d N/A conf N/A info N/A N/A _resource_name job_execution N/A _filter_fields N/A extra N/A _sanitize_fields N/A job_configs info sanitize_job_configs sanitize_info N/A JobBinary N/A Resource N/A objects JobBinary N/A N/A _resource_name job_binary N/A _filter_fields N/A extra N/A JobBinaryInternal N/A Resource N/A objects JobBinaryInternal N/A N/A _resource_name job_binary_internal N/A Job N/A Resource N/A objects Job N/A N/A _resource_name job N/A _children N/A mains libs N/A JobBinary None N/A JobBinary None N/A