Class LVHD


public class LVHD extends XenAPIObject
LVHD SR specific operations First published in XenServer 7.0.
Author:
Cloud Software Group, Inc.
  • Field Details

    • ref

      protected final String ref
      The XenAPI reference (OpaqueRef) to this object.
  • Method Details

    • toWireString

      public String toWireString()
      Specified by:
      toWireString in class XenAPIObject
      Returns:
      The XenAPI reference (OpaqueRef) to this object.
    • equals

      public boolean equals(Object obj)
      If obj is a LVHD, compares XenAPI references for equality.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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 on
      uuid - 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 on
      host - 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 bytes
      allocationQuantum - 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 on
      host - 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 bytes
      allocationQuantum - 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.