Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str NameLoad If CompareIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Continue Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str NameLoad If CompareIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Continue Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Assign NameStore BinOpMod Str NameLoad Raise Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Assign NameStore BinOpMod Str NameLoad Raise Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
Module for loading RBAC role definitions and grants from the filesystem.
 N/A os N/A glob oslo_config cfg st2common log logging st2common.content.loader MetaLoader st2common.models.api.rbac RoleDefinitionFileFormatAPI st2common.models.api.rbac UserRoleAssignmentFileFormatAPI st2common.util.misc compare_path_file_name N/A LOG N/A N/A logging getLogger __name__ N/A __all__ N/A RBACDefinitionsLoader RBACDefinitionsLoader N/A object N/A N/A 
    A class which loads role definitions and user role assignments from files on
    disk.
     __init__ N/A N/A self N/A N/A N/A base_path N/A N/A N/A cfg CONF system base_path N/A rbac_definitions_path N/A N/A N/A os path join base_path rbac/ N/A N/A self _role_definitions_path N/A N/A N/A os path join rbac_definitions_path roles/ N/A N/A self _role_assignments_path N/A N/A N/A os path join rbac_definitions_path assignments/ N/A N/A self _meta_loader N/A MetaLoader N/A load N/A N/A self N/A N/A N/A 
        :return: Dict with the following keys: roles, role_assiginments
        :rtype: ``dict``
         N/A result N/A N/A N/A result N/A roles N/A N/A self load_role_definitions N/A N/A result N/A role_assignments N/A N/A self load_user_role_assignments N/A result N/A load_role_definitions N/A N/A self N/A N/A N/A 
        Load all the role definitions.

        :rtype: ``dict``
         N/A N/A N/A LOG info N/A Loading role definitions from "%s" N/A self _role_definitions_path N/A file_paths N/A N/A self _get_role_definitions_file_paths N/A result N/A N/A file_path file_paths N/A N/A N/A N/A LOG debug N/A Loading role definition from: %s file_path N/A role_definition_api N/A N/A self load_role_definition_from_file file_path file_path N/A role_name N/A role_definition_api name N/A enabled N/A getattr role_definition_api enabled True N/A N/A role_name result N/A N/A N/A ValueError N/A Duplicate definition file found for role "%s" role_name N/A N/A enabled N/A N/A N/A N/A LOG debug N/A Skipping disabled role "%s" role_name N/A N/A N/A result N/A role_name role_definition_api N/A result N/A load_user_role_assignments N/A N/A self N/A N/A N/A 
        Load all the user role assignments.

        :rtype: ``dict``
         N/A N/A N/A LOG info N/A Loading user role assignments from "%s" N/A self _role_assignments_path N/A file_paths N/A N/A self _get_role_assiginments_file_paths N/A result N/A N/A file_path file_paths N/A N/A N/A N/A LOG debug N/A Loading user role assignments from: %s file_path N/A role_assignment_api N/A N/A self load_user_role_assignments_from_file file_path file_path N/A username N/A role_assignment_api username N/A enabled N/A getattr role_assignment_api enabled True N/A N/A username result N/A N/A N/A ValueError N/A Duplicate definition file found for user "%s" username N/A N/A enabled N/A N/A N/A N/A LOG debug N/A Skipping disabled role assignment for user "%s" username N/A N/A N/A result N/A username role_assignment_api N/A result N/A load_role_definition_from_file N/A N/A self file_path N/A N/A N/A 
        Load role definition from file.

        :param file_path: Path to the role definition file.
        :type file_path: ``str``

        :return: Role definition.
        :rtype: :class:`RoleDefinitionFileFormatAPI`
         N/A content N/A N/A N/A self _meta_loader load file_path N/A N/A content N/A N/A msg N/A Role definition file "%s" is empty and invalid file_path N/A N/A ValueError msg N/A role_definition_api N/A RoleDefinitionFileFormatAPI content N/A N/A N/A role_definition_api validate N/A role_definition_api N/A load_user_role_assignments_from_file N/A N/A self file_path N/A N/A N/A 
        Load user role assignments from file.

        :param file_path: Path to the user role assignment file.
        :type file_path: ``str``

        :return: User role assignments.
        :rtype: :class:`UserRoleAssignmentFileFormatAPI`
         N/A content N/A N/A N/A self _meta_loader load file_path N/A N/A content N/A N/A msg N/A Role assignment file "%s" is empty and invalid file_path N/A N/A ValueError msg N/A user_role_assignment_api N/A UserRoleAssignmentFileFormatAPI content N/A N/A N/A user_role_assignment_api validate N/A user_role_assignment_api N/A _get_role_definitions_file_paths N/A N/A self N/A N/A N/A 
        Retrieve a list of paths for all the role definitions.

        Notes: Roles are sorted in an alphabetical order based on the role name.

        :rtype: ``list``
         N/A glob_str N/A N/A self _role_definitions_path *.yaml N/A file_paths N/A N/A glob glob glob_str N/A file_paths N/A sorted file_paths cmp compare_path_file_name N/A file_paths N/A _get_role_assiginments_file_paths N/A N/A self N/A N/A N/A 
        Retrieve a list of paths for all the user role assignments.

        Notes: Assignments are sorted in an alphabetical order based on the username.

        :rtype: ``list``
         N/A glob_str N/A N/A self _role_assignments_path *.yaml N/A file_paths N/A N/A glob glob glob_str N/A file_paths N/A sorted file_paths cmp compare_path_file_name N/A file_paths N/A N/A