cc1
v2.1
CC1 source code docs
|
Functions | |
def | attach |
Attaches selected StorageImage to specified VM. | |
def | convert_to_system_image |
Converts StorageImage to SystemImage so that it may be selected as os container when creating new VM. | |
def | create |
Creates new StorageImage. | |
def | delete |
Deletes given StorageImage from CM storage space. | |
def | detach |
Detaches specified StorageImage from specified VM. | |
def | download |
Downloads specified StorageImage. | |
def | edit |
Sets Image's new attributes. | |
def | get_by_id |
def | get_disk_controllers |
def | get_filesystems |
def | get_list |
Returns StorageImages. |
def src.cm.views.user.storage_image.attach | ( | caller_id, | |
storage_image_id, | |||
vm_id | |||
) |
Attaches selected StorageImage to specified VM.
Such a disk may be mounted to VM so that data generated by VM could be stored on it. VM also has access to data already stored on that attached StorageImage.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
storage_image_id | (POST int ) id of a StorageImage block device - Disk Volume Image |
vm_id | (POST int ) id of the VM which StorageImage should be attached to |
Definition at line 220 of file storage_image.py.
def src.cm.views.user.storage_image.convert_to_system_image | ( | caller_id, | |
storage_image_id, | |||
platform, | |||
disk_controller, | |||
network_device, | |||
video_device | |||
) |
Converts StorageImage to SystemImage so that it may be selected as os container when creating new VM.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
storage_image_id | (POST int ) |
platform | (POST) |
disk_controller | (POST) |
network_device | (POST) |
video_device | (POST) |
Definition at line 270 of file storage_image.py.
def src.cm.views.user.storage_image.create | ( | caller_id, | |
name, | |||
description, | |||
filesystem, | |||
size, | |||
disk_controller | |||
) |
Creates new StorageImage.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
name | (POST string ) |
description | (POST string ) |
filesystem | (POST int ) id of the filesystem. Supported filesystems are common.hardware.disk_filesystems |
size | (POST int ) size of the SystemImage to create [MB] |
disk_controller | (POST) |
dict
) StorageImage.dict property of newly created StorageImage Definition at line 59 of file storage_image.py.
def src.cm.views.user.storage_image.delete | ( | caller_id, | |
storage_image_ids | |||
) |
Deletes given StorageImage from CM storage space.
Such an StorageImage can in no way be restored. It's also deleted from database.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
storage_image_ids | (POST list(int) ) id of the StorageImage to delete |
Definition at line 158 of file storage_image.py.
def src.cm.views.user.storage_image.detach | ( | caller_id, | |
storage_image_id, | |||
vm_id | |||
) |
Detaches specified StorageImage from specified VM.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
vm_id | (POST int ) id of the VM StorageImage should be detached from |
storage_image_id | (POST int ) id of the StorageImage to detach |
Definition at line 245 of file storage_image.py.
def src.cm.views.user.storage_image.download | ( | caller_id, | |
name, | |||
description, | |||
path, | |||
disk_controller | |||
) |
Downloads specified StorageImage.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
name | (POST string ) |
description | (POST string ) |
path | (POST string ) HTTP or FTP path to StorageImage to download |
disk_controller | (POST) |
Definition at line 89 of file storage_image.py.
def src.cm.views.user.storage_image.edit | ( | caller_id, | |
storage_image_id, | |||
name = None , |
|||
description = None , |
|||
disk_controller = None |
|||
) |
Sets Image's new attributes.
Those should be get by src.cm.manager.image.get_by_id().
http_request | (HttpRequest ) |
caller_id | (POST int ) |
storage_image_id | (POST int ) id of the Image to edit |
name | (POST string ) new Image name |
description | (POST string ) new Image description |
disk_controller | (POST) new Image controller optional |
Definition at line 192 of file storage_image.py.
def src.cm.views.user.storage_image.get_by_id | ( | caller_id, | |
storage_image_id | |||
) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
storage_image_id | (POST int ) id of the requested StorageImage |
dict
) StorageImage.dict property of the requested StorageImage Definition at line 145 of file storage_image.py.
def src.cm.views.user.storage_image.get_disk_controllers | ( | caller_id | ) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
list(dict)
) keys: id
, name
, live_attach
Definition at line 300 of file storage_image.py.
def src.cm.views.user.storage_image.get_filesystems | ( | caller_id | ) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
list(dict)
) common.hardware.disk_filesystems Definition at line 290 of file storage_image.py.
def src.cm.views.user.storage_image.get_list | ( | caller_id | ) |
Returns StorageImages.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
list(dict)
) StorageImage.dict property of each unlocked caller's StorageImage Definition at line 131 of file storage_image.py.