@Consumes(value="application/json")
@Path(value="/servers")
public interface VolumeAttachmentApi
VolumeApi
Modifier and Type | Method and Description |
---|---|
VolumeAttachment |
attachVolumeToServerAsDevice(String volumeId,
String serverId,
String device)
Attaches a Volume to a Server.
|
boolean |
detachVolumeFromServer(String volumeId,
String serverId)
Detaches a Volume from a server.
|
VolumeAttachment |
getAttachmentForVolumeOnServer(String volumeId,
String serverId)
Gets a specific Volume Attachment for a Volume and Server.
|
com.google.common.collect.FluentIterable<VolumeAttachment> |
listAttachmentsOnServer(String serverId)
Lists Volume Attachments for a given Server.
|
@Named(value="volumeAttachment:list") @GET @Path(value="/{serverId}/os-volume_attachments") com.google.common.collect.FluentIterable<VolumeAttachment> listAttachmentsOnServer(@PathParam(value="serverId") String serverId)
serverId
- The ID of the Server@Named(value="volumeAttachment:get") @GET @Path(value="/{serverId}/os-volume_attachments/{id}") @Nullable VolumeAttachment getAttachmentForVolumeOnServer(@PathParam(value="id") String volumeId, @PathParam(value="serverId") String serverId)
volumeId
- The ID of the VolumeserverId
- The ID of the Server@Named(value="volumeAttachment:attach") @POST @Path(value="/{serverId}/os-volume_attachments") @Produces(value="application/json") VolumeAttachment attachVolumeToServerAsDevice(String volumeId, @PathParam(value="serverId") String serverId, String device)
serverId
- The ID of the ServervolumeId
- The ID of the Volumedevice
- The name of the device this Volume will be identified as in the Server (e.g. /dev/vdc)@Named(value="volumeAttachment:detach") @DELETE @Path(value="/{serverId}/os-volume_attachments/{id}") boolean detachVolumeFromServer(@PathParam(value="id") String volumeId, @PathParam(value="serverId") String serverId)
volumeId
- The ID of the VolumeserverId
- The ID of the ServerCopyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.