Interface MorpheusUsageService


  • public interface MorpheusUsageService
    Context methods for controlling usage records for ComputeServers, Instances, etc in Morpheus
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.reactivex.Single<java.lang.Boolean> restartServerUsage​(java.util.List<java.lang.Long> serverIds)
      Request that usage records be restarted for the given servers.
      io.reactivex.Single<java.lang.Boolean> restartSnapshotUsage​(java.util.List<java.lang.Long> snapshotIds)
      Request that usage records be restarted for the given snapshots.
      io.reactivex.Single<java.lang.Boolean> startServerUsage​(java.util.List<java.lang.Long> serverIds)
      Request that new usage records with status 'running' should be created for the given servers.
      io.reactivex.Single<java.lang.Boolean> stopServerUsage​(java.util.List<java.lang.Long> serverIds)
      Request that new usage records with status 'stopped' should be created for the given servers.
    • Method Detail

      • startServerUsage

        io.reactivex.Single<java.lang.Boolean> startServerUsage​(java.util.List<java.lang.Long> serverIds)
        Request that new usage records with status 'running' should be created for the given servers. Any existing usage records with status 'stopped' will be closed off (their endDate set to now) for the servers specified. Any containers associated with the servers will also have 'running' usage records created. If an existing usage record with status 'running' already exists and does not have an endDate, then a new record will NOT be created.
        Parameters:
        serverIds - servers to start
        Returns:
        success
      • stopServerUsage

        io.reactivex.Single<java.lang.Boolean> stopServerUsage​(java.util.List<java.lang.Long> serverIds)
        Request that new usage records with status 'stopped' should be created for the given servers. Any existing usage records with status 'running' will be closed off (their endDate set to now) for the servers specified. Any containers associated with the servers will also have 'stopped' usage records created. If an existing usage record with status 'stopped' already exists and does not have an endDate, then a new record will NOT be created.
        Parameters:
        serverIds - servers to stop
        Returns:
        success
      • restartServerUsage

        io.reactivex.Single<java.lang.Boolean> restartServerUsage​(java.util.List<java.lang.Long> serverIds)
        Request that usage records be restarted for the given servers. This is often desired to recalculate pricing. If it is detected that restarting the usage records will result in identical usage records, then no action is performed. Otherwise, any existing usage records that do not have an endDate will be closed off (their endDate set to now) for the servers specified and new usage records with the same status will be recreated. Any containers associated with the servers are also restarted.
        Parameters:
        serverIds - servers to restart
        Returns:
        success
      • restartSnapshotUsage

        io.reactivex.Single<java.lang.Boolean> restartSnapshotUsage​(java.util.List<java.lang.Long> snapshotIds)
        Request that usage records be restarted for the given snapshots. This is often desired to recalculate pricing. If it is detected that restarting the usage records will result in identical usage records, then no action is performed. Otherwise, any existing usage records that do not have an endDate will be closed off (their endDate set to now) for the snapshots specified and new usage records with the same status will be recreated.
        Parameters:
        snapshotIds - snapshots to restart
        Returns:
        success