Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad TryExcept body For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad ListLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Dict Return Dict Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Dict If NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body If Call NameLoad NameLoad NameLoad NameLoad body Return NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body If CompareIn NameLoad SubscriptLoad NameLoad Index NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str TryExcept body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Str Str keyword NameLoad If UnaryOpNot NameLoad body Return NameLoad Return SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str TryExcept body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Str Str keyword NameLoad If UnaryOpNot NameLoad body Return NameLoad Return SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str TryExcept body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad If BoolOpOr UnaryOpNot NameLoad CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Return NameLoad TryExcept body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call NameLoad Assign NameStore ListLoad For NameStore NameLoad body If BoolOpAnd BoolOpOr CompareEq NameLoad NameLoad CompareEq AttributeLoad NameLoad attr NameLoad BoolOpOr CompareEq Call NameLoad AttributeLoad NameLoad attr Num BoolOpAnd CompareGt Call NameLoad AttributeLoad NameLoad attr Num CompareLt NameLoad Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Assign AttributeStore NameLoad attr NameLoad For NameStore NameLoad body If CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad If CompareNotIn NameLoad SubscriptLoad NameLoad Index Num body Return NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If BoolOpOr UnaryOpNot NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad Str If Call AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str orelse Assign AttributeStore NameLoad attr Str If BoolOpAnd CompareIsNot NameLoad NameLoad Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse If Call AttributeLoad NameLoad attr Str body If Call NameLoad SubscriptLoad NameLoad Index Str Str body Assign AttributeStore NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Str attr orelse Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr Str If Call AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str orelse Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str orelse Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str orelse If NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list
N/A N/A This module file contains Governance related constants and helper functions used within the Container. pyon.core bootstrap pyon.core.bootstrap IonObject pyon.core.exception BadRequest Inconsistent pyon.ion.resource RT PRED LCS OT pyon.util.containers get_safe get_ion_ts_millis pyon.util.log log N/A DEFAULT_ACTOR_ID anonymous N/A ORG_MANAGER_ROLE ORG_MANAGER N/A ORG_MEMBER_ROLE ORG_MEMBER N/A ION_MANAGER ION_MANAGER N/A INSTRUMENT_OPERATOR INSTRUMENT_OPERATOR N/A OBSERVATORY_OPERATOR OBSERVATORY_OPERATOR N/A DATA_OPERATOR DATA_OPERATOR get_role_message_headers N/A N/A org_roles N/A N/A N/A 
    Iterate the Org(s) that the user belongs to and create a header that lists only the role names per Org assigned
    to the user; i.e. {'ION': ['Member', 'Operator'], 'Org2': ['Member']}
    @param org_roles:
    @return:
     N/A role_header N/A dict N/A N/A N/A org org_roles N/A N/A N/A role_header N/A org N/A N/A role N/A org_roles N/A org N/A N/A N/A N/A N/A role_header N/A org append N/A role governance_name N/A role_header N/A N/A N/A Exception N/A e N/A N/A N/A N/A log error e N/A role_header N/A build_actor_header N/A N/A actor_id actor_roles N/A DEFAULT_ACTOR_ID None N/A N/A 
    Use this to build the message header used by governance to identify the actor and roles.
    @param actor_id:
    @param actor_roles:
    @return:
     N/A actor_roles N/A actor_roles N/A N/A N/A ion-actor-id ion-actor-roles actor_id actor_roles N/A get_actor_header N/A N/A actor_id N/A N/A N/A 
    Returns the actor related message headers for a specific actor_id - will return anonymous if the actor_id is not found.
    @param actor_id:
    @return:
     N/A actor_header N/A build_actor_header DEFAULT_ACTOR_ID N/A N/A actor_id N/A N/A N/A N/A header_roles N/A find_roles_by_actor actor_id N/A actor_header N/A build_actor_header actor_id header_roles N/A N/A N/A Exception N/A e N/A N/A N/A N/A log error e N/A actor_header N/A has_org_role N/A N/A role_header org_governance_name role_name N/A None None None N/A N/A 
    Check the ion-actor-roles message header to see if this actor has the specified role in the specified Org.
    Parameter role_name can be a string with the name of a user role or a list of user role names, which will
    recursively call this same method for each role name in the list until one is found or the list is exhausted.
    @param role_header:
    @param org_name:
    @param role_name:
    @return:
     N/A N/A N/A role_header None N/A org_governance_name None N/A role_name None N/A N/A N/A BadRequest One of the parameters to this method are not set N/A N/A isinstance role_name list N/A N/A role role_name N/A N/A N/A has_org_role role_header org_governance_name role N/A N/A True N/A N/A N/A N/A role_header has_key org_governance_name N/A N/A N/A role_name N/A role_header N/A org_governance_name N/A N/A True N/A False N/A find_roles_by_actor N/A N/A actor_id N/A None N/A N/A 
    Returns a dict of all User Roles roles by Org Name associated with the specified actor
    @param actor_id:
    @return:
     N/A N/A N/A actor_id None N/A N/A len actor_id N/A N/A N/A BadRequest The actor_id parameter is missing N/A role_dict N/A dict N/A gov_controller N/A N/A bootstrap container_instance governance_controller N/A N/A role_list _ N/A N/A N/A gov_controller rr find_objects actor_id N/A PRED hasRole N/A RT UserRole N/A role role_list N/A N/A N/A N/A N/A role_dict has_key N/A role org_governance_name N/A N/A N/A role_dict N/A N/A role org_governance_name N/A list N/A N/A N/A N/A role_dict N/A N/A role org_governance_name append N/A role governance_name N/A N/A N/A N/A role_dict has_key N/A gov_controller system_root_org_name N/A N/A N/A role_dict N/A N/A gov_controller system_root_org_name N/A list N/A N/A N/A N/A role_dict N/A N/A gov_controller system_root_org_name append ORG_MEMBER_ROLE N/A role_dict N/A get_web_authentication_actor N/A N/A N/A N/A N/A 
    Returns the ION System Actor defined in the Resource Registry
    @return:
     N/A N/A N/A gov_controller N/A N/A bootstrap container_instance governance_controller N/A N/A web_actor _ N/A N/A N/A gov_controller rr find_resources N/A RT ActorIdentity name N/A get_safe N/A gov_controller CFG system.web_authentication_actor web_authentication id_only False N/A N/A web_actor N/A N/A None N/A N/A web_actor N/A 0 N/A N/A N/A Exception N/A e N/A N/A N/A N/A log error e N/A None N/A get_system_actor N/A N/A N/A N/A N/A 
    Returns the ION System Actor defined in the Resource Registry
    @return:
     N/A N/A N/A gov_controller N/A N/A bootstrap container_instance governance_controller N/A N/A system_actor _ N/A N/A N/A gov_controller rr find_resources N/A RT ActorIdentity name N/A get_safe N/A gov_controller CFG system.system_actor ionsystem id_only False N/A N/A system_actor N/A N/A None N/A N/A system_actor N/A 0 N/A N/A N/A Exception N/A e N/A N/A N/A N/A log error e N/A None N/A is_system_actor N/A N/A actor_id N/A N/A N/A 
    Is this the specified actor_id the system actor
    @param actor_id:
    @return:
     N/A system_actor N/A get_system_actor N/A N/A N/A system_actor None N/A N/A system_actor _id actor_id N/A N/A True N/A False N/A get_system_actor_header N/A N/A system_actor N/A None N/A N/A 
    Returns the actor related message headers for a the ION System Actor
    @param system_actor:
    @return:
     N/A N/A N/A N/A system_actor None N/A N/A system_actor N/A get_system_actor N/A N/A N/A system_actor N/A system_actor None N/A N/A N/A N/A log warn The ION System Actor Identity was not found; defaulting to anonymous actor N/A actor_header N/A get_actor_header None N/A N/A actor_header N/A get_actor_header N/A system_actor _id N/A actor_header N/A N/A N/A Exception N/A e N/A N/A N/A N/A log error e N/A N/A get_actor_header None N/A get_valid_resource_commitments N/A N/A resource_id actor_id N/A None None N/A N/A 
    Returns the list of valid commitments for the specified resource.
    If optional actor_id is supplied, then filtered by actor_id
    @param resource_id:
    @param actor_id:
    @return:
     N/A N/A N/A log debug N/A Finding commitments for resource_id: %s and actor_id: %s N/A resource_id actor_id N/A N/A resource_id None N/A N/A None N/A N/A N/A gov_controller N/A N/A bootstrap container_instance governance_controller N/A N/A commitments _ N/A N/A N/A gov_controller rr find_objects resource_id N/A PRED hasCommitment N/A RT Commitment N/A N/A commitments N/A N/A None N/A cur_time N/A get_ion_ts_millis N/A commitment_list N/A N/A com commitments N/A N/A N/A N/A N/A actor_id None N/A N/A com consumer actor_id N/A N/A N/A int N/A com expiration 0 N/A N/A N/A int N/A com expiration 0 N/A cur_time N/A int N/A com expiration N/A N/A N/A N/A commitment_list append com N/A commitment_list N/A N/A commitment_list N/A N/A N/A Exception N/A e N/A N/A N/A N/A log error e N/A None N/A has_valid_resource_commitments N/A N/A actor_id resource_id N/A N/A N/A 
    Returns a ResourceCommitmentStatus object indicating the commitment status between this resource/actor
    Can only have an exclusive commitment if actor already has a shared commitment.
    @param actor_id:
    @param resource_id:
    @return:
     N/A ret_status N/A IonObject N/A OT ResourceCommitmentStatus N/A commitments N/A get_valid_resource_commitments resource_id actor_id N/A N/A commitments None N/A N/A ret_status N/A N/A ret_status shared True N/A com commitments N/A N/A N/A N/A N/A com commitment exclusive True N/A N/A N/A ret_status exclusive True N/A ret_status N/A ret_status N/A has_valid_shared_resource_commitment N/A N/A actor_id resource_id N/A None None N/A N/A 
    This method returns True if the specified actor_id has acquired shared access for the specified resource id, otherwise False.
    @param msg:
    @param headers:
    @return:
     N/A N/A N/A actor_id None N/A resource_id None N/A N/A N/A BadRequest One or all of the method parameters are not set N/A commitment_status N/A has_valid_resource_commitments actor_id resource_id N/A N/A commitment_status shared N/A has_valid_exclusive_resource_commitment N/A N/A actor_id resource_id N/A None None N/A N/A 
    This method returns True if the specified actor_id has acquired exclusive access for the specified resource id, otherwise False.
    @param msg:
    @param headers:
    @return:
     N/A N/A N/A actor_id None N/A resource_id None N/A N/A N/A BadRequest One or all of the method parameters are not set N/A commitment_status N/A has_valid_resource_commitments actor_id resource_id N/A N/A N/A commitment_status shared N/A N/A False N/A N/A commitment_status exclusive N/A is_resource_owner N/A N/A actor_id resource_id N/A None None N/A N/A 
    Returns True if the specified actor_id is an Owner of the specified resource id, otherwise False
    @param actor_id:
    @param resource_id:
    @return:
     N/A N/A N/A actor_id None N/A resource_id None N/A N/A N/A BadRequest One or all of the method parameters are not set N/A gov_controller N/A N/A bootstrap container_instance governance_controller N/A owners N/A N/A N/A gov_controller rr find_objects subject resource_id predicate N/A PRED hasOwner object_type N/A RT ActorIdentity id_only True N/A N/A actor_id N/A owners N/A 0 N/A N/A False N/A True N/A GovernanceHeaderValues N/A object N/A N/A 
    A helper class for containing governance values from a message header
     __init__ N/A N/A self headers process resource_id_required N/A None True N/A N/A 
        A helper object for retrieving governance related values: op, actor_id, actor_roles, resource_id from the message header
        @param headers:
        @param resource_id_required: True if the message header must have a resource-id field and value.
        @return op, actor_id, actor_roles, resource_id:
         N/A N/A N/A headers N/A N/A isinstance headers dict N/A N/A len headers N/A N/A N/A BadRequest The headers parameter is not a valid message header dictionary N/A N/A N/A headers has_key op N/A N/A N/A self _op N/A headers N/A op N/A N/A N/A self _op Unknown-Operation N/A N/A N/A process None N/A hasattr process name N/A N/A N/A self _process_name N/A process name N/A N/A N/A N/A headers has_key process N/A N/A N/A getattr N/A headers N/A process name N/A N/A N/A self _process_name N/A N/A headers N/A process name N/A N/A N/A self _process_name Unknown-Process N/A N/A N/A self _process_name Unknown-Process N/A N/A N/A headers has_key ion-actor-id N/A N/A N/A self _actor_id N/A headers N/A ion-actor-id N/A N/A N/A Inconsistent N/A %s(%s) has been denied since the ion-actor-id can not be found in the message headers N/A N/A self _process_name N/A self _op N/A N/A N/A headers has_key ion-actor-roles N/A N/A N/A self _actor_roles N/A headers N/A ion-actor-roles N/A N/A N/A Inconsistent N/A %s(%s) has been denied since the ion-actor-roles can not be found in the message headers N/A N/A self _process_name N/A self _op N/A N/A N/A headers has_key resource-id N/A N/A N/A self _resource_id N/A headers N/A resource-id N/A N/A resource_id_required N/A N/A N/A Inconsistent N/A %s(%s) has been denied since the resource-id can not be found in the message headers N/A N/A self _process_name N/A self _op N/A N/A self _resource_id N/A op N/A N/A self N/A N/A N/A N/A self _op N/A property actor_id N/A N/A self N/A N/A N/A N/A self _actor_id N/A property actor_roles N/A N/A self N/A N/A N/A N/A self _actor_roles N/A property resource_id N/A N/A self N/A N/A N/A N/A self _resource_id N/A property process_name N/A N/A self N/A N/A N/A N/A self _process_name N/A property N/A