cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.clm.views.admin_clm.cluster Namespace Reference

Functions

def add
 Adds new Cluster and makes the caller its admin.
def delete
 Deletes specified Cluster from CLM database.
def edit
 Updates Cluster's attributes.
def get_by_id
 Requests specified Cluster's details.
def get_list
 Requests list of Clusters.
def lock
 Locks specified Cluster.
def unlock
 Unlocks specified Cluster.

Detailed Description

Note
All functions here are decorated by src.clm.utils.decorators.admin_clm_log. It's recommended to read src.clm.utils.decorators.admin_clm_log docs before using functions below.

Function Documentation

def src.clm.views.admin_clm.cluster.add (   cm_id,
  caller_id,
  name,
  address,
  port,
  new_password 
)

Adds new Cluster and makes the caller its admin.

There should dedicated and configured CM server exist.

Note
The clm.utils.decorators.admin_clm_log decorator performs CLMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_clm_log
Parameters
http_request(HttpRequest)
cm_id(POST int) session cm_id
login(POST string)
admin_password(POST string)
name(POST) human-friendly name of the new CM (shown in Web Interface)
address(POST) address of the new CM
port(POST string) port on which CM is configured to be running
new_password(POST) password protecting the new CM

Definition at line 48 of file cluster.py.

def src.clm.views.admin_clm.cluster.delete (   cm_id,
  caller_id,
  cluster_id 
)

Deletes specified Cluster from CLM database.

Now no VMs can be run on that Cluster. It's not available for CLM anymore. To bring it back to Cloud resources one needs to add this Cluster once again ground up. Machine hosting CM deleted with this function keeps its configuration.

Note
The clm.utils.decorators.admin_clm_log decorator performs CLMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_clm_log
Parameters
http_request(HttpRequest)
cm_id(POST int) session cm_id
login(POST string)
admin_password(POST string)
cluster_id(POST int) id of the CM to delete

Definition at line 118 of file cluster.py.

def src.clm.views.admin_clm.cluster.edit (   cm_id,
  caller_id,
  cluster_id,
  name = None,
  address = None,
  port = None 
)

Updates Cluster's attributes.

Note
The clm.utils.decorators.admin_clm_log decorator performs CLMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_clm_log
Parameters
http_request(HttpRequest)
cm_id(POST int) session cm_id
login(POST string)
admin_password(POST string)
cluster_id(POST int) id of the CM to edit
name(POST string) new name for edited CM
address(POST string) new adress of the edited CM
port(POST int) new port on which edited CM is to be running

Definition at line 137 of file cluster.py.

def src.clm.views.admin_clm.cluster.get_by_id (   cm_id,
  caller_id,
  cluster_id 
)

Requests specified Cluster's details.

Note
The clm.utils.decorators.admin_clm_log decorator performs CLMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_clm_log
Parameters
http_request(HttpRequest)
cm_id(POST int) session cm_id
login(POST string)
admin_password(POST string)
cluster_id(POST int) id of the requested Cluster
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (dict) Cluster.dict property of requested Cluster

Definition at line 217 of file cluster.py.

def src.clm.views.admin_clm.cluster.get_list (   cm_id,
  caller_id 
)

Requests list of Clusters.

Note
The clm.utils.decorators.admin_clm_log decorator performs CLMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_clm_log
Parameters
http_request(HttpRequest)
cm_id(POST int) session cm_id
login(POST string)
admin_password(POST string)
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (list(dict)) Cluster.dict property of each registered Cluster

Definition at line 229 of file cluster.py.

def src.clm.views.admin_clm.cluster.lock (   cm_id,
  caller_id,
  cluster_id 
)

Locks specified Cluster.

Since called, no VMs can be run on that Cluster, until unlock() is called.

Note
The clm.utils.decorators.admin_clm_log decorator performs CLMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_clm_log
Parameters
http_request(HttpRequest)
cm_id(POST int) session cm_id
login(POST string)
admin_password(POST string)
cluster_id(POST int) id of the CM to lock

Definition at line 160 of file cluster.py.

def src.clm.views.admin_clm.cluster.unlock (   cm_id,
  caller_id,
  cluster_id 
)

Unlocks specified Cluster.

Now VMs can be run on that Cluster.

Note
The clm.utils.decorators.admin_clm_log decorator performs CLMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_clm_log
Parameters
http_request(HttpRequest)
cm_id(POST int) session cm_id
login(POST string)
admin_password(POST string)
cluster_id(POST int) id of the CM to unlock

Definition at line 178 of file cluster.py.