Class NovaBlockDeviceMappingCreate.NovaBlockDeviceMappingBuilder
- java.lang.Object
-
- org.openstack4j.openstack.compute.domain.NovaBlockDeviceMappingCreate.NovaBlockDeviceMappingBuilder
-
- All Implemented Interfaces:
Buildable.Builder<BlockDeviceMappingBuilder,BlockDeviceMappingCreate>,BlockDeviceMappingBuilder
- Enclosing class:
- NovaBlockDeviceMappingCreate
public static class NovaBlockDeviceMappingCreate.NovaBlockDeviceMappingBuilder extends Object implements BlockDeviceMappingBuilder
-
-
Constructor Summary
Constructors Constructor Description NovaBlockDeviceMappingBuilder(NovaBlockDeviceMappingCreate create)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockDeviceMappingBuilderbootIndex(int i)Set device boot index.BlockDeviceMappingCreatebuild()Creates and return the Model Entity MBlockDeviceMappingBuilderdeleteOnTermination(boolean deleteOnTermination)Delete the volume at termination.BlockDeviceMappingBuilderdestinationType(BDMDestType type)Defines where the volume comes from.BlockDeviceMappingBuilderdeviceName(String deviceName)A device name where the volume is attached in the system at /dev/dev_name.BlockDeviceMappingBuilderdeviceType(String deviceType)Used to set the device_type, low level detail that some hypervisors (currently only libvirt) may support.BlockDeviceMappingBuilderdiskBus(String diskBus)Used to set the disk_bus, low level detail that some hypervisors (currently only libvirt) may support.BlockDeviceMappingBuilderfrom(BlockDeviceMappingCreate in)Creates a Builder using the param M as the default valuesBlockDeviceMappingBuildersnapshotId(String snapshotId)Set to create a volume from a snapshot id.BlockDeviceMappingBuildersourceType(BDMSourceType type)The source type of the volume.BlockDeviceMappingBuilderuuid(String id)The device ID.BlockDeviceMappingBuildervolumeId(String volumeId)Set to create a volume from a volume id.BlockDeviceMappingBuildervolumeSize(Integer volumeSize)Used to set the volume size of the destination volume (typically needed when source type is image).BlockDeviceMappingBuildervolumeType(String volumeType)This can be used to specify the type of volume which the compute service will create and attach to the server.
-
-
-
Constructor Detail
-
NovaBlockDeviceMappingBuilder
public NovaBlockDeviceMappingBuilder(NovaBlockDeviceMappingCreate create)
-
-
Method Detail
-
deviceName
public BlockDeviceMappingBuilder deviceName(String deviceName)
Description copied from interface:BlockDeviceMappingBuilderA device name where the volume is attached in the system at /dev/dev_name. This value is typically vda.- Specified by:
deviceNamein interfaceBlockDeviceMappingBuilder- Parameters:
deviceName- the device name- Returns:
- BlockDeviceMappingBuilder
-
uuid
public BlockDeviceMappingBuilder uuid(String id)
Description copied from interface:BlockDeviceMappingBuilderThe device ID.- Specified by:
uuidin interfaceBlockDeviceMappingBuilder- Parameters:
id- the device id- Returns:
- BlockDeviceMappingBuilder
-
bootIndex
public BlockDeviceMappingBuilder bootIndex(int i)
Description copied from interface:BlockDeviceMappingBuilderSet device boot index.- Specified by:
bootIndexin interfaceBlockDeviceMappingBuilder- Parameters:
i- The boot index.- Returns:
- BlockDeviceMappingBuilder
-
sourceType
public BlockDeviceMappingBuilder sourceType(BDMSourceType type)
Description copied from interface:BlockDeviceMappingBuilderThe source type of the volume.- Specified by:
sourceTypein interfaceBlockDeviceMappingBuilder- Parameters:
type- the source type- Returns:
- BlockDeviceMappingBuilder
-
destinationType
public BlockDeviceMappingBuilder destinationType(BDMDestType type)
Description copied from interface:BlockDeviceMappingBuilderDefines where the volume comes from.- Specified by:
destinationTypein interfaceBlockDeviceMappingBuilder- Parameters:
type- the destination type- Returns:
- BlockDeviceMappingBuilder
-
deleteOnTermination
public BlockDeviceMappingBuilder deleteOnTermination(boolean deleteOnTermination)
Description copied from interface:BlockDeviceMappingBuilderDelete the volume at termination.- Specified by:
deleteOnTerminationin interfaceBlockDeviceMappingBuilder- Parameters:
deleteOnTermination- Set to True to delete the volume when the instance is deleted. Set to False to retain the volume when the instance is deleted.- Returns:
- BlockDeviceMappingBuilder
-
snapshotId
public BlockDeviceMappingBuilder snapshotId(String snapshotId)
Description copied from interface:BlockDeviceMappingBuilderSet to create a volume from a snapshot id.- Specified by:
snapshotIdin interfaceBlockDeviceMappingBuilder- Returns:
- BlockDeviceMappingBuilder
-
volumeId
public BlockDeviceMappingBuilder volumeId(String volumeId)
Description copied from interface:BlockDeviceMappingBuilderSet to create a volume from a volume id.- Specified by:
volumeIdin interfaceBlockDeviceMappingBuilder- Returns:
- BlockDeviceMappingBuilder
-
volumeSize
public BlockDeviceMappingBuilder volumeSize(Integer volumeSize)
Description copied from interface:BlockDeviceMappingBuilderUsed to set the volume size of the destination volume (typically needed when source type is image).- Specified by:
volumeSizein interfaceBlockDeviceMappingBuilder- Parameters:
volumeSize- the size of the volume in Gigabytes.- Returns:
- BlockDeviceMappingBuilder
-
diskBus
public BlockDeviceMappingBuilder diskBus(String diskBus)
Description copied from interface:BlockDeviceMappingBuilderUsed to set the disk_bus, low level detail that some hypervisors (currently only libvirt) may support.- Specified by:
diskBusin interfaceBlockDeviceMappingBuilder- Parameters:
diskBus- type, e.g ide, usb, virtio, scsi- Returns:
- BlockDeviceMappingBuilder
-
deviceType
public BlockDeviceMappingBuilder deviceType(String deviceType)
Description copied from interface:BlockDeviceMappingBuilderUsed to set the device_type, low level detail that some hypervisors (currently only libvirt) may support.- Specified by:
deviceTypein interfaceBlockDeviceMappingBuilder- Parameters:
deviceType- , disk, cdrom, floppy, lun- Returns:
- BlockDeviceMappingBuilder
-
volumeType
public BlockDeviceMappingBuilder volumeType(String volumeType)
Description copied from interface:BlockDeviceMappingBuilderThis can be used to specify the type of volume which the compute service will create and attach to the server.- Specified by:
volumeTypein interfaceBlockDeviceMappingBuilder- Parameters:
volumeType- The device volume_type.- Returns:
- BlockDeviceMappingBuilder
-
build
public BlockDeviceMappingCreate build()
Description copied from interface:Buildable.BuilderCreates and return the Model Entity M- Specified by:
buildin interfaceBuildable.Builder<BlockDeviceMappingBuilder,BlockDeviceMappingCreate>- Returns:
- M instance
-
from
public BlockDeviceMappingBuilder from(BlockDeviceMappingCreate in)
Description copied from interface:Buildable.BuilderCreates a Builder using the param M as the default values- Specified by:
fromin interfaceBuildable.Builder<BlockDeviceMappingBuilder,BlockDeviceMappingCreate>- Returns:
- Builder
-
-