Interface VolumeBuilder
-
- All Superinterfaces:
Buildable.Builder<VolumeBuilder,Volume>
- All Known Implementing Classes:
CinderVolume.ConcreteVolumeBuilder
public interface VolumeBuilder extends Buildable.Builder<VolumeBuilder,Volume>
Builder used for Creating or Updating Volumes- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VolumeBuilderbootable(boolean isBootable)Enables or disables the bootable attribute.VolumeBuilderdescription(String description)SeeVolume.getDescription()OptionalVolumeBuilderimageRef(String imageRef)The ID of the image from which you want to create the volume.VolumeBuildermetadata(Map<String,String> metadata)One or more metadata key and value pairs to associate with the volume.VolumeBuildermultiattach(Boolean multiattach)To enable this volume to attach to more than one server OptionalVolumeBuildername(String name)SeeVolume.getName()VolumeBuildersize(int size)The size of the volume, in GB.VolumeBuildersnapshot(String snapshotId)To create a volume from an existing snapshot, specify the ID of the existing volume snapshot.VolumeBuildersource_volid(String uuid)To create a volume from an existing volume, specify the ID of the existing volume.VolumeBuildervolumeType(String volumeType)The associated volume type.VolumeBuilderzone(String zone)The associated availability zone.-
Methods inherited from interface org.openstack4j.common.Buildable.Builder
build, from
-
-
-
-
Method Detail
-
name
VolumeBuilder name(String name)
SeeVolume.getName()- Parameters:
name- the name of the volume- Returns:
- VolumeBuilder
-
description
VolumeBuilder description(String description)
SeeVolume.getDescription()Optional- Parameters:
description- the description of the volume- Returns:
- VolumeBuilder
-
source_volid
VolumeBuilder source_volid(String uuid)
To create a volume from an existing volume, specify the ID of the existing volume. Optional- Parameters:
uuid- the id of an existing volume- Returns:
- VolumeBuilder
-
snapshot
VolumeBuilder snapshot(String snapshotId)
To create a volume from an existing snapshot, specify the ID of the existing volume snapshot. Optional- Parameters:
snapshotId- the id of an existing volume snapshot- Returns:
- VolumeBuilder
-
imageRef
VolumeBuilder imageRef(String imageRef)
The ID of the image from which you want to create the volume. Required to create a bootable volume. Optional- Parameters:
imageRef- the id of an existing image- Returns:
- VolumeBuilder
-
multiattach
VolumeBuilder multiattach(Boolean multiattach)
To enable this volume to attach to more than one server Optional- Parameters:
To- enable this volume to attach to more than one server set this value to true- Returns:
- VolumeBuilder
-
size
VolumeBuilder size(int size)
The size of the volume, in GB.- Parameters:
size- the size in GB- Returns:
- VolumeBuilder
-
volumeType
VolumeBuilder volumeType(String volumeType)
The associated volume type. Optional- Parameters:
volumeType- The associated volume type.- Returns:
- VolumeBuilder
-
bootable
VolumeBuilder bootable(boolean isBootable)
Enables or disables the bootable attribute. You can boot an instance from a bootable volume. Optional- Parameters:
isBootable- true to enable the bootable flag- Returns:
- VolumeBuilder
-
metadata
VolumeBuilder metadata(Map<String,String> metadata)
One or more metadata key and value pairs to associate with the volume. Optional- Parameters:
metadata- metadata to set- Returns:
- VolumeBuilder
-
zone
VolumeBuilder zone(String zone)
The associated availability zone. Optional- Parameters:
zone- The associated availability zone.- Returns:
- VolumeBuilder
-
-