public class VMs extends CollectionDecorator<VM,VMs,VM>
VMs providing relation and functional services
to VMs
.
Constructor and Description |
---|
VMs(HttpProxyBroker proxy) |
Modifier and Type | Method and Description |
---|---|
VM |
add(VM vm)
Adds VM object.
|
VM |
add(VM vm,
String correlationId,
String expect)
Adds VM object.
|
VM |
get(UUID id)
Fetches VM object by id.
|
List<VM> |
list()
Lists VM objects.
|
List<VM> |
list(String query,
Boolean caseSensitive,
Integer max)
Lists VM objects.
|
get
public VMs(HttpProxyBroker proxy)
proxy
- HttpProxyBrokerpublic List<VM> list() throws org.apache.http.client.ClientProtocolException, ServerException, IOException
list
in class CollectionDecorator<VM,VMs,VM>
VM
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VM get(UUID id) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
get
in class CollectionDecorator<VM,VMs,VM>
id
- entity idVM
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public List<VM> list(String query, Boolean caseSensitive, Integer max) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
query
- [search query]
caseSensitive
- [true|false]
max
- [max results]
VM
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VM add(VM vm) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
vm
- VM
Overload 1: add a virtual machine to the system from scratch vm.name vm.template.id|name vm.cluster.id|name [vm.quota.id] [vm.timezone] [vm.os.boot] [vm.custom_properties.custom_property] [vm.os.type] [vm.usb.enabled] [vm.usb.type] [vm.type] [vm.os.initRd] [vm.display.monitors] [vm.display.single_qxl_pci] [vm.display.type] [vm.display.allow_override] [vm.display.smartcard_enabled] [vm.display.keyboard_layout] [vm.os.cmdline] [vm.cpu.topology.cores] [vm.memory] [vm.memory_policy.guaranteed] [vm.high_availability.priority] [vm.high_availability.enabled] [vm.domain.name] [vm.description] [vm.comment] [vm.stateless] [vm.permissions.clone] [vm.delete_protected] [vm.console.enabled] [vm.cpu.mode] [vm.cpu.topology.sockets] [vm.cpu_shares] [vm.placement_policy.affinity] [vm.placement_policy.host.id|name] [vm.origin] [vm.os.kernel] [vm.disks.clone] [vm.tunnel_migration] [vm.payloads.payload] [vm.initialization.configuration.type] [vm.initialization.configuration.data] [vm.cpu.cpu_tune.vcpu_pin] Overload 2: add a virtual machine to the system by cloning from a snapshot vm.name vm.template.id|name vm.cluster.id|name vm.snapshots.snapshot [vm.quota.id] [vm.timezone] [vm.os.boot] [vm.custom_properties.custom_property] [vm.os.type] [vm.usb.enabled] [vm.usb.type] [vm.type] [vm.os.initRd] [vm.display.monitors] [vm.display.single_qxl_pci] [vm.display.type] [vm.display.allow_override] [vm.display.smartcard_enabled] [vm.display.keyboard_layout] [vm.os.cmdline] [vm.cpu.topology.cores] [vm.cpu_shares] [vm.memory] [vm.memory_policy.guaranteed] [vm.high_availability.priority] [vm.high_availability.enabled] [vm.domain.name] [vm.description] [vm.comment] [vm.stateless] [vm.delete_protected] [vm.console.enabled] [vm.cpu.topology.sockets] [vm.placement_policy.affinity] [vm.placement_policy.host.id|name] [vm.origin] [vm.os.kernel] [vm.tunnel_migration] [vm.payloads.payload] [vm.cpu.cpu_tune.vcpu_pin] Overload 3: add a virtual machine to the system from a configuration - requires the configuration type and the configuration data vm.initialization.configuration.type vm.initialization.configuration.data [vm.name] [vm.quota.id] [vm.timezone] [vm.os.boot] [vm.custom_properties.custom_property] [vm.os.type] [vm.usb.enabled] [vm.usb.type] [vm.type] [vm.os.initRd] [vm.display.monitors] [vm.display.type] [vm.display.allow_override] [vm.display.smartcard_enabled] [vm.display.keyboard_layout] [vm.os.cmdline] [vm.cpu.topology.cores] [vm.memory] [vm.memory_policy.guaranteed] [vm.high_availability.priority] [vm.high_availability.enabled] [vm.domain.name] [vm.description] [vm.comment] [vm.stateless] [vm.permissions.clone] [vm.delete_protected] [vm.cpu.mode] [vm.cpu.topology.sockets] [vm.placement_policy.affinity] [vm.placement_policy.host.id|name] [vm.origin] [vm.os.kernel] [vm.disks.clone] [vm.tunnel_migration] [vm.payloads.payload] [vm.initialization.configuration.type] [vm.initialization.configuration.data] [vm.cpu.cpu_tune.vcpu_pin]
VM
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.public VM add(VM vm, String correlationId, String expect) throws org.apache.http.client.ClientProtocolException, ServerException, IOException
vm
- VM
Overload 1: add a virtual machine to the system from scratch vm.name vm.template.id|name vm.cluster.id|name [vm.quota.id] [vm.timezone] [vm.os.boot] [vm.custom_properties.custom_property] [vm.os.type] [vm.usb.enabled] [vm.usb.type] [vm.type] [vm.os.initRd] [vm.display.monitors] [vm.display.single_qxl_pci] [vm.display.type] [vm.display.allow_override] [vm.display.smartcard_enabled] [vm.display.keyboard_layout] [vm.os.cmdline] [vm.cpu.topology.cores] [vm.memory] [vm.memory_policy.guaranteed] [vm.high_availability.priority] [vm.high_availability.enabled] [vm.domain.name] [vm.description] [vm.comment] [vm.stateless] [vm.permissions.clone] [vm.delete_protected] [vm.console.enabled] [vm.cpu.mode] [vm.cpu.topology.sockets] [vm.cpu_shares] [vm.placement_policy.affinity] [vm.placement_policy.host.id|name] [vm.origin] [vm.os.kernel] [vm.disks.clone] [vm.tunnel_migration] [vm.payloads.payload] [vm.initialization.configuration.type] [vm.initialization.configuration.data] [vm.cpu.cpu_tune.vcpu_pin] Overload 2: add a virtual machine to the system by cloning from a snapshot vm.name vm.template.id|name vm.cluster.id|name vm.snapshots.snapshot [vm.quota.id] [vm.timezone] [vm.os.boot] [vm.custom_properties.custom_property] [vm.os.type] [vm.usb.enabled] [vm.usb.type] [vm.type] [vm.os.initRd] [vm.display.monitors] [vm.display.single_qxl_pci] [vm.display.type] [vm.display.allow_override] [vm.display.smartcard_enabled] [vm.display.keyboard_layout] [vm.os.cmdline] [vm.cpu.topology.cores] [vm.cpu_shares] [vm.memory] [vm.memory_policy.guaranteed] [vm.high_availability.priority] [vm.high_availability.enabled] [vm.domain.name] [vm.description] [vm.comment] [vm.stateless] [vm.delete_protected] [vm.console.enabled] [vm.cpu.topology.sockets] [vm.placement_policy.affinity] [vm.placement_policy.host.id|name] [vm.origin] [vm.os.kernel] [vm.tunnel_migration] [vm.payloads.payload] [vm.cpu.cpu_tune.vcpu_pin] Overload 3: add a virtual machine to the system from a configuration - requires the configuration type and the configuration data vm.initialization.configuration.type vm.initialization.configuration.data [vm.name] [vm.quota.id] [vm.timezone] [vm.os.boot] [vm.custom_properties.custom_property] [vm.os.type] [vm.usb.enabled] [vm.usb.type] [vm.type] [vm.os.initRd] [vm.display.monitors] [vm.display.type] [vm.display.allow_override] [vm.display.smartcard_enabled] [vm.display.keyboard_layout] [vm.os.cmdline] [vm.cpu.topology.cores] [vm.memory] [vm.memory_policy.guaranteed] [vm.high_availability.priority] [vm.high_availability.enabled] [vm.domain.name] [vm.description] [vm.comment] [vm.stateless] [vm.permissions.clone] [vm.delete_protected] [vm.cpu.mode] [vm.cpu.topology.sockets] [vm.placement_policy.affinity] [vm.placement_policy.host.id|name] [vm.origin] [vm.os.kernel] [vm.disks.clone] [vm.tunnel_migration] [vm.payloads.payload] [vm.initialization.configuration.type] [vm.initialization.configuration.data] [vm.cpu.cpu_tune.vcpu_pin]
correlationId
- [any string]
expect
- [201-created]
VM
org.apache.http.client.ClientProtocolException
- Signals that HTTP/S protocol error has occurred.ServerException
- Signals that an oVirt api error has occurred.IOException
- Signals that an I/O exception of some sort has occurred.Copyright ? 2010 Red Hat, Inc - released under the Apache License Version 2.0