Class Volume


  • public class Volume
    extends Object
    An Openstack Cinder Volume.
    • Method Detail

      • forId

        public static Volume forId​(String volumeId)
        Creates a dummy Volume when you need a Volume with just the volumeId. Several fields must be set in the returned Volume: 1. status=Status.UNRECOGNIZED 2. zone="nova" 3. created=[The Date the method was called]
      • getId

        public String getId()
        Returns:
        the id of this volume
      • getStatus

        public Volume.Status getStatus()
        Returns:
        the status of this volume
      • getSize

        public int getSize()
        Returns:
        the size in GB of this volume
      • getZone

        @Nullable
        public String getZone()
        Returns:
        the availabilityZone containing this volume
      • getCreated

        public Date getCreated()
        Returns:
        the time this volume was created
      • getAttachments

        public Set<VolumeAttachment> getAttachments()
        Returns:
        the set of attachments (to Servers)
      • getVolumeType

        @Nullable
        public String getVolumeType()
        Returns:
        the type of this volume
      • getName

        @Nullable
        public String getName()
        Returns:
        the name of this volume - as displayed in the openstack console
      • getDescription

        @Nullable
        public String getDescription()
        Returns:
        the description of this volume - as displayed in the openstack console
      • getTenantId

        @Nullable
        public String getTenantId()
        Returns:
        the tenant id of this volume
      • hashCode

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

        protected com.google.common.base.MoreObjects.ToStringHelper string()