public class ImageServiceImpl extends BaseImageServices implements ImageService
BaseOpenStackService.Invocation<R>
Constructor and Description |
---|
ImageServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
addMember(String imageId,
String tenantId)
Authorize a tenant to access a private image
|
boolean |
addMember(String imageId,
String tenantId,
boolean canShare)
Authorize a tenant to access a private image
|
Image |
create(Image image,
Payload<?> payload)
Creates a new Image
|
ActionResponse |
delete(String imageId)
Deletes an Image by ID
|
Image |
get(String imageId)
Gets an Image by ID
|
InputStream |
getAsStream(String imageId)
Return the image date for the image by ID
|
List<? extends Image> |
list()
Lists public VM images by the default page size defined by openstack
|
List<? extends Image> |
list(Map<String,String> filteringParams)
* Returns list of public VM images filtered by parameters.
|
List<? extends Image> |
listAll()
Lists all public VM images
|
List<? extends Image> |
listAll(Map<String,String> filteringParams)
* Returns list of public VM images filtered by parameters when the result greater than the default page size defined by openstack
|
List<? extends ImageMember> |
listMembers(String imageId)
List of the other system tenants that may access a given virtual machine image that the Glance server knows about.
|
boolean |
removeMember(String imageId,
String tenantId)
Revoke a tenant's right to access a private image.
|
Image |
reserve(Image image)
Reserves a new image to be uploaded later.
|
Image |
update(Image image)
Updates an Image.
|
Image |
upload(String imageId,
Payload<?> payload,
Image image)
Upload image data for a previously-reserved image
If an image was previously reserved, and thus is in the queued state, then image data can be added using this method. |
delete, deleteWithResponse, get, getProvider, getServiceVersion, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, request, toList, uri
public List<? extends Image> list()
list
in interface ImageService
public List<? extends Image> list(Map<String,String> filteringParams)
list
in interface ImageService
filteringParams
- map (name, value) of filtering parameterspublic List<? extends Image> listAll(Map<String,String> filteringParams)
ImageService
listAll
in interface ImageService
filteringParams
- map (name, value) of filtering parameterspublic List<? extends Image> listAll()
ImageService
listAll
in interface ImageService
public Image get(String imageId)
get
in interface ImageService
imageId
- the image identifierpublic ActionResponse delete(String imageId)
delete
in interface ImageService
imageId
- the image identifierpublic Image update(Image image)
update
in interface ImageService
image
- the image to updatepublic InputStream getAsStream(String imageId)
getAsStream
in interface ImageService
imageId
- the image identifierpublic Image create(Image image, Payload<?> payload)
create
in interface ImageService
image
- the image to createpayload
- the payload (image data to upload). Note: if the payload is null then ImageService.reserve(Image)
will be called internallypublic Image reserve(Image image)
ImageService.upload(String, Payload, Image)
reserve
in interface ImageService
image
- the image to reservepublic Image upload(String imageId, Payload<?> payload, @Nullable Image image)
upload
in interface ImageService
imageId
- the image identifier of the previously reserved imagepayload
- the playload to uploadimage
- the optional Image which will be used to update meta data during this transactionpublic List<? extends ImageMember> listMembers(String imageId)
listMembers
in interface ImageService
imageId
- the image identiferpublic boolean addMember(String imageId, String tenantId)
addMember
in interface ImageService
imageId
- the image identifiertenantId
- the tenantpublic boolean addMember(String imageId, String tenantId, boolean canShare)
addMember
in interface ImageService
imageId
- the image identifiertenantId
- the tenantcanShare
- both existing and new memberships will have `can_share` set to the provided valuepublic boolean removeMember(String imageId, String tenantId)
removeMember
in interface ImageService
imageId
- the image identifiertenantId
- the tenant to remove (identifier)Copyright © 2017. All rights reserved.