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

Module clusters

source code

Classes [hide private]
  ApiCluster
Functions [hide private]
 
create_cluster(resource_root, name, version=None, fullVersion=None)
Create a cluster
source code
 
get_cluster(resource_root, name)
Lookup a cluster by name
source code
 
get_all_clusters(resource_root, view=None)
Get all clusters
source code
 
delete_cluster(resource_root, name)
Delete a cluster by name
source code
Variables [hide private]
  CLUSTERS_PATH = '/clusters'
  __package__ = 'cm_api.endpoints'
Function Details [hide private]

create_cluster(resource_root, name, version=None, fullVersion=None)

source code 

Create a cluster

Parameters:
  • resource_root - The root Resource object.
  • name - Cluster name
  • version - Cluster CDH major version (eg: "CDH4")
    • The CDH minor version will be assumed to be the latest released version for CDH4, or 5.0 for CDH5.
  • fullVersion - Cluster's full CDH version. (eg: "5.1.1")
    • If specified, 'version' will be ignored.
    • Since: v6
Returns:
An ApiCluster object

get_cluster(resource_root, name)

source code 

Lookup a cluster by name

Parameters:
  • resource_root - The root Resource object.
  • name - Cluster name
Returns:
An ApiCluster object

get_all_clusters(resource_root, view=None)

source code 

Get all clusters

Parameters:
  • resource_root - The root Resource object.
Returns:
A list of ApiCluster objects.

delete_cluster(resource_root, name)

source code 

Delete a cluster by name

Parameters:
  • resource_root - The root Resource object.
  • name - Cluster name
Returns:
The deleted ApiCluster object