Package com.morpheusdata.core.cloud
Interface MorpheusCloudService
- All Superinterfaces:
MorpheusDataQueryService<Cloud>
,MorpheusDataService<Cloud,
,CloudIdentityProjection> MorpheusIdentityService<CloudIdentityProjection>
public interface MorpheusCloudService
extends 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 Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Map>
buildContainerUserGroups
(Account account, VirtualImage virtualImage, List<UserGroup> userGroups, User user, Map opts) io.reactivex.rxjava3.core.Single<String>
buildUserData
(PlatformType platformType, Map userConfig, Map cloudConfig) io.reactivex.rxjava3.core.Maybe<ComputeServerType>
This will retrieve a compute server type by specific codeio.reactivex.rxjava3.core.Single<KeyPair>
findOrGenerateKeyPair
(Account account) Get the ssh credentials associated with an accountio.reactivex.rxjava3.core.Single<Cloud>
getCloudById
(Long id) io.reactivex.rxjava3.core.Single<Collection<ComputeServerType>>
getComputeServerTypes
(Long cloudId) io.reactivex.rxjava3.core.Single<Instance>
getInstance
(ComputeServer server) getPool()
io.reactivex.rxjava3.core.Observable<InstanceIdentityProjection>
getStoppedContainerInstanceIds
(Long computeServerId) getType()
io.reactivex.rxjava3.core.Observable<Workload>
getWorkload
(ComputeServer server) io.reactivex.rxjava3.core.Single<Workload>
getWorkloadById
(Long id) io.reactivex.rxjava3.core.Observable<WorkloadIdentityProjection>
listCloudWorkloadProjections
(Long cloudId) 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 AccountCredentialio.reactivex.rxjava3.core.Single<Boolean>
saveWorkload
(Workload workload) Saves a workloadvoid
updateCloudCostStatus
(Cloud cloud, Cloud.Status status, String message, Date syncDate) Updates the costing status of a cloud from a costing daily refresh operation.void
updateCloudStatus
(Cloud cloud, Cloud.Status status, String message, Date syncDate) Update the status of a Cloud during setupio.reactivex.rxjava3.core.Single<Void>
updateInstanceStatus
(List<Long> ids, Instance.Status status) Update a collection of Instances to a particular status.io.reactivex.rxjava3.core.Single<Void>
updateKeyPair
(KeyPair keyPair, Cloud cloud) Update Morpheus with an external reference to the KeyPair in your Cloud API.void
updateZoneCostStatus
(Cloud cloud, Cloud.Status status, String message, Date syncDate) Deprecated.void
updateZoneStatus
(Cloud cloud, Cloud.Status status, String message, Date syncDate) Deprecated.Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, search
Methods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, save, save
Methods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
listCloudWorkloadProjections
io.reactivex.rxjava3.core.Observable<WorkloadIdentityProjection> listCloudWorkloadProjections(Long cloudId) -
getPool
MorpheusCloudPoolService getPool() -
getFolder
MorpheusCloudFolderService getFolder() -
getRegion
MorpheusCloudRegionService getRegion() -
getDatastore
MorpheusDatastoreService getDatastore() -
getNetwork
MorpheusNetworkService getNetwork() -
getResource
MorpheusAccountResourceService getResource() -
getType
MorpheusCloudTypeService getType() -
getComputeServerTypes
-
findComputeServerTypeByCode
This will retrieve a compute server type by specific code- Parameters:
code
- String representing the code of the compute server type- Returns:
Maybe
aComputeServerType
-
updateZoneStatus
Deprecated.Update the status of a Cloud during setup- Parameters:
cloud
- Cloud instancestatus
- cloud state statusmessage
- error or info messagesyncDate
- time of update operation
-
updateZoneCostStatus
@Deprecated void updateZoneCostStatus(Cloud cloud, Cloud.Status status, String message, Date syncDate) Deprecated.Updates the costing status of a cloud from a costing daily refresh operation. This is typically only ever used when implementing a customCloudCostingProvider
- Parameters:
cloud
- Cloud instance we are updating cost status onstatus
- cloud costing state statusmessage
- error or info messagesyncDate
- time of cost refresh operation- See Also:
-
updateCloudStatus
Update the status of a Cloud during setup- Parameters:
cloud
- Cloud instancestatus
- cloud state statusmessage
- error or info messagesyncDate
- time of update operation
-
updateCloudCostStatus
Updates the costing status of a cloud from a costing daily refresh operation. This is typically only ever used when implementing a customCloudCostingProvider
- Parameters:
cloud
- Cloud instance we are updating cost status onstatus
- cloud costing state statusmessage
- error or info messagesyncDate
- time of cost refresh operation- See Also:
-
findOrGenerateKeyPair
Get the ssh credentials associated with an account- Parameters:
account
- to lookup- Returns:
- Morpheus KeyPair
-
updateKeyPair
Update Morpheus with an external reference to the KeyPair in your Cloud API.- Parameters:
keyPair
- that was updatedcloud
- associated with the credentials- Returns:
- void
-
getWorkloadById
-
loadCredentials
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
Saves a workload- Parameters:
workload
-- Returns:
- boolean
-
getWorkload
-
getCloudById
-
buildContainerUserGroups
-
updateInstanceStatus
Update a collection of Instances to a particular status.- Parameters:
ids
-Instance
id liststatus
- instance status- Returns:
- null
-
getStoppedContainerInstanceIds
io.reactivex.rxjava3.core.Observable<InstanceIdentityProjection> getStoppedContainerInstanceIds(Long computeServerId) -
getInstance
-
buildUserData
io.reactivex.rxjava3.core.Single<String> buildUserData(PlatformType platformType, Map userConfig, Map cloudConfig)
-
updateCloudCostStatus(Cloud, Cloud.Status, String, Date)