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

Class ApiRoleConfigGroup

source code

         object --+        
                  |        
types.BaseApiObject --+    
                      |    
  types.BaseApiResource --+
                          |
                         ApiRoleConfigGroup

name is RW only temporarily; once all RCG names are unique, this property will be auto-generated and Read-only


Since: API v3

Instance Methods [hide private]
 
__init__(self, resource_root, name=None, displayName=None, roleType=None, config=None)
Initializes internal state and sets all known writable properties of the object to None.
source code
 
__str__(self)
Default implementation of __str__.
source code
 
_api_version(self)
Returns the minimum API version for this resource.
source code
 
_path(self)
Returns the path to the resource.
source code
 
get_config(self, view=None)
Retrieve the group's configuration.
source code
 
update_config(self, config)
Update the group's configuration.
source code
 
get_all_roles(self)
Retrieve the roles in this role config group.
source code
 
move_roles(self, roles)
Moves roles to this role config group.
source code

Inherited from types.BaseApiObject: __setattr__, to_json_dict

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from types.BaseApiObject: from_json_dict

Inherited from types.BaseApiObject (private): _get_attributes

Static Methods [hide private]

Inherited from types.BaseApiObject: init

Class Variables [hide private]
  _ATTRIBUTES = {'name': None, 'displayName': None, 'roleType': ...

Inherited from types.BaseApiObject (private): _WHITELIST

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, resource_root, name=None, displayName=None, roleType=None, config=None)
(Constructor)

source code 

Initializes internal state and sets all known writable properties of the object to None. Then initializes the properties given in the provided attributes dictionary.

Parameters:
  • resource_root - API resource object.
  • attrs - optional dictionary of attributes to set. This should only contain r/w attributes.
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

Default implementation of __str__. Uses the type name and the first attribute retrieved from the attribute map to create the string.

Overrides: object.__str__
(inherited documentation)

_api_version(self)

source code 

Returns the minimum API version for this resource. Defaults to 1.

Overrides: types.BaseApiResource._api_version
(inherited documentation)

_path(self)

source code 

Returns the path to the resource.

e.g., for a service 'foo' in cluster 'bar', this should return '/clusters/bar/services/foo'.

Overrides: types.BaseApiResource._path
(inherited documentation)

get_config(self, view=None)

source code 

Retrieve the group's configuration.

The 'summary' view contains strings as the dictionary values. The full view contains ApiConfig instances as the values.

Parameters:
  • view - View to materialize ('full' or 'summary').
Returns:
Dictionary with configuration data.

update_config(self, config)

source code 

Update the group's configuration.

Parameters:
  • config - Dictionary with configuration to update.
Returns:
Dictionary with updated configuration.

get_all_roles(self)

source code 

Retrieve the roles in this role config group.

Returns:
List of roles in this role config group.

move_roles(self, roles)

source code 

Moves roles to this 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:
  • roles - The names of the roles to move.
Returns:
List of roles which have been moved successfully.

Class Variable Details [hide private]

_ATTRIBUTES

Value:
{'name': None, 'displayName': None, 'roleType': None, 'config': Attr(A\
piConfig), 'base': ROAttr(), 'serviceRef': ROAttr(ApiServiceRef),}