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

Functions

def copy
 Copies selected IsoImage to User's IsoImages pool.
def delete
 Sets IsoImage state to 'locked'.
def download
 Downloads Image with given path and saves it with specified name and description.
def edit
 Updates specified IsoImage's attributes.
def get_by_id
def get_list

Detailed Description

Note
All functions here are decorated by src.cm.utils.decorators.user_log. It's recommended to read src.cm.utils.decorators.user_log docs before using functions below.
Author
Tomek Sośnicki tom.s.nosp@m.osni.nosp@m.cki@g.nosp@m.mail.nosp@m..com
Miłosz Zdybał milos.nosp@m.z.zd.nosp@m.ybal@.nosp@m.ifj..nosp@m.edu.p.nosp@m.l
Maciej Nabożny mn@mn.nosp@m.aboz.nosp@m.ny.pl

Function Documentation

def src.cm.views.admin_cm.iso_image.copy (   caller_id,
  src_image_id,
  dest_user_id 
)

Copies selected IsoImage to User's IsoImages 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)
src_image_id(POST int)
dest_user_id(POST int)

Definition at line 163 of file iso_image.py.

def src.cm.views.admin_cm.iso_image.delete (   caller_id,
  iso_image_id 
)

Sets IsoImage state to 'locked'.

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)
iso_image_id(POST) id of the IsoImage to delete
Todo:
Should delete IsoImage and set its state to 'deleted'.

Definition at line 115 of file iso_image.py.

def src.cm.views.admin_cm.iso_image.download (   caller_id,
  description,
  name,
  path,
  disk_dev,
  disk_controller 
)

Downloads Image with given path and saves it with specified name and description.

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)
description(POST string)
name(POST string)
path(POST string) HTTP or FTP path to IsoImage
disk_dev(POST)
disk_controller(POST)

Definition at line 54 of file iso_image.py.

def src.cm.views.admin_cm.iso_image.edit (   caller_id,
  iso_image_id,
  name = None,
  description = None,
  disk_controller = None 
)

Updates specified IsoImage's attributes.

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)
iso_image_id(POST string) new IsoImage name
name(POST string) new IsoImage name
description(POST string) new IsoImage description
disk_controller(POST) new IsoImage controller optional

Definition at line 134 of file iso_image.py.

def src.cm.views.admin_cm.iso_image.get_by_id (   caller_id,
  iso_image_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)
iso_image_id(POST int) id of the IsoImage to get
Returns
HttpResponse with JSON content:
  • response: response status,
  • data: (dict) IsoImage.dict property for requested IsoImage

Definition at line 101 of file iso_image.py.

def src.cm.views.admin_cm.iso_image.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)) IsoImage.dict property for each IsoImage

Definition at line 86 of file iso_image.py.