Package org.openstack4j.api.image.v2
Interface ImageService
-
- All Superinterfaces:
RestService
- All Known Implementing Classes:
ImageServiceImpl
public interface ImageService extends RestService
OpenStack (Glance) Image V2 support- Author:
- emjburns
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Imagecreate(Image image)Creates a catalog record for an operating system disk image.MembercreateMember(String imageId, String memberId)The image must exist, be private, and be owned by the author of the request.ActionResponsedeactivate(String imageId)Deactivate an image If you try to download a deactivated image, you will receive a 403 (Forbidden) response code.ActionResponsedelete(String imageId)Deletes an image.ActionResponsedeleteMember(String imageId, String memberId)You must be the owner of the image to delete the memberActionResponsedeleteTag(String imageId, String tag)Delete tag from image.ActionResponsedownload(String imageId, File filename)Downloads binary image dataImageget(String imageId)Show details for an image by imageid.MembergetMember(String imageId, String memberId)Get details about a memberList<? extends Image>list()List all available operating system imagesList<? extends Image>list(Map<String,String> filteringParams)Returns list of images filtered by parameters.List<? extends CachedImage>listCachedImages()List images currently in the glance image cache.List<? extends Member>listMembers(String imageId)List members of a particular image.List<? extends Member>listMembers(String imageId, Map<String,String> filteringParams)List members of a particular image.ActionResponsereactivate(String imageId)Reactivate an imageTaskServicetasks()Imageupdate(String imageId, ImageUpdate imageUpdate)Update an image by building the string of json operations that represent the json transformation instead of the building the whole imageImageupdate(Image image)Update image by providing the changed image object.MemberupdateMember(String imageId, String memberId, Member.MemberStatus memberStatus)Change status of an image member For more details see http://specs.openstack.org/openstack/glance-specs/specs/api/v2/sharing-image-api-v2.htmlActionResponseupdateTag(String imageId, String tag)Add tag to image.ActionResponseupload(String imageId, Payload<?> payload, Image image)Uploads binary image data
-
-
-
Method Detail
-
list
List<? extends Image> list()
List all available operating system images- Returns:
- list of images
-
list
List<? extends Image> list(Map<String,String> filteringParams)
Returns list of images filtered by parameters. For filtering guidelines, see http://developer.openstack.org/api-ref/image/v2/index.html#show-images To paginate, use "limit" and "marker" parameters- Parameters:
filteringParams- map (name, value) of filtering parameters- Returns:
- list of images fitered by filteringParams
-
listCachedImages
List<? extends CachedImage> listCachedImages()
List images currently in the glance image cache.- Returns:
- list of cached images or empty list if the cache is empty or null if the cache is not enabled.
-
get
Image get(String imageId)
Show details for an image by imageid. The image must exist- Returns:
- the image
-
create
Image create(Image image)
Creates a catalog record for an operating system disk image.- Returns:
- Image
-
update
Image update(Image image)
Update image by providing the changed image object.- Returns:
- image
-
update
Image update(String imageId, ImageUpdate imageUpdate)
Update an image by building the string of json operations that represent the json transformation instead of the building the whole image- Returns:
- Image
-
delete
ActionResponse delete(String imageId)
Deletes an image. You cannot delete images with the protected attribute set to true (boolean).
-
deactivate
ActionResponse deactivate(String imageId)
Deactivate an image If you try to download a deactivated image, you will receive a 403 (Forbidden) response code. Additionally, only administrative users can view image locations for deactivated images.
-
reactivate
ActionResponse reactivate(String imageId)
Reactivate an image
-
listMembers
List<? extends Member> listMembers(String imageId)
List members of a particular image. These members are projects or tenants that can see the image.- Returns:
- List of members
-
listMembers
List<? extends Member> listMembers(String imageId, Map<String,String> filteringParams)
List members of a particular image. These members are projects or tenants that can see the image.- Returns:
- List of members
-
createMember
Member createMember(String imageId, String memberId)
The image must exist, be private, and be owned by the author of the request. Otherwise, this will fail.- Parameters:
imageId- the image to share- Returns:
- member
-
getMember
Member getMember(String imageId, String memberId)
Get details about a member- Returns:
- member
-
updateMember
Member updateMember(String imageId, String memberId, Member.MemberStatus memberStatus)
Change status of an image member For more details see http://specs.openstack.org/openstack/glance-specs/specs/api/v2/sharing-image-api-v2.html- Returns:
- member
-
deleteMember
ActionResponse deleteMember(String imageId, String memberId)
You must be the owner of the image to delete the member
-
updateTag
ActionResponse updateTag(String imageId, String tag)
Add tag to image. Can also be done with ImagesService#update(image)
-
deleteTag
ActionResponse deleteTag(String imageId, String tag)
Delete tag from image. Can also be done with ImagesService#update(image)
-
upload
ActionResponse upload(String imageId, Payload<?> payload, @Nullable Image image)
Uploads binary image data
-
download
ActionResponse download(String imageId, File filename)
Downloads binary image data
-
tasks
TaskService tasks()
- Returns:
- the image v2 tasks service
-
-