Class Disk

java.lang.Object
org.jclouds.ovf.Disk
All Implemented Interfaces:
Comparable<Disk>

public class Disk extends Object implements Comparable<Disk>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Disk(String id, Long capacity, String parentRef, String fileRef, URI format, Long populatedSize, String capacityAllocationUnits)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
    boolean
     
    The capacity of a virtual disk shall be specified by the capacity attribute with an xs:long integer value.
    The optional string attribute ovf:capacityAllocationUnits may be used to specify a particular unit of allocation.
    The ovf:fileRef attribute denotes the virtual disk content by identifying an existing File element in the References element, the File element is identified by matching its id attribute value with the fileRef attribute value.
    The format URI of a non-empty virtual disk shall be specified by the format attribute.
    Each virtual disk is represented by a Disk element that shall be given a identifier using the id attribute, the identifier shall be unique within the DiskSection.
    OVF allows a disk image to be represented as a set of modified blocks in comparison to a parent image.
    For non-empty disks, the actual used size of the disk may optionally be specified using the populatedSize attribute.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • builder

      public static Disk.Builder builder()
    • getId

      public String getId()
      Each virtual disk is represented by a Disk element that shall be given a identifier using the id attribute, the identifier shall be unique within the DiskSection.
    • getCapacity

      public Long getCapacity()
      The capacity of a virtual disk shall be specified by the capacity attribute with an xs:long integer value. The default unit of allocation shall be bytes.
    • getParentRef

      public String getParentRef()
      OVF allows a disk image to be represented as a set of modified blocks in comparison to a parent image. The use of parent disks can often significantly reduce the size of an OVF package, if it contains multiple disks with similar content. For a Disk element, a parent disk may optionally be specified using the parentRef attribute, which shall contain a valid ovf:id reference to a different Disk element. If a disk block does not exist locally, lookup for that disk block then occurs in the parent disk. In DiskSection, parent Disk elements shall occur before child Disk elements that refer to them.
    • getFileRef

      public String getFileRef()
      The ovf:fileRef attribute denotes the virtual disk content by identifying an existing File element in the References element, the File element is identified by matching its id attribute value with the fileRef attribute value. Omitting the fileRef attribute shall indicate an empty disk. In this case, the disk shall be created and the entire disk content zeroed at installation time. The guest software will typically format empty disks in some file system format.
    • getFormat

      public URI getFormat()
      The format URI of a non-empty virtual disk shall be specified by the format attribute.
    • getPopulatedSize

      public Long getPopulatedSize()
      For non-empty disks, the actual used size of the disk may optionally be specified using the populatedSize attribute. The unit of this attribute is always bytes. populatedSize is allowed to be an estimate of used disk size but shall not be larger than capacity.
    • getCapacityAllocationUnits

      public String getCapacityAllocationUnits()
      The optional string attribute ovf:capacityAllocationUnits may be used to specify a particular unit of allocation. Values for ovf:capacityAllocationUnits shall match the format for programmatic units defined in DSP0004.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Disk o)
      Specified by:
      compareTo in interface Comparable<Disk>