Interface MorpheusUsageService


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

    Modifier and Type
    Method
    Description
    io.reactivex.rxjava3.core.Single<Boolean>
    Request that usage records be restarted for the given servers.
    io.reactivex.rxjava3.core.Single<Boolean>
    Request that usage records be restarted for the given snapshots.
    io.reactivex.rxjava3.core.Single<Boolean>
    Request that new usage records with status 'running' should be created for the given servers.
    io.reactivex.rxjava3.core.Single<Boolean>
    Request that new usage records with status 'stopped' should be created for the given servers.
  • Method Details

    • startServerUsage

      io.reactivex.rxjava3.core.Single<Boolean> startServerUsage(List<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.rxjava3.core.Single<Boolean> stopServerUsage(List<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.rxjava3.core.Single<Boolean> restartServerUsage(List<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.rxjava3.core.Single<Boolean> restartSnapshotUsage(List<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