Package com.morpheusdata.core
Interface MorpheusVirtualImageService
-
public interface MorpheusVirtualImageService
Context methods for syncing VirtualImages in Morpheus- Since:
- 0.8.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Single<VirtualImage>
create(VirtualImage virtualImage, Cloud cloud)
Create new VirtualImage in Morpheus NOTE: Any additions of VirtualImageLocations related to the VirtualImage should be performed via the VirtualImageLocationServiceio.reactivex.Single<java.lang.Boolean>
create(java.util.List<VirtualImage> virtualImages, Cloud cloud)
Create new VirtualImages in Morpheus NOTE: Any additions of VirtualImageLocations related to the VirtualImage should be performed via the VirtualImageLocationServiceio.reactivex.Single<VirtualImage>
get(java.lang.Long id)
Get a VirtualImage object by idMorpheusVirtualImageLocationService
getLocation()
The context for dealing with VirtualImageLocationsio.reactivex.Single<java.util.Collection<com.bertramlabs.plugins.karman.CloudFile>>
getVirtualImageFiles(VirtualImage virtualImage)
io.reactivex.Observable<VirtualImage>
listById(java.util.Collection<java.lang.Long> ids)
Get a list of VirtualImage objects from a list of projection idsio.reactivex.Observable<VirtualImageIdentityProjection>
listSyncProjections(java.lang.Long cloudId)
Get a list of VirtualImage projections based on Cloud idio.reactivex.Observable<VirtualImageIdentityProjection>
listSyncProjections(java.lang.Long accountId, ImageType[] imageTypes)
Get a list of VirtualImage projections that matches one of the provided ImageTypes and either the account owns or the account can access due to the visibility setting on the VirtualImageio.reactivex.Observable<VirtualImageIdentityProjection>
listSyncProjections(java.lang.String provisionTypeCode)
Get a list of VirtualImage projections based on Provision Type Codeio.reactivex.Single<java.lang.Boolean>
remove(java.util.List<VirtualImageIdentityProjection> virtualImages)
Remove persisted VirtualImages from Morpheus and the underlying cloud.io.reactivex.Single<java.lang.Boolean>
remove(java.util.List<VirtualImageIdentityProjection> virtualImages, Cloud cloud)
Remove persisted VirtualImages from Morpheus.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<VirtualImage> virtualImages, Cloud cloud)
Save updates to existing VirtualImages NOTE: Any additions or removals of VirtualImageLocations related to the VirtualImage should be performed via the VirtualImageLocationService
-
-
-
Method Detail
-
getLocation
MorpheusVirtualImageLocationService getLocation()
The context for dealing with VirtualImageLocations- Returns:
- MorpheusVirtualImageLocationService
-
listSyncProjections
io.reactivex.Observable<VirtualImageIdentityProjection> listSyncProjections(java.lang.Long cloudId)
Get a list of VirtualImage projections based on Cloud id- Parameters:
cloudId
- Cloud id- Returns:
- Observable stream of sync projections
-
listSyncProjections
io.reactivex.Observable<VirtualImageIdentityProjection> listSyncProjections(java.lang.String provisionTypeCode)
Get a list of VirtualImage projections based on Provision Type Code- Parameters:
provisionTypeCode
- Provision Type Code- Returns:
- Observable stream of sync projections
- Since:
- 0.11.0
-
listSyncProjections
io.reactivex.Observable<VirtualImageIdentityProjection> listSyncProjections(java.lang.Long accountId, ImageType[] imageTypes)
Get a list of VirtualImage projections that matches one of the provided ImageTypes and either the account owns or the account can access due to the visibility setting on the VirtualImage- Parameters:
accountId
- Account IdimageTypes
- Array of ImageTypes- Returns:
- Observable stream of sync projections
-
get
io.reactivex.Single<VirtualImage> get(java.lang.Long id)
Get a VirtualImage object by id- Parameters:
id
- VirtualImage id- Returns:
- the VirtualImage
-
listById
io.reactivex.Observable<VirtualImage> listById(java.util.Collection<java.lang.Long> ids)
Get a list of VirtualImage objects from a list of projection ids- Parameters:
ids
- VirtualImage ids- Returns:
- Observable stream of VirtualImages
-
save
io.reactivex.Single<java.lang.Boolean> save(java.util.List<VirtualImage> virtualImages, Cloud cloud)
Save updates to existing VirtualImages NOTE: Any additions or removals of VirtualImageLocations related to the VirtualImage should be performed via the VirtualImageLocationService- Parameters:
virtualImages
- updated VirtualImagescloud
- the Cloud instance- Returns:
- success
-
create
io.reactivex.Single<java.lang.Boolean> create(java.util.List<VirtualImage> virtualImages, Cloud cloud)
Create new VirtualImages in Morpheus NOTE: Any additions of VirtualImageLocations related to the VirtualImage should be performed via the VirtualImageLocationService- Parameters:
virtualImages
- new VirtualImages to persistcloud
- the Cloud instance- Returns:
- success
-
create
io.reactivex.Single<VirtualImage> create(VirtualImage virtualImage, Cloud cloud)
Create new VirtualImage in Morpheus NOTE: Any additions of VirtualImageLocations related to the VirtualImage should be performed via the VirtualImageLocationService- Parameters:
virtualImage
- new VirtualImage to persistcloud
- the Cloud instance- Returns:
- the VirtualImage
-
remove
io.reactivex.Single<java.lang.Boolean> remove(java.util.List<VirtualImageIdentityProjection> virtualImages, Cloud cloud)
Remove persisted VirtualImages from Morpheus. Typically called during sync operations for the cloud to inform Morpheus that the VirtualImage no longer exists in the cloud- Parameters:
virtualImages
- Images to remove- Returns:
- success
-
remove
io.reactivex.Single<java.lang.Boolean> remove(java.util.List<VirtualImageIdentityProjection> virtualImages)
Remove persisted VirtualImages from Morpheus and the underlying cloud. Use with caution.- Parameters:
virtualImages
- Images to delete- Returns:
- success
-
getVirtualImageFiles
io.reactivex.Single<java.util.Collection<com.bertramlabs.plugins.karman.CloudFile>> getVirtualImageFiles(VirtualImage virtualImage)
-
-