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

Functions

def assign
 Assigns public IP to caller's VM with id vm_id.
def get_list
 Returns list of caller's public IPs.
def release
 Removes IP from callers public IP's pool and makes it available for other users to be further requested.
def request
 Sends request to grant new public IP for caller.
def unassign
 Unassigns public IP from VM with given id.

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.user.public_ip.assign (   cm_response,
  data 
)

Assigns public IP to caller's VM with id vm_id.

Note
The clm.utils.decorators.user_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.user_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
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.public_ip.assign()) + one additional kwarg: cm_id). View requests src.cm.views.user.public_ip.assign() from CM and returns the response. For documentation see src.cm.views.user.public_ip.assign()

Definition at line 65 of file public_ip.py.

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

Returns list of caller's public IPs.

Note
The clm.utils.decorators.user_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.user_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
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.public_ip.get_list()) + one additional kwarg: cm_id). View requests src.cm.views.user.public_ip.get_list() from CM and returns the response. For documentation see src.cm.views.user.public_ip.get_list()

Definition at line 38 of file public_ip.py.

def src.clm.views.user.public_ip.release (   cm_response,
  data 
)

Removes IP from callers public IP's pool and makes it available for other users to be further requested.

Caller doesn't dispose this IP any more. He'll have to send another request if he needs more IPs.

Note
The clm.utils.decorators.user_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.user_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
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.public_ip.release()) + one additional kwarg: cm_id). View requests src.cm.views.user.public_ip.release() from CM and returns the response. For documentation see src.cm.views.user.public_ip.release()

Definition at line 94 of file public_ip.py.

def src.clm.views.user.public_ip.request (   cm_response,
  data 
)

Sends request to grant new public IP for caller.

If caller's quota allowes, user will obtain new public IP.

Note
The clm.utils.decorators.user_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.user_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
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.public_ip.request()) + one additional kwarg: cm_id). View requests src.cm.views.user.public_ip.request() from CM and returns the response. For documentation see src.cm.views.user.public_ip.request()

Definition at line 52 of file public_ip.py.

def src.clm.views.user.public_ip.unassign (   cm_response,
  data 
)

Unassigns public IP from VM with given id.

Unassigned public IP may be assigned to any of his VMs.

Note
The clm.utils.decorators.user_log decorator performs User authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: clm.utils.decorators.user_log
Parameters
http_request(HttpRequest)
login(POST string)
cm_id(POST int) session cm_id
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.public_ip.unassign()) + one additional kwarg: cm_id). View requests src.cm.views.user.public_ip.unassign() from CM and returns the response. For documentation see src.cm.views.user.public_ip.unassign()

Definition at line 79 of file public_ip.py.