public class BlockVolumeServiceImpl extends BaseBlockStorageServices implements BlockVolumeService
BaseOpenStackService.Invocation<R>
Constructor and Description |
---|
BlockVolumeServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Volume |
create(Volume volume)
Creates a new Block Storage Volume
|
VolumeType |
createVolumeType(VolumeType volumeType)
Creates a new volume type with the specified name
|
ActionResponse |
delete(String volumeId)
Deletes the specified volume
|
void |
deleteVolumeType(String volumeTypeId)
Deletes the specified VolumeType
|
ActionResponse |
extend(String volumeId,
Integer newSize)
Extends the specified volume size.
|
ActionResponse |
forceDelete(String volumeId)
Attempt forced removal of volume, regardless of the state.
|
Volume |
get(String volumeId)
Gets a Block Storage volume by ID
|
List<? extends Volume> |
list()
Lists summary information for all Block Storage volumes that the tenant who submits the request can access.
|
List<? extends Volume> |
list(Map<String,String> filteringParams)
Returns list of Block Storage volumes filtered by parameters.
|
List<? extends VolumeType> |
listVolumeTypes()
The volume type defines the characteristics of a volume
|
ActionResponse |
migrate(String volumeId,
String hostService,
boolean forceHostCopy)
migrate a volume to another host and service
|
ActionResponse |
readOnlyModeUpdate(String volumeId,
boolean readonly)
Updates volume read-only access-mode flag
|
ActionResponse |
resetState(String volumeId,
Volume.Status status)
Resets the specified volume status.
|
BlockVolumeTransferService |
transfer()
Returns the API used to transfer a Volume from one tenant/project to another
|
ActionResponse |
update(String volumeId,
String name,
String description)
OpenStack only allows name or description to be updated.
|
VolumeUploadImage |
uploadToImage(String volumeId,
UploadImageData data)
Uploads a volume to the image service
|
delete, deleteWithResponse, get, getProvider, getServiceVersion, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, request, toList, uri
public List<? extends VolumeType> listVolumeTypes()
listVolumeTypes
in interface BlockVolumeService
public List<? extends Volume> list()
list
in interface BlockVolumeService
public List<? extends Volume> list(Map<String,String> filteringParams)
list
in interface BlockVolumeService
filteringParams
- map (name, value) of filtering parameterspublic Volume get(String volumeId)
get
in interface BlockVolumeService
volumeId
- the volume identifierpublic ActionResponse delete(String volumeId)
delete
in interface BlockVolumeService
volumeId
- the volume identifierpublic ActionResponse forceDelete(String volumeId)
forceDelete
in interface BlockVolumeService
volumeId
- the volume idpublic ActionResponse resetState(String volumeId, Volume.Status status)
resetState
in interface BlockVolumeService
volumeId
- the volume idstatus
- new volume statuspublic ActionResponse extend(String volumeId, Integer newSize)
extend
in interface BlockVolumeService
volumeId
- the volume idnewSize
- new volume sizepublic Volume create(Volume volume)
create
in interface BlockVolumeService
volume
- the volume for createpublic ActionResponse update(String volumeId, String name, String description)
update
in interface BlockVolumeService
volumeId
- the volume idname
- the name to update (null indicates no name update)description
- the description to update (null indicates no description update)public void deleteVolumeType(String volumeTypeId)
deleteVolumeType
in interface BlockVolumeService
volumeTypeId
- the volume type identifierpublic VolumeType createVolumeType(VolumeType volumeType)
createVolumeType
in interface BlockVolumeService
volumeType
- the volumeType for createpublic ActionResponse migrate(String volumeId, String hostService, boolean forceHostCopy)
BlockVolumeService
migrate
in interface BlockVolumeService
volumeId
- the volume idhostService
- the destination host and service ,like kvmnode002021.cnsuning.com@lvmdriverpublic VolumeUploadImage uploadToImage(String volumeId, UploadImageData data)
BlockVolumeService
uploadToImage
in interface BlockVolumeService
volumeId
- the volume identifier to uploaddata
- the data about the volume being uploaded (required)public BlockVolumeTransferService transfer()
BlockVolumeService
transfer
in interface BlockVolumeService
public ActionResponse readOnlyModeUpdate(String volumeId, boolean readonly)
readOnlyModeUpdate
in interface BlockVolumeService
volumeId
- ID of volume to updatereadonly
- enables or disables update of volume to read-only access modeCopyright © 2017. All rights reserved.