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 VirtualImageLocationService
      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
      MorpheusVirtualImageLocationService getLocation()
      The context for dealing with VirtualImageLocations
      io.reactivex.Observable<VirtualImage> listById​(java.util.Collection<java.lang.Long> ids)
      Get a list of VirtualImage objects from a list of projection ids
      io.reactivex.Observable<VirtualImageIdentityProjection> listSyncProjections​(java.lang.Long cloudId)
      Get a list of VirtualImage projections based on Cloud id
      io.reactivex.Observable<VirtualImageIdentityProjection> listSyncProjections​(java.lang.String provisionTypeCode)
      Get a list of VirtualImage projections based on Provision Type Code
      io.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

      • 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 projection
      • 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 projection
        Since:
        0.11.0
      • 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 VirtualImages
        cloud - 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 persist
        cloud - 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 persist
        cloud - 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