Package cm_api :: Package endpoints :: Module role_config_groups
[hide private]
[frames] | no frames]

Module role_config_groups

source code

Classes [hide private]
  ApiRoleConfigGroup
name is RW only temporarily; once all RCG names are unique, this property will be auto-generated and Read-only
Functions [hide private]
 
_get_role_config_groups_path(cluster_name, service_name) source code
 
_get_role_config_group_path(cluster_name, service_name, name) source code
 
create_role_config_groups(resource_root, service_name, apigroup_list, cluster_name='default')
Create role config groups.
source code
 
create_role_config_group(resource_root, service_name, name, display_name, role_type, cluster_name='default')
Create a role config group.
source code
 
get_role_config_group(resource_root, service_name, name, cluster_name='default')
Find a role config group by name.
source code
 
_get_role_config_group(resource_root, path) source code
 
get_all_role_config_groups(resource_root, service_name, cluster_name='default')
Get all role config groups in the specified service.
source code
 
update_role_config_group(resource_root, service_name, name, apigroup, cluster_name='default')
Update a role config group by name.
source code
 
delete_role_config_group(resource_root, service_name, name, cluster_name='default')
Delete a role config group by name.
source code
 
move_roles(resource_root, service_name, name, role_names, cluster_name='default')
Moves roles to the specified role config group.
source code
 
move_roles_to_base_role_config_group(resource_root, service_name, role_names, cluster_name='default')
Moves roles to the base role config group.
source code
Variables [hide private]
  ROLE_CONFIG_GROUPS_PATH = '/clusters/%s/services/%s/roleConfig...
  CM_ROLE_CONFIG_GROUPS_PATH = '/cm/service/roleConfigGroups'
  __package__ = 'cm_api.endpoints'
Function Details [hide private]

create_role_config_groups(resource_root, service_name, apigroup_list, cluster_name='default')

source code 

Create role config groups.

Parameters:
  • resource_root - The root Resource object.
  • service_name - Service name.
  • apigroup_list - List of role config groups to create.
  • cluster_name - Cluster name.
Returns:
New ApiRoleConfigGroup object.

Since: API v3

create_role_config_group(resource_root, service_name, name, display_name, role_type, cluster_name='default')

source code 

Create a role config group.

Parameters:
  • resource_root - The root Resource object.
  • service_name - Service name.
  • name - The name of the new group.
  • display_name - The display name of the new group.
  • role_type - The role type of the new group.
  • cluster_name - Cluster name.
Returns:
List of created role config groups.

get_role_config_group(resource_root, service_name, name, cluster_name='default')

source code 

Find a role config group by name.

Parameters:
  • resource_root - The root Resource object.
  • service_name - Service name.
  • name - Role config group name.
  • cluster_name - Cluster name.
Returns:
An ApiRoleConfigGroup object.

get_all_role_config_groups(resource_root, service_name, cluster_name='default')

source code 

Get all role config groups in the specified service.

Parameters:
  • resource_root - The root Resource object.
  • service_name - Service name.
  • cluster_name - Cluster name.
Returns:
A list of ApiRoleConfigGroup objects.

Since: API v3

update_role_config_group(resource_root, service_name, name, apigroup, cluster_name='default')

source code 

Update a role config group by name.

Parameters:
  • resource_root - The root Resource object.
  • service_name - Service name.
  • name - Role config group name.
  • apigroup - The updated role config group.
  • cluster_name - Cluster name.
Returns:
The updated ApiRoleConfigGroup object.

Since: API v3

delete_role_config_group(resource_root, service_name, name, cluster_name='default')

source code 

Delete a role config group by name.

Parameters:
  • resource_root - The root Resource object.
  • service_name - Service name.
  • name - Role config group name.
  • cluster_name - Cluster name.
Returns:
The deleted ApiRoleConfigGroup object.

Since: API v3

move_roles(resource_root, service_name, name, role_names, cluster_name='default')

source code 

Moves roles to the specified role config group.

The roles can be moved from any role config group belonging to the same service. The role type of the destination group must match the role type of the roles.

Parameters:
  • name - The name of the group the roles will be moved to.
  • role_names - The names of the roles to move.
Returns:
List of roles which have been moved successfully.

Since: API v3

move_roles_to_base_role_config_group(resource_root, service_name, role_names, cluster_name='default')

source code 

Moves roles to the base role config group.

The roles can be moved from any role config group belonging to the same service. The role type of the roles may vary. Each role will be moved to its corresponding base group depending on its role type.

Parameters:
  • role_names - The names of the roles to move.
Returns:
List of roles which have been moved successfully.

Since: API v3


Variables Details [hide private]

ROLE_CONFIG_GROUPS_PATH

Value:
'/clusters/%s/services/%s/roleConfigGroups'