cc1
v2.1
CC1 source code docs
|
Functions | |
def | add |
Adds new Node to this Cluster. | |
def | check |
Tries to restart cc1-node service on each specified Node. | |
def | configure |
def | delete |
Deletes specified Node from database provided the Node does not host any VM's. | |
def | edit |
Updates Node attributes according to data provided in node_info. | |
def | get_by_id |
Returns details of the requested Node. | |
def | get_by_id_details |
Returns more details of the requested Node. | |
def | get_list |
def | install |
def | lock |
Sets specified Node's state as locked. | |
def | unlock |
Unlocks specified Node. |
def src.cm.views.admin_cm.node.add | ( | caller_id, | |
address, | |||
username, | |||
transport, | |||
driver, | |||
suffix, | |||
cpu, | |||
memory, | |||
disk | |||
) |
Adds new Node to this Cluster.
Node must be a machine preconfigured to be CC1 node.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
username | (POST string ) Node's operating system username for transport. Should be cc1. |
address | (POST string ) added Node IP adress or domain name |
transport | (POST string ) unix, ssh, tls or other available transport name for hypervisor |
suffix | (POST string ) optional suffix for transport (i.e. /system for KVM) |
driver | (POST string ) hypervisior name (XEN, KVM or other, KVM is recommended) |
cpu | (POST int ) |
memory | (POST int ) |
disk | (POST int ) |
def src.cm.views.admin_cm.node.check | ( | caller_id, | |
node_id_list | |||
) |
Tries to restart cc1-node service on each specified Node.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id_list | (POST list(int) ) |
def src.cm.views.admin_cm.node.configure | ( | caller_id, | |
node_id, | |||
interfaces | |||
) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id | (POST int ) node id |
interfaces | (POST string list) list of interfaces, which node should use to communicate with other nodes and cm. |
def src.cm.views.admin_cm.node.delete | ( | caller_id, | |
node_id | |||
) |
Deletes specified Node from database provided the Node does not host any VM's.
Node's operating system setup isn't affected. To bring deleted Node back available for CC1 Cluster, one has to add it once again via Web Interface.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id | (POST int ) id of the Node to delete |
CMException('node_has_vms') | |
CMException('node_delete') |
def src.cm.views.admin_cm.node.edit | ( | caller_id, | |
node_id, | |||
node_info | |||
) |
Updates Node attributes according to data provided in node_info.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id | (POST int ) id of the Node to edit |
node_info | (POST string ) dictionary where cm.models.Node model's fields are the keys and values are values to set |
CMException('node_edit') |
def src.cm.views.admin_cm.node.get_by_id | ( | caller_id, | |
node_id | |||
) |
Returns details of the requested Node.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id | (POST int ) id of the requested Node |
dict
) Node.long_dict property of the requested Node def src.cm.views.admin_cm.node.get_by_id_details | ( | caller_id, | |
node_id | |||
) |
Returns more details of the requested Node.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id | (POST int ) id of the requested Node |
dict
) Node.long_long_dict property of the requested Node def src.cm.views.admin_cm.node.get_list | ( | caller_id | ) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
list(dict)
) Node.dict property for each Node added to current CM def src.cm.views.admin_cm.node.install | ( | caller_id, | |
node_id, | |||
distribution | |||
) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id | (POST int ) id of the Node where cc1-node should be deployed |
distribution | (POST string ) OS distribution name, e.g. Debian |
def src.cm.views.admin_cm.node.lock | ( | caller_id, | |
node_id_list | |||
) |
Sets specified Node's state as locked.
No VMs can be run on locked Node.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id_list | (POST int ) list of the specified Nodes ids |
None
)CMException('node_lock') |
def src.cm.views.admin_cm.node.unlock | ( | caller_id, | |
node_id_list | |||
) |
Unlocks specified Node.
After unlock Node's state is ok and Users are able to run VMs on that Node.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
admin_password | (POST string ) |
node_id_list | (POST int ) list of the specified Nodes ids |
None
)CMException('node_unlock') |