cc1
v2.1
CC1 source code docs
|
vm Model Virtual machine class More...
Classes | |
class | Meta |
Public Member Functions | |
def | __unicode__ |
def | attach_vnc |
def | cpu_load |
def | delete |
Method releases resources taken by deleted ex VM. | |
def | detach_vnc |
def | dict |
def | is_farm |
def | is_head |
def | iso_images |
def | libvirt_template |
def | long_dict |
def | lv_destroy |
Method destroyes VM by libvirt. | |
def | lv_domain |
Connects to Libvirt and returns its domain. | |
def | network_template |
def | path |
def | release_resources |
Method releases node's resources. | |
def | remove |
def | save_image |
Method saves VM to image with VM's name, description and parameters. | |
def | set_state |
def | storage_images |
Static Public Member Functions | |
def | admin_get |
def | create |
def | destroy |
def | erase |
Remove all after-effects of the failed vm and free the resources. | |
def | get |
def | get_by_ip |
def | reset |
def | save_and_shutdown |
Public Attributes | |
iso_image | |
save_vm | |
state | |
stop_time | |
vnc_enabled |
Static Public Attributes | |
tuple | ctx_api_version = models.CharField(max_length=10, null=True, blank=True) |
tuple | ctx_key = models.CharField(max_length=128, null=True, blank=True) |
tuple | description = models.TextField(null=True, blank=True) |
tuple | farm = models.ForeignKey(Farm, related_name='vms', null=True) |
tuple | hostname = models.CharField(max_length=256, null=True, blank=True) |
tuple | iso_image = models.ForeignKey(IsoImage, null=True, blank=True) |
tuple | libvirt_id = models.IntegerField() |
tuple | name = models.CharField(max_length=128) |
tuple | node = models.ForeignKey(Node) |
tuple | novnc_port = models.IntegerField(default=0) |
tuple | reservation_id = models.IntegerField(default=0) |
tuple | save_vm = models.IntegerField() |
tuple | ssh_key = models.TextField(null=True, blank=True) |
tuple | ssh_username = models.CharField(max_length=45, null=True, blank=True) |
tuple | start_time = models.DateTimeField() |
tuple | state = models.IntegerField() |
tuple | stop_time = models.DateTimeField(null=True, blank=True) |
tuple | system_image = models.ForeignKey(SystemImage) |
tuple | template = models.ForeignKey(Template) |
tuple | user = models.ForeignKey(User) |
tuple | user_data = models.CharField(max_length=32768, null=True, blank=True) |
tuple | vnc_enabled = models.IntegerField(default=0) |
tuple | vnc_passwd = models.CharField(max_length=45) |
tuple | vnc_port = models.IntegerField() |
vm Model Virtual machine class
Virtual Machines creation and management are the main features of the CC1 system. They make use of the node's CPU (Node) to emulate physical hardware. They should be considered as remote workstations with operating system (VMImage) running on them.
VM may be created and further saved to VMImage or destroyed irrevocably.
VM may have plugged resources of several types, so that it's functionality and access to it are extended.
|
static |
|
static |
def src.cm.models.vm.VM.delete | ( | self | ) |
|
static |
def src.cm.models.vm.VM.dict | ( | self | ) |
dict
) this VM's data id
(int
)user_id
(int
)name
(string
)state
(int
) see also: src.common.states.vm_statesleases
(list(dict)
)image_name
(string
)template_name
(string
)platform
(string
)description
(string
)vnc_endpoint
(int
)vnc_enabled
(bool
)vnc_passwd
(string
)iso_images
(list(dict)
)storage_images
(list(dict)
)cpu_load
(int
)
|
static |
|
static |
def src.cm.models.vm.VM.iso_images | ( | self | ) |
def src.cm.models.vm.VM.libvirt_template | ( | self | ) |
def src.cm.models.vm.VM.long_dict | ( | self | ) |
dict
) this VM's extended data id
(int
)user_id
(int
)name
(string
)state
(int
) see also: src.common.states.command_statesleases
(list(dict)
)image_name
(string
)template_name
(string
)platform
(string
)description
(string
)vnc_endpoint
(int
)vnc_enabled
(bool
)vnc_passwd
(string
)start_time
(datetime.datetime
)node
(string
) node's addresslibvirt_id
(int
)ssh_username
(string
)ssh_key
(string
)iso_images
(list(dict)
)storage_images
(list(dict)
)cpu_load
(int
)reservation_id
(int
)user_data
(string
) def src.cm.models.vm.VM.lv_destroy | ( | self | ) |
def src.cm.models.vm.VM.lv_domain | ( | self | ) |
def src.cm.models.vm.VM.network_template | ( | self | ) |
def src.cm.models.vm.VM.path | ( | self | ) |
def src.cm.models.vm.VM.release_resources | ( | self | ) |
|
static |
def src.cm.models.vm.VM.save_image | ( | self | ) |
def src.cm.models.vm.VM.set_state | ( | self, | |
state | |||
) |
def src.cm.models.vm.VM.storage_images | ( | self | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |