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

Functions

def add
 Adds addresses pool to available addresses pool.
def delete
 Removes specified addresses from available pool.
def get_list
def release
 Removes PublicIP addresses from their owners pool.
def revoke
 Deataches PublicIP address from the virtual machine.
def unassign
 Detaches specified PublicIP from owners VM.

Function Documentation

def src.cm.views.admin_cm.public_ip.add (   caller_id,
  start_address,
  count 
)

Adds addresses pool to available addresses pool.

Added pool starts from start_address and count is its size.

Note
The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
admin_password(POST string)
start_address(POST string) first address in pool
count(POST int) count of public addresses to add

Definition at line 56 of file public_ip.py.

def src.cm.views.admin_cm.public_ip.delete (   caller_id,
  public_ip_id_list 
)

Removes specified addresses from available pool.

Address may only be removed if not in use.

Note
The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
admin_password(POST string)
public_ip_id_list(POST list(string)) addresses to remove from available pool

Definition at line 80 of file public_ip.py.

def src.cm.views.admin_cm.public_ip.get_list (   caller_id)
Note
The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
admin_password(POST string)
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (list(dict)) PublicIP.dict property for each PublicIP lease

Definition at line 41 of file public_ip.py.

def src.cm.views.admin_cm.public_ip.release (   caller_id,
  public_ip_id_list 
)

Removes PublicIP addresses from their owners pool.

Released addresses are back available in public pool.

Note
The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
admin_password(POST string)
public_ip_id_list(POST list(int)) list of the specified ids

Definition at line 132 of file public_ip.py.

def src.cm.views.admin_cm.public_ip.revoke (   caller_id,
  public_ip_id 
)

Deataches PublicIP address from the virtual machine.

Note
The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
admin_password(POST string)
public_ip_id(int) id of the PublicIP address

Definition at line 150 of file public_ip.py.

def src.cm.views.admin_cm.public_ip.unassign (   caller_id,
  lease_id 
)

Detaches specified PublicIP from owners VM.

Unlinks PublicLease instance from its Lease instance.

Note
The cm.utils.decorators.admin_cm_log decorator performs CMAdmin authentication. It also provides handling/logging mechanism for each Exception raised in view. see also: cm.utils.decorators.admin_cm_log
Parameters
http_request(HttpRequest)
caller_id(POST int)
admin_password(POST string)
lease_id(POST int) id of the VM's lease from which IP should be detached.
Exceptions
CMException('lease_not_found')
CMException('public_lease_unassign')

Definition at line 103 of file public_ip.py.