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

Functions

def add
def change_quota
 Changes quota (CPU, storage, public IPs count and points) as described by data.
def get_by_id
def get_list
 Method returns list of Users of the managed cluster.
def get_quota
 Method returns state of user's quota.
def multiple_change_quota
 Method changes quota as described by data.

Detailed Description

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

Function Documentation

def src.clm.views.admin_cm.user.add (   cm_response,
  data 
)
Note
The clm.utils.decorators.admin_cm_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
password(POST string)
cm_password(POST string)
Note
This function is decorated by clm.utils.decorators.cm_request decorator. It's fully transparent. All actual parameters of this function are kwargs (the same as required by corresponding CM view (src.cm.views.user.add()) + one additional kwarg: cm_id). View requests src.cm.views.user.add() from CM and returns the response. For documentation see src.cm.views.user.add()

Definition at line 36 of file user.py.

def src.clm.views.admin_cm.user.change_quota (   cm_response,
  data 
)

Changes quota (CPU, storage, public IPs count and points) as described by data.

Note
The clm.utils.decorators.admin_cm_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
password(POST string)
cm_password(POST string)
Note
This function is decorated by clm.utils.decorators.cm_request decorator. All actual parameters of this function are kwargs (the same as required by corresponding CM view (src.cm.views.user.change_quota()) + one additional kwarg: cm_id). View requests src.cm.views.user.change_quota() from CM. CM response is processed and finally returned. see also: src.cm.views.user.change_quota()

Definition at line 100 of file user.py.

def src.clm.views.admin_cm.user.get_by_id (   cm_id,
  caller_id,
  cm_password,
  user_id 
)
Note
The clm.utils.decorators.admin_cm_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
password(POST string)
cm_password(POST string)
user_id(POST int)
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (dict) dict property of the requested User

Definition at line 47 of file user.py.

def src.clm.views.admin_cm.user.get_list (   cm_response,
  data 
)

Method returns list of Users of the managed cluster.

Note
This function is decorated by clm.utils.decorators.cm_request decorator. All actual parameters of this function are kwargs (the same as required by corresponding CM view (src.cm.views.storage_image.get_list()) + one additional kwarg: cm_id). View requests src.cm.views.storage_image.get_list() from CM. CM response is processed and finally returned. see also: src.cm.views.storage_image.get_list()
The clm.utils.decorators.admin_cm_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
password(POST string)
cm_password(POST string)
short(POST bool) caller's CM admin password
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (list(dict)) dicts property for each requested cluster's User

Definition at line 64 of file user.py.

def src.clm.views.admin_cm.user.get_quota (   cm_response,
  data 
)

Method returns state of user's quota.

Note
The clm.utils.decorators.admin_cm_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
password(POST string)
cm_password(POST string)
Note
This function is decorated by clm.utils.decorators.cm_request decorator. It's fully transparent. All actual parameters of this function are kwargs (the same as required by corresponding CM view (src.cm.views.user.get_quota()) + one additional kwarg: cm_id). View requests src.cm.views.user.get_quota() from CM and returns the response. For documentation see src.cm.views.user.get_quota()

Definition at line 86 of file user.py.

def src.clm.views.admin_cm.user.multiple_change_quota (   cm_response,
  data 
)

Method changes quota as described by data.

Note
The clm.utils.decorators.admin_cm_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
password(POST string)
cm_password(POST string)
Note
This function is decorated by clm.utils.decorators.cm_request decorator. It's fully transparent. All actual parameters of this function are kwargs (the same as required by corresponding CM view (src.cm.views.user.multiple_change_quota()) + one additional kwarg: cm_id). View requests src.cm.views.user.multiple_change_quota() from CM and returns the response. For documentation see src.cm.views.user.multiple_change_quota()

Definition at line 113 of file user.py.