cc1
v2.1
CC1 source code docs
|
Functions | |
def | convert_to_storage_image |
Changes type of the given Image. | |
def | create |
Creates dummy SystemImage for future upload. | |
def | delete |
Deletes specified SystemImage. | |
def | download |
Downloads specified SystemImage file to CM storage and makes it available in CC1 system to start VM with. | |
def | download_ec2 |
Downloads specified SystemImage to CM via EC2. | |
def | edit |
Updates attributes of the specified SystemImage. | |
def | get_by_id |
def | get_disk_controllers |
def | get_filesystems |
def | get_list |
Returns SystemImages with specified access (and from specific Group if group_id is specified). | |
def | get_network_devices |
def | get_video_devices |
def | set_group |
Method sets specified Image access type as group (belonging to specified Group) (only for sys and cd images - from private or public to group) | |
def | set_private |
Marks SystemImage as private. |
def src.cm.views.user.system_image.convert_to_storage_image | ( | caller_id, | |
system_image_id | |||
) |
Changes type of the given Image.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
system_image_id | (POST int ) ID of an Image to change type of |
Definition at line 336 of file system_image.py.
def src.cm.views.user.system_image.create | ( | caller_id, | |
name, | |||
description, | |||
size, | |||
disk_controller, | |||
network_device, | |||
platform, | |||
video_device | |||
) |
Creates dummy SystemImage for future upload.
Returns the id of the newly created SystemImage. SystemImage is only created in database, there's no physical entity representing it.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
name | (POST string ) |
description | (POST string ) |
size | (POST int ) |
disk_controller | (POST int ) |
network_device | (POST) |
platform | (POST) |
video_device | (POST) |
dict
) {'system_image_id': SystemImage.id}CMException('image_create') |
Definition at line 66 of file system_image.py.
def src.cm.views.user.system_image.delete | ( | caller_id, | |
system_image_ids | |||
) |
Deletes specified SystemImage.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
system_image_ids | (POST list(int) ) id of the SystemImage to delete |
Definition at line 218 of file system_image.py.
def src.cm.views.user.system_image.download | ( | caller_id, | |
name, | |||
description, | |||
path, | |||
disk_controller, | |||
network_device, | |||
platform, | |||
video_device | |||
) |
Downloads specified SystemImage file to CM storage and makes it available in CC1 system to start VM with.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
name | (POST string ) |
description | (POST string ) |
path | (POST string ) HTTP or FTP path to image to download |
disk_controller | (POST) |
network_device | (POST) |
platform | (POST) |
video_device | (POST) |
CMException('image_not_found') | |
CMException('image_create') |
Definition at line 139 of file system_image.py.
def src.cm.views.user.system_image.download_ec2 | ( | caller_id, | |
system_image_id, | |||
path | |||
) |
Downloads specified SystemImage to CM via EC2.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
system_image_id | (POST int ) |
path | (POST string ) HTTP or FTP path to SystemImage |
CMException('image_not_found') | |
CMException('image_create') |
Definition at line 98 of file system_image.py.
def src.cm.views.user.system_image.edit | ( | caller_id, | |
system_image_id, | |||
name = None , |
|||
description = None , |
|||
disk_controller = None , |
|||
video_device = None , |
|||
network_device = None , |
|||
platform = None |
|||
) |
Updates attributes of the specified SystemImage.
http_request | (HttpRequest ) |
caller_id | (POST int ) |
system_image_id | (POST int ) id of the SystemImage to edit |
name | (POST string ) SystemImage new name (optional) |
description | (POST string ) SystemImage new description (optional) |
disk_controller | (POST) SystemImage new controller (optional) |
video_device | (POST) SystemImage new video device (optional) |
network_device | (POST) SystemImage new network device (optional) |
platform | (POST) (optional) |
Definition at line 255 of file system_image.py.
def src.cm.views.user.system_image.get_by_id | ( | caller_id, | |
system_image_id, | |||
groups | |||
) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
groups | (POST list(int) ) list of Groups ids, required for group access |
system_image_id | (POST int ) id of the requested Image |
dict
) SystemImage.dict property of the requested SystemImage Definition at line 206 of file system_image.py.
def src.cm.views.user.system_image.get_disk_controllers | ( | caller_id | ) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
list(dict)
) id
and name
for each disk controller Definition at line 382 of file system_image.py.
def src.cm.views.user.system_image.get_filesystems | ( | caller_id | ) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
list(dict)
) common.hardware.disk_filesystems Definition at line 352 of file system_image.py.
def src.cm.views.user.system_image.get_list | ( | caller_id, | |
access, | |||
group_id = None |
|||
) |
Returns SystemImages with specified access (and from specific Group if group_id
is specified).
http_request | (HttpRequest ) |
caller_id | (POST int ) |
access | (POST) one of common.hardware.image_access |
group_id | (POST list(int) ) list of Groups ids, required for group access |
list(dict)
) list of the images from CM Definition at line 181 of file system_image.py.
def src.cm.views.user.system_image.get_network_devices | ( | caller_id | ) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
list(dict)
) common.hardware.network_devices Definition at line 372 of file system_image.py.
def src.cm.views.user.system_image.get_video_devices | ( | caller_id | ) |
http_request | (HttpRequest ) |
caller_id | (POST int ) |
list(dict)
) common.hardware.video_devices Definition at line 362 of file system_image.py.
def src.cm.views.user.system_image.set_group | ( | caller_id, | |
system_image_id, | |||
group_id | |||
) |
Method sets specified Image access type as group (belonging to specified Group) (only for sys and cd images - from private or public to group)
http_request | (HttpRequest ) |
caller_id | (POST int ) |
group_id | (POST int ) id of the Group Image should belong to |
system_image_id | (POST int ) |
None
) Definition at line 312 of file system_image.py.
def src.cm.views.user.system_image.set_private | ( | caller_id, | |
system_image_id, | |||
leader_groups | |||
) |
Marks SystemImage as private.
The caller needs to be:
http_request | (HttpRequest ) |
caller_id | (POST int ) |
system_image_id | (POST int ) id of the Image to set private |
leader_groups | (POST list(int) ) ids of the group where the caller is leader, requierd if Image's access type is group |
Definition at line 287 of file system_image.py.