Interface MorpheusCloudService


  • public interface MorpheusCloudService
    Morpheus Context as it relates to cloud operations. This context contains methods for querying things like ReferenceData for OptionType sources managing other resources needed at Cloud initialization. Typically this class is accessed via the primary MorpheusContext.
    Since:
    0.8.0
    • Method Detail

      • listCloudWorkloadProjections

        io.reactivex.Observable<WorkloadIdentityProjection> listCloudWorkloadProjections​(java.lang.Long cloudId)
      • getComputeServerTypes

        io.reactivex.Single<java.util.Collection<ComputeServerType>> getComputeServerTypes​(java.lang.Long cloudId)
      • updateZoneStatus

        void updateZoneStatus​(Cloud cloud,
                              Cloud.Status status,
                              java.lang.String message,
                              java.util.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
      • save

        io.reactivex.Single<java.lang.Boolean> save​(Cloud cloud)
        Save the Cloud
        Parameters:
        cloud - Cloud instance
        Returns:
        boolean success
      • findOrGenerateKeyPair

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

        io.reactivex.Single<java.lang.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.Single<Workload> getWorkloadById​(java.lang.Long id)
      • loadCredentials

        io.reactivex.Single<AccountCredential> loadCredentials​(java.lang.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.Single<java.lang.Boolean> saveWorkload​(Workload workload)
        Saves a workload
        Parameters:
        workload -
        Returns:
        boolean
      • getCloudById

        io.reactivex.Single<Cloud> getCloudById​(java.lang.Long id)
      • buildContainerUserGroups

        io.reactivex.Single<java.util.Map> buildContainerUserGroups​(Account account,
                                                                    VirtualImage virtualImage,
                                                                    java.util.List<UserGroup> userGroups,
                                                                    User user,
                                                                    java.util.Map opts)
      • create

        io.reactivex.Single<java.lang.Boolean> create​(java.util.List<ReferenceData> referenceData,
                                                      Cloud cloud,
                                                      java.lang.String category)
      • save

        io.reactivex.Single<java.lang.Boolean> save​(java.util.List<ReferenceData> referenceData,
                                                    Cloud cloud,
                                                    java.lang.String category)
      • findReferenceDataByExternalId

        io.reactivex.Single<ReferenceData> findReferenceDataByExternalId​(java.lang.String externalId)
      • listReferenceDataById

        io.reactivex.Observable<ReferenceData> listReferenceDataById​(java.util.List<java.lang.Long> ids)
      • updateInstanceStatus

        io.reactivex.Single<java.lang.Void> updateInstanceStatus​(java.util.List<java.lang.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.Observable<InstanceIdentityProjection> getStoppedContainerInstanceIds​(java.lang.Long computeServerId)
      • buildUserData

        io.reactivex.Single<java.lang.String> buildUserData​(PlatformType platformType,
                                                            java.util.Map userConfig,
                                                            java.util.Map cloudConfig)