Package cm_api :: Package endpoints :: Module cms :: Class ClouderaManager
[hide private]
[frames] | no frames]

Class ClouderaManager

source code

         object --+    
                  |    
types.BaseApiObject --+
                      |
                     ClouderaManager

The Cloudera Manager instance.

Provides access to CM configuration and services.

Instance Methods [hide private]
 
__init__(self, resource_root)
Initializes internal state and sets all known writable properties of the object to None.
source code
 
_cmd(self, command, data=None)
Invokes a global command.
source code
 
get_commands(self, view=None)
Retrieve a list of running global commands.
source code
 
create_mgmt_service(self, service_setup_info)
Setup the Cloudera Management Service.
source code
 
get_service(self)
Return the Cloudera Management Services instance.
source code
 
get_license(self)
Return information about the currently installed license.
source code
 
update_license(self, license_text)
Install or update the Cloudera Manager license.
source code
 
get_config(self, view=None)
Retrieve the Cloudera Manager configuration.
source code
 
update_config(self, config)
Update the CM configuration.
source code
 
generate_credentials(self)
Generate credentials for services configured with Kerberos.
source code
 
inspect_hosts(self)
Runs the host inspector on the configured hosts.
source code
 
collect_diagnostic_data(self, start_datetime, end_datetime, includeInfoLog=False)
This method is deprecated as of CM 4.5.
source code
 
collect_diagnostic_data_45(self, end_datetime, bundle_size_bytes)
Issue the command to collect diagnostic data.
source code
 
hosts_decommission(self, host_names)
Decommission the specified hosts by decommissioning the slave roles and stopping the remaining ones.
source code
 
hosts_recommission(self, host_names)
Recommission the specified hosts by recommissioning the slave roles.
source code
 
hosts_start_roles(self, host_names)
Start all the roles on the specified hosts.
source code
 
create_peer(self, name, url, username, password)
Create a new peer for replication.
source code
 
delete_peer(self, name)
Delete a replication peer.
source code
 
update_peer(self, current_name, new_name, new_url, username, password)
Update a replication peer.
source code
 
get_peers(self)
Retrieve a list of replication peers.
source code
 
get_peer(self, name)
Retrieve a replication peer by name.
source code
 
test_peer_connectivity(self, name)
Test connectivity for a replication peer.
source code
 
get_all_hosts_config(self, view=None)
Retrieve the default configuration for all hosts.
source code
 
update_all_hosts_config(self, config)
Update the default configuration for all hosts.
source code

Inherited from types.BaseApiObject: __setattr__, __str__, 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]

Inherited from types.BaseApiObject (private): _ATTRIBUTES, _WHITELIST

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, resource_root)
(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)

_cmd(self, command, data=None)

source code 

Invokes a global command.

Parameters:
  • command - Command name.
  • data - Optional data to send to the command. @return Information about the submitted command.

get_commands(self, view=None)

source code 

Retrieve a list of running global commands.

Parameters:
  • view - View to materialize ('full' or 'summary')
Returns:
A list of running commands.

create_mgmt_service(self, service_setup_info)

source code 

Setup the Cloudera Management Service.

Parameters:
  • service_setup_info - ApiServiceSetupInfo object.
Returns:
The management service instance.

get_service(self)

source code 

Return the Cloudera Management Services instance.

Returns:
An ApiService instance.

get_license(self)

source code 

Return information about the currently installed license.

Returns:
License information.

update_license(self, license_text)

source code 

Install or update the Cloudera Manager license.

Parameters:
  • license_text - the license in text form

get_config(self, view=None)

source code 

Retrieve the Cloudera Manager 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 CM configuration.

Returns:
Dictionary with updated configuration.

generate_credentials(self)

source code 

Generate credentials for services configured with Kerberos.

Returns:
Information about the submitted command.

inspect_hosts(self)

source code 

Runs the host inspector on the configured hosts.

Returns:
Information about the submitted command.

collect_diagnostic_data(self, start_datetime, end_datetime, includeInfoLog=False)

source code 

This method is deprecated as of CM 4.5. You should use collect_diagnostic_data_45. Issue the command to collect diagnostic data.

Parameters:
  • start_datetime - The start of the collection period. Type datetime.
  • end_datetime - The end of the collection period. Type datetime.
  • includeInfoLog - Whether to include INFO level log messages.

collect_diagnostic_data_45(self, end_datetime, bundle_size_bytes)

source code 

Issue the command to collect diagnostic data.

Parameters:
  • end_datetime - The end of the collection period. Type datetime.
  • bundle_size_bytes - The target size for the support bundle in bytes

hosts_decommission(self, host_names)

source code 

Decommission the specified hosts by decommissioning the slave roles and stopping the remaining ones.

Parameters:
  • host_names - List of names of hosts to be decommissioned.
Returns:
Information about the submitted command.

Since: API v2

hosts_recommission(self, host_names)

source code 

Recommission the specified hosts by recommissioning the slave roles. This command doesn't start the roles. Use hosts_start_roles for that.

Parameters:
  • host_names - List of names of hosts to be recommissioned.
Returns:
Information about the submitted command.

Since: API v2

hosts_start_roles(self, host_names)

source code 

Start all the roles on the specified hosts.

Parameters:
  • host_names - List of names of hosts on which to start all roles.
Returns:
Information about the submitted command.

Since: API v2

create_peer(self, name, url, username, password)

source code 

Create a new peer for replication.

Parameters:
  • name - The name of the peer.
  • url - The url of the peer.
  • username - The admin username to use to setup the remote side of the peer connection.
  • password - The password of the admin user.
Returns:
The newly created peer.

Since: API v3

delete_peer(self, name)

source code 

Delete a replication peer.

Parameters:
  • name - The name of the peer.
Returns:
The deleted peer.

Since: API v3

update_peer(self, current_name, new_name, new_url, username, password)

source code 

Update a replication peer.

Parameters:
  • current_name - The name of the peer to updated.
  • new_name - The new name for the peer.
  • new_url - The new url for the peer.
  • username - The admin username to use to setup the remote side of the peer connection.
  • password - The password of the admin user.
Returns:
The updated peer.

Since: API v3

get_peers(self)

source code 

Retrieve a list of replication peers.

Returns:
A list of replication peers.

Since: API v3

get_peer(self, name)

source code 

Retrieve a replication peer by name.

Parameters:
  • name - The name of the peer.
Returns:
The peer.

Since: API v3

test_peer_connectivity(self, name)

source code 

Test connectivity for a replication peer.

Parameters:
  • name - The name of the peer to test.
Returns:
The command representing the test.

Since: API v3

get_all_hosts_config(self, view=None)

source code 

Retrieve the default configuration for all hosts.

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

update_all_hosts_config(self, config)

source code 

Update the default configuration for all hosts.

Returns:
Dictionary with updated configuration.