Package com.xensource.xenapi
Class LVHD
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.LVHD
LVHD SR specific operations
First published in XenServer 7.0.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
enableThinProvisioning
(Connection c, Host host, SR SR, Long initialAllocation, Long allocationQuantum) Upgrades an LVHD SR to enable thin-provisioning.static Task
enableThinProvisioningAsync
(Connection c, Host host, SR SR, Long initialAllocation, Long allocationQuantum) Upgrades an LVHD SR to enable thin-provisioning.boolean
If obj is a LVHD, compares XenAPI references for equality.static LVHD
getByUuid
(Connection c, String uuid) Get a reference to the LVHD instance with the specified UUID.Get a record containing the current state of the given LVHD.Get the uuid field of the given LVHD.int
hashCode()
Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a LVHD, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public LVHD.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get a record containing the current state of the given LVHD. Minimum allowed role: read-only First published in XenServer 7.0.- Parameters:
c
- The connection the call is made on- Returns:
- all fields from the object
- Throws:
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.
-
getByUuid
public static LVHD getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get a reference to the LVHD instance with the specified UUID. Minimum allowed role: read-only First published in XenServer 7.0.- Parameters:
c
- The connection the call is made onuuid
- UUID of object to return- Returns:
- reference to the object
- Throws:
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.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the uuid field of the given LVHD. Minimum allowed role: read-only First published in XenServer 7.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
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.
-
enableThinProvisioningAsync
public static Task enableThinProvisioningAsync(Connection c, Host host, SR SR, Long initialAllocation, Long allocationQuantum) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Upgrades an LVHD SR to enable thin-provisioning. Future VDIs created in this SR will be thinly-provisioned, although existing VDIs will be left alone. Note that the SR must be attached to the SRmaster for upgrade to work. Minimum allowed role: pool-admin First published in XenServer 7.0.- Parameters:
c
- The connection the call is made onhost
- The LVHD Host to upgrade to being thin-provisioned.SR
- The LVHD SR to upgrade to being thin-provisioned.initialAllocation
- The initial amount of space to allocate to a newly-created VDI in bytesallocationQuantum
- The amount of space to allocate to a VDI when it needs to be enlarged in bytes- Returns:
- Task
- Throws:
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.
-
enableThinProvisioning
public static String enableThinProvisioning(Connection c, Host host, SR SR, Long initialAllocation, Long allocationQuantum) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Upgrades an LVHD SR to enable thin-provisioning. Future VDIs created in this SR will be thinly-provisioned, although existing VDIs will be left alone. Note that the SR must be attached to the SRmaster for upgrade to work. Minimum allowed role: pool-admin First published in XenServer 7.0.- Parameters:
c
- The connection the call is made onhost
- The LVHD Host to upgrade to being thin-provisioned.SR
- The LVHD SR to upgrade to being thin-provisioned.initialAllocation
- The initial amount of space to allocate to a newly-created VDI in bytesallocationQuantum
- The amount of space to allocate to a VDI when it needs to be enlarged in bytes- Returns:
- Message from LVHD.enable_thin_provisioning extension
- Throws:
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.
-