Interface MorpheusCloudService

All Superinterfaces:
MorpheusDataQueryService<Cloud>, MorpheusDataService<Cloud,CloudIdentityProjection>, MorpheusIdentityService<CloudIdentityProjection>

Morpheus Context as it relates to cloud operations. for OptionType sources managing other resources needed at Cloud initialization. Typically, this class is accessed via the primary MorpheusContext. This service used to contain methods for querying things like ReferenceData but those have since moved to the MorpheusReferenceDataService
Since:
0.8.0
  • Method Details

    • listCloudWorkloadProjections

      io.reactivex.rxjava3.core.Observable<WorkloadIdentityProjection> listCloudWorkloadProjections(Long cloudId)
    • getPool

    • getFolder

    • getRegion

    • getDatastore

      MorpheusDatastoreService getDatastore()
    • getNetwork

    • getResource

    • getType

    • getComputeServerTypes

      io.reactivex.rxjava3.core.Single<Collection<ComputeServerType>> getComputeServerTypes(Long cloudId)
    • findComputeServerTypeByCode

      io.reactivex.rxjava3.core.Maybe<ComputeServerType> findComputeServerTypeByCode(String code)
      This will retrieve a compute server type by specific code
      Parameters:
      code - String representing the code of the compute server type
      Returns:
      Maybe a ComputeServerType
    • updateZoneStatus

      @Deprecated void updateZoneStatus(Cloud cloud, Cloud.Status status, String message, Date syncDate)
      Update the status of a Cloud during setup
      Parameters:
      cloud - Cloud instance
      status - cloud state status
      message - error or info message
      syncDate - time of update operation
    • updateZoneCostStatus

      @Deprecated void updateZoneCostStatus(Cloud cloud, Cloud.Status status, String message, Date syncDate)
      Updates the costing status of a cloud from a costing daily refresh operation. This is typically only ever used when implementing a custom CloudCostingProvider
      Parameters:
      cloud - Cloud instance we are updating cost status on
      status - cloud costing state status
      message - error or info message
      syncDate - time of cost refresh operation
      See Also:
    • updateCloudStatus

      void updateCloudStatus(Cloud cloud, Cloud.Status status, String message, Date syncDate)
      Update the status of a Cloud during setup
      Parameters:
      cloud - Cloud instance
      status - cloud state status
      message - error or info message
      syncDate - time of update operation
    • updateCloudCostStatus

      void updateCloudCostStatus(Cloud cloud, Cloud.Status status, String message, Date syncDate)
      Updates the costing status of a cloud from a costing daily refresh operation. This is typically only ever used when implementing a custom CloudCostingProvider
      Parameters:
      cloud - Cloud instance we are updating cost status on
      status - cloud costing state status
      message - error or info message
      syncDate - time of cost refresh operation
      See Also:
    • findOrGenerateKeyPair

      io.reactivex.rxjava3.core.Single<KeyPair> findOrGenerateKeyPair(Account account)
      Get the ssh credentials associated with an account
      Parameters:
      account - to lookup
      Returns:
      Morpheus KeyPair
    • updateKeyPair

      io.reactivex.rxjava3.core.Single<Void> updateKeyPair(KeyPair keyPair, Cloud cloud)
      Update Morpheus with an external reference to the KeyPair in your Cloud API.
      Parameters:
      keyPair - that was updated
      cloud - associated with the credentials
      Returns:
      void
    • getWorkloadById

      io.reactivex.rxjava3.core.Single<Workload> getWorkloadById(Long id)
    • loadCredentials

      io.reactivex.rxjava3.core.Single<AccountCredential> loadCredentials(Long cloudId)
      Returns the AccountCredential for the Cloud if the usage of credentials is supported by the Cloud and the Cloud is currently configured to use an AccountCredential
      Parameters:
      cloudId -
      Returns:
      AccountCredential
    • saveWorkload

      io.reactivex.rxjava3.core.Single<Boolean> saveWorkload(Workload workload)
      Saves a workload
      Parameters:
      workload -
      Returns:
      boolean
    • getWorkload

      io.reactivex.rxjava3.core.Observable<Workload> getWorkload(ComputeServer server)
    • getCloudById

      io.reactivex.rxjava3.core.Single<Cloud> getCloudById(Long id)
    • buildContainerUserGroups

      io.reactivex.rxjava3.core.Single<Map> buildContainerUserGroups(Account account, VirtualImage virtualImage, List<UserGroup> userGroups, User user, Map opts)
    • updateInstanceStatus

      io.reactivex.rxjava3.core.Single<Void> updateInstanceStatus(List<Long> ids, Instance.Status status)
      Update a collection of Instances to a particular status.
      Parameters:
      ids - Instance id list
      status - instance status
      Returns:
      null
    • getStoppedContainerInstanceIds

      io.reactivex.rxjava3.core.Observable<InstanceIdentityProjection> getStoppedContainerInstanceIds(Long computeServerId)
    • getInstance

      io.reactivex.rxjava3.core.Single<Instance> getInstance(ComputeServer server)
    • buildUserData

      io.reactivex.rxjava3.core.Single<String> buildUserData(PlatformType platformType, Map userConfig, Map cloudConfig)