public static class CinderVolume.ConcreteVolumeBuilder extends Object implements VolumeBuilder
Modifier and Type | Method and Description |
---|---|
VolumeBuilder |
bootable(boolean isBootable)
Enables or disables the bootable attribute.
|
Volume |
build()
Creates and return the Model Entity M
|
VolumeBuilder |
description(String description)
See
Volume.getDescription() Optional |
VolumeBuilder |
from(Volume in)
Creates a Builder using the param M as the default values
|
VolumeBuilder |
imageRef(String imageRef)
The ID of the image from which you want to create the volume.
|
VolumeBuilder |
metadata(Map<String,String> metadata)
One or more metadata key and value pairs to associate with the volume.
|
VolumeBuilder |
name(String name)
See
Volume.getName() |
VolumeBuilder |
size(int size)
The size of the volume, in GB.
|
VolumeBuilder |
snapshot(String snapshotId)
To create a volume from an existing snapshot, specify the ID of the existing volume snapshot.
|
VolumeBuilder |
source_volid(String uuid)
To create a volume from an existing volume, specify the ID of the existing volume.
|
VolumeBuilder |
volumeType(String volumeType)
The associated volume type.
|
VolumeBuilder |
zone(String zone)
The associated availability zone.
|
public VolumeBuilder name(String name)
VolumeBuilder
Volume.getName()
name
in interface VolumeBuilder
name
- the name of the volumepublic VolumeBuilder description(String description)
VolumeBuilder
Volume.getDescription()
Optionaldescription
in interface VolumeBuilder
description
- the description of the volumepublic VolumeBuilder source_volid(String uuid)
VolumeBuilder
source_volid
in interface VolumeBuilder
uuid
- the id of an existing volumepublic VolumeBuilder snapshot(String snapshotId)
VolumeBuilder
snapshot
in interface VolumeBuilder
snapshotId
- the id of an existing volume snapshotpublic VolumeBuilder imageRef(String imageRef)
VolumeBuilder
imageRef
in interface VolumeBuilder
imageRef
- the id of an existing imagepublic VolumeBuilder size(int size)
VolumeBuilder
size
in interface VolumeBuilder
size
- the size in GBpublic VolumeBuilder volumeType(String volumeType)
VolumeBuilder
volumeType
in interface VolumeBuilder
volumeType
- The associated volume type.public VolumeBuilder bootable(boolean isBootable)
VolumeBuilder
bootable
in interface VolumeBuilder
isBootable
- true to enable the bootable flagpublic VolumeBuilder metadata(Map<String,String> metadata)
VolumeBuilder
metadata
in interface VolumeBuilder
metadata
- metadata to setpublic Volume build()
Buildable.Builder
build
in interface Buildable.Builder<VolumeBuilder,Volume>
public VolumeBuilder from(Volume in)
Buildable.Builder
from
in interface Buildable.Builder<VolumeBuilder,Volume>
public VolumeBuilder zone(String zone)
VolumeBuilder
zone
in interface VolumeBuilder
zone
- The associated availability zone.Copyright © 2017. All rights reserved.