Package com.morpheusdata.core.cloud
Interface MorpheusCloudService
-
public interface MorpheusCloudService
Morpheus Context as it relates to cloud operations. This context contains methods for querying things likeReferenceData
forOptionType
sources managing other resources needed at Cloud initialization. Typically this class is accessed via the primaryMorpheusContext
.- Since:
- 0.8.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Single<java.util.Map>
buildContainerUserGroups(Account account, VirtualImage virtualImage, java.util.List<UserGroup> userGroups, User user, java.util.Map opts)
io.reactivex.Single<java.lang.String>
buildUserData(PlatformType platformType, java.util.Map userConfig, java.util.Map cloudConfig)
io.reactivex.Single<java.lang.Boolean>
create(java.util.List<ReferenceData> referenceData, Cloud cloud, java.lang.String category)
io.reactivex.Single<KeyPair>
findOrGenerateKeyPair(Account account)
Get the ssh credentials associated with an accountio.reactivex.Single<ReferenceData>
findReferenceDataByExternalId(java.lang.String externalId)
io.reactivex.Single<Cloud>
getCloudById(java.lang.Long id)
io.reactivex.Single<java.util.Collection<ComputeServerType>>
getComputeServerTypes(java.lang.Long cloudId)
MorpheusDatastoreService
getDatastore()
MorpheusComputeZoneFolderService
getFolder()
io.reactivex.Single<Instance>
getInstance(ComputeServer server)
MorpheusNetworkService
getNetwork()
MorpheusComputeZonePoolService
getPool()
io.reactivex.Observable<InstanceIdentityProjection>
getStoppedContainerInstanceIds(java.lang.Long computeServerId)
io.reactivex.Observable<Workload>
getWorkload(ComputeServer server)
io.reactivex.Single<Workload>
getWorkloadById(java.lang.Long id)
io.reactivex.Observable<WorkloadIdentityProjection>
listCloudWorkloadProjections(java.lang.Long cloudId)
io.reactivex.Observable<ReferenceDataSyncProjection>
listReferenceDataByCategory(Cloud cloud, java.lang.String code)
io.reactivex.Observable<ReferenceData>
listReferenceDataById(java.util.List<java.lang.Long> ids)
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 AccountCredentialio.reactivex.Single<java.lang.Boolean>
remove(java.util.List<ReferenceDataSyncProjection> removeItems)
io.reactivex.Single<java.lang.Boolean>
save(Cloud cloud)
Save the Cloudio.reactivex.Single<java.lang.Boolean>
save(java.util.List<ReferenceData> referenceData, Cloud cloud, java.lang.String category)
io.reactivex.Single<java.lang.Boolean>
saveWorkload(Workload workload)
Saves a workloadio.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.io.reactivex.Single<java.lang.Void>
updateKeyPair(KeyPair keyPair, Cloud cloud)
Update Morpheus with an external reference to the KeyPair in your Cloud API.void
updateZoneStatus(Cloud cloud, Cloud.Status status, java.lang.String message, java.util.Date syncDate)
Update the status of a Cloud during setup
-
-
-
Method Detail
-
listCloudWorkloadProjections
io.reactivex.Observable<WorkloadIdentityProjection> listCloudWorkloadProjections(java.lang.Long cloudId)
-
getPool
MorpheusComputeZonePoolService getPool()
-
getFolder
MorpheusComputeZoneFolderService getFolder()
-
getDatastore
MorpheusDatastoreService getDatastore()
-
getNetwork
MorpheusNetworkService getNetwork()
-
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 instancestatus
- cloud state statusmessage
- error or info messagesyncDate
- 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 updatedcloud
- 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
-
getWorkload
io.reactivex.Observable<Workload> getWorkload(ComputeServer server)
-
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)
-
remove
io.reactivex.Single<java.lang.Boolean> remove(java.util.List<ReferenceDataSyncProjection> removeItems)
-
listReferenceDataByCategory
io.reactivex.Observable<ReferenceDataSyncProjection> listReferenceDataByCategory(Cloud cloud, java.lang.String code)
-
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 liststatus
- instance status- Returns:
- null
-
getStoppedContainerInstanceIds
io.reactivex.Observable<InstanceIdentityProjection> getStoppedContainerInstanceIds(java.lang.Long computeServerId)
-
getInstance
io.reactivex.Single<Instance> getInstance(ComputeServer server)
-
buildUserData
io.reactivex.Single<java.lang.String> buildUserData(PlatformType platformType, java.util.Map userConfig, java.util.Map cloudConfig)
-
-