public class VMAppliance extends XenAPIObject
Modifier and Type | Class and Description |
---|---|
static class |
VMAppliance.Record
Represents all the fields in a VMAppliance
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
ref
The XenAPI reference (OpaqueRef) to this object.
|
Modifier and Type | Method and Description |
---|---|
void |
assertCanBeRecovered(Connection c,
Session sessionTo)
Assert whether all SRs required to recover this VM appliance are available.
|
Task |
assertCanBeRecoveredAsync(Connection c,
Session sessionTo)
Assert whether all SRs required to recover this VM appliance are available.
|
void |
cleanShutdown(Connection c)
Perform a clean shutdown of all the VMs in the appliance
First published in XenServer 6.0.
|
Task |
cleanShutdownAsync(Connection c)
Perform a clean shutdown of all the VMs in the appliance
First published in XenServer 6.0.
|
static VMAppliance |
create(Connection c,
VMAppliance.Record record)
Create a new VM_appliance instance, and return its handle.
|
static Task |
createAsync(Connection c,
VMAppliance.Record record)
Create a new VM_appliance instance, and return its handle.
|
void |
destroy(Connection c)
Destroy the specified VM_appliance instance.
|
Task |
destroyAsync(Connection c)
Destroy the specified VM_appliance instance.
|
boolean |
equals(java.lang.Object obj)
If obj is a VMAppliance, compares XenAPI references for equality.
|
static java.util.Set<VMAppliance> |
getAll(Connection c)
Return a list of all the VM_appliances known to the system.
|
java.util.Set<Types.VmApplianceOperation> |
getAllowedOperations(Connection c)
Get the allowed_operations field of the given VM_appliance.
|
static java.util.Map<VMAppliance,VMAppliance.Record> |
getAllRecords(Connection c)
Return a map of VM_appliance references to VM_appliance records for all VM_appliances known to the system.
|
static java.util.Set<VMAppliance> |
getByNameLabel(Connection c,
java.lang.String label)
Get all the VM_appliance instances with the given label.
|
static VMAppliance |
getByUuid(Connection c,
java.lang.String uuid)
Get a reference to the VM_appliance instance with the specified UUID.
|
java.util.Map<java.lang.String,Types.VmApplianceOperation> |
getCurrentOperations(Connection c)
Get the current_operations field of the given VM_appliance.
|
java.lang.String |
getNameDescription(Connection c)
Get the name/description field of the given VM_appliance.
|
java.lang.String |
getNameLabel(Connection c)
Get the name/label field of the given VM_appliance.
|
VMAppliance.Record |
getRecord(Connection c)
Get a record containing the current state of the given VM_appliance.
|
java.util.Set<SR> |
getSRsRequiredForRecovery(Connection c,
Session sessionTo)
Get the list of SRs required by the VM appliance to recover.
|
Task |
getSRsRequiredForRecoveryAsync(Connection c,
Session sessionTo)
Get the list of SRs required by the VM appliance to recover.
|
java.lang.String |
getUuid(Connection c)
Get the uuid field of the given VM_appliance.
|
java.util.Set<VM> |
getVMs(Connection c)
Get the VMs field of the given VM_appliance.
|
void |
hardShutdown(Connection c)
Perform a hard shutdown of all the VMs in the appliance
First published in XenServer 6.0.
|
Task |
hardShutdownAsync(Connection c)
Perform a hard shutdown of all the VMs in the appliance
First published in XenServer 6.0.
|
int |
hashCode() |
void |
recover(Connection c,
Session sessionTo,
java.lang.Boolean force)
Recover the VM appliance
First published in XenServer 6.0.
|
Task |
recoverAsync(Connection c,
Session sessionTo,
java.lang.Boolean force)
Recover the VM appliance
First published in XenServer 6.0.
|
void |
setNameDescription(Connection c,
java.lang.String description)
Set the name/description field of the given VM_appliance.
|
void |
setNameLabel(Connection c,
java.lang.String label)
Set the name/label field of the given VM_appliance.
|
void |
shutdown(Connection c)
For each VM in the appliance, try to shut it down cleanly.
|
Task |
shutdownAsync(Connection c)
For each VM in the appliance, try to shut it down cleanly.
|
void |
start(Connection c,
java.lang.Boolean paused)
Start all VMs in the appliance
First published in XenServer 6.0.
|
Task |
startAsync(Connection c,
java.lang.Boolean paused)
Start all VMs in the appliance
First published in XenServer 6.0.
|
java.lang.String |
toWireString() |
isNull
protected final java.lang.String ref
public java.lang.String toWireString()
toWireString
in class XenAPIObject
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public VMAppliance.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static VMAppliance getByUuid(Connection c, java.lang.String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onuuid
- UUID of object to returnTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static Task createAsync(Connection c, VMAppliance.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onrecord
- All constructor argumentsTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static VMAppliance create(Connection c, VMAppliance.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onrecord
- All constructor argumentsTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static java.util.Set<VMAppliance> getByNameLabel(Connection c, java.lang.String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onlabel
- label of object to returnTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Set<Types.VmApplianceOperation> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Map<java.lang.String,Types.VmApplianceOperation> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Set<VM> getVMs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public void setNameLabel(Connection c, java.lang.String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onlabel
- New value to setTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public void setNameDescription(Connection c, java.lang.String description) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made ondescription
- New value to setTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public Task startAsync(Connection c, java.lang.Boolean paused) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onpaused
- Instantiate all VMs belonging to this appliance in paused state if set to true.Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic void start(Connection c, java.lang.Boolean paused) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onpaused
- Instantiate all VMs belonging to this appliance in paused state if set to true.Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic Task cleanShutdownAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic void cleanShutdown(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic Task hardShutdownAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic void hardShutdown(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic Task shutdownAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic void shutdown(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationPartiallyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.OperationPartiallyFailed
- Some VMs belonging to the appliance threw an exception while carrying out the specified operationpublic Task assertCanBeRecoveredAsync(Connection c, Session sessionTo) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.VmRequiresSr
c
- The connection the call is made onsessionTo
- The session to which the VM appliance is to be recovered.Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.VmRequiresSr
- You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR.public void assertCanBeRecovered(Connection c, Session sessionTo) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.VmRequiresSr
c
- The connection the call is made onsessionTo
- The session to which the VM appliance is to be recovered.Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.VmRequiresSr
- You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR.public Task getSRsRequiredForRecoveryAsync(Connection c, Session sessionTo) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onsessionTo
- The session to which the list of SRs have to be recovered .Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Set<SR> getSRsRequiredForRecovery(Connection c, Session sessionTo) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onsessionTo
- The session to which the list of SRs have to be recovered .Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public Task recoverAsync(Connection c, Session sessionTo, java.lang.Boolean force) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.VmRequiresSr
c
- The connection the call is made onsessionTo
- The session to which the VM appliance is to be recovered.force
- Whether the VMs should replace newer versions of themselves.Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.VmRequiresSr
- You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR.public void recover(Connection c, Session sessionTo, java.lang.Boolean force) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.VmRequiresSr
c
- The connection the call is made onsessionTo
- The session to which the VM appliance is to be recovered.force
- Whether the VMs should replace newer versions of themselves.Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.VmRequiresSr
- You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR.public static java.util.Set<VMAppliance> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static java.util.Map<VMAppliance,VMAppliance.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.