Package org.jclouds.ovf
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 classDisk.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Disk.Builderbuilder()intcompareTo(Disk o)booleanequals(Object obj)LonggetCapacity()The capacity of a virtual disk shall be specified by thecapacityattribute with an xs:long integer value.StringgetCapacityAllocationUnits()The optional string attributeovf:capacityAllocationUnitsmay be used to specify a particular unit of allocation.StringgetFileRef()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 itsidattribute value with thefileRefattribute value.URIgetFormat()The format URI of a non-empty virtual disk shall be specified by theformatattribute.StringgetId()Each virtual disk is represented by a Disk element that shall be given a identifier using theidattribute, the identifier shall be unique within theDiskSection.StringgetParentRef()OVF allows a disk image to be represented as a set of modified blocks in comparison to a parent image.LonggetPopulatedSize()For non-empty disks, the actual used size of the disk may optionally be specified using thepopulatedSizeattribute.inthashCode()StringtoString()
-
-
-
Method Detail
-
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 theidattribute, the identifier shall be unique within theDiskSection.
-
getCapacity
public Long getCapacity()
The capacity of a virtual disk shall be specified by thecapacityattribute 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 theparentRefattribute, 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. InDiskSection, 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 itsidattribute value with thefileRefattribute value. Omitting thefileRefattribute 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 theformatattribute.
-
getPopulatedSize
public Long getPopulatedSize()
For non-empty disks, the actual used size of the disk may optionally be specified using thepopulatedSizeattribute. The unit of this attribute is always bytes.populatedSizeis allowed to be an estimate of used disk size but shall not be larger thancapacity.
-
getCapacityAllocationUnits
public String getCapacityAllocationUnits()
The optional string attributeovf:capacityAllocationUnitsmay be used to specify a particular unit of allocation. Values forovf:capacityAllocationUnitsshall match the format for programmatic units defined in DSP0004.
-
compareTo
public int compareTo(Disk o)
- Specified by:
compareToin interfaceComparable<Disk>
-
-