modules.machinery.xenserver.XenServerMachinery

Package modules :: Package machinery :: Module xenserver :: Class XenServerMachinery |
[hide private]
[frames] | no frames]

# Class XenServerMachinery

source code

                               object --+
                                        |
    lib.cuckoo.common.abstracts.Machinery --+
                                            |
                                           XenServerMachinery

Virtualization layer for XenServer using the XenAPI XML-RPC interface.

Instance Methods | [hide private]
_initialize_check(self) Check XenServer configuration, initialize a Xen API connection, and verify machine validity. | source code
session(self) | source code
_make_xenapi_session(self, tid=None) | source code
_get_vm_ref(self, uuid) Get a virtual machine reference. | source code
_get_vm_record(self, ref) Get the virtual machine record. | source code
_get_vm_power_state(self, ref) Get the virtual machine power state. | source code
_check_vm(self, uuid) Check vm existence and validity. | source code
_check_snapshot(self, vm_uuid, snapshot_uuid) Check snapshot existence and that the snapshot is of the specified vm uuid. | source code
_check_disks_reset(self, vm) Check whether each attached disk is set to reset on boot. | source code
_snapshot_from_vm_uuid(self, uuid) Get the snapshot uuid from a virtual machine. | source code
_is_halted(self, vm) Checks if the virtual machine is running. | source code
start(self, label, task) Start a virtual machine. | source code
stop(self, label=None) Stop a virtual machine. | source code
_list(self) List available virtual machines. | source code
_status(self, label) Gets current status of a vm. | source code
Inherited from `lib.cuckoo.common.abstracts.Machinery`: `__init__`, `acquire`, `availables`, `dump_memory`, `initialize`, `machines`, `pcap_path`, `release`, `running`, `set_options`, `set_status`, `shutdown` Inherited from `lib.cuckoo.common.abstracts.Machinery` (private): `_get_resultserver_port`, `_initialize`, `_wait_status` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| LABEL = `"uuid"`
| RUNNING = `"Running"`
| PAUSED = `"Paused"`
| POWEROFF = `"Halted"`
| ABORTED = `"Suspended"`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### _initialize_check(self) | source code
Check XenServer configuration, initialize a Xen API connection, and verify machine validity. Raises: `CuckooMachineError` - if a misconfiguration or a unkown vm state is found. Overrides: lib.cuckoo.common.abstracts.Machinery._initialize_check

### session(self) | source code
Decorators: `@property`

### _get_vm_ref(self, uuid) | source code
Get a virtual machine reference. Parameters: `uuid` - vm uuid

### _get_vm_record(self, ref) | source code
Get the virtual machine record. Parameters: `ref` - vm reference

### _get_vm_power_state(self, ref) | source code
Get the virtual machine power state. Parameters: `ref` - vm reference

### _check_vm(self, uuid) | source code
Check vm existence and validity. Parameters: `uuid` - vm uuid

### _check_snapshot(self, vm_uuid, snapshot_uuid) | source code
Check snapshot existence and that the snapshot is of the specified vm uuid. Parameters: `vm_uuid` - vm uuid `snapshot_uuid` - snapshot uuid

### _check_disks_reset(self, vm) | source code
Check whether each attached disk is set to reset on boot. Parameters: `vm` - vm record

### _snapshot_from_vm_uuid(self, uuid) | source code
Get the snapshot uuid from a virtual machine. Parameters: `uuid` - vm uuid

### _is_halted(self, vm) | source code
Checks if the virtual machine is running. Parameters: `uuid` - vm uuid

### start(self, label, task) | source code
Start a virtual machine. Parameters: `label` - vm uuid `task` - task object. Raises: `NotImplementedError` - this method is abstract. Overrides: lib.cuckoo.common.abstracts.Machinery.start

### stop(self, label=None) | source code
Stop a virtual machine. Parameters: `label` - vm uuid Raises: `NotImplementedError` - this method is abstract. Overrides: lib.cuckoo.common.abstracts.Machinery.stop

### _list(self) | source code
List available virtual machines. Raises: `CuckooMachineError` - if unable to list virtual machines. Overrides: lib.cuckoo.common.abstracts.Machinery._list

### _status(self, label) | source code
Gets current status of a vm. Parameters: `label` - virtual machine uuid Returns: status string.