Package com.morpheusdata.core
Interface MorpheusComputeServerService
- All Superinterfaces:
MorpheusDataQueryService<ComputeServer>,MorpheusDataService<ComputeServer,,ComputeServerIdentityProjection> MorpheusIdentityService<ComputeServerIdentityProjection>
public interface MorpheusComputeServerService
extends MorpheusDataService<ComputeServer,ComputeServerIdentityProjection>, MorpheusIdentityService<ComputeServerIdentityProjection>
Context methods for syncing
ComputeServer in Morpheus- Since:
- 0.8.0
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<ServiceResponse<ComputeServer>>addHost(Cloud cloud, AddHostRequest request) Provisions a new host onto the targetCloudusing the supplied request details.buildComputeServerInterface(Account account, Instance instance, ComputeServer server, MorpheusComputeServerNetworkInterfaceConfig networkInterfaceConfig) io.reactivex.rxjava3.core.Single<ServiceResponse>executeUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) Returns the ComputePort context used for performing sync operations onComputeServerAccessrelated assets within Morpheus.Returns the ComputeDevice context used for performing sync operations onComputeDevicerelated assets within Morpheus.Returns the ComputePort context used for performing sync operations onComputePortrelated assets within Morpheus.Returns the ComputeServerInterfaceContext used for performing updates or queries onComputeServerInterfacerelated assets within Morpheus.io.reactivex.rxjava3.core.Single<ServiceResponse>getConfigurationDriftDetails(ComputeServer... computeServer) io.reactivex.rxjava3.core.Observable<ComputeServer>listByCloudAndExternalIdIn(Long cloudId, Collection<String> externalIds) Lists allComputeServerobjects by cloud ID and a list of External IDs.io.reactivex.rxjava3.core.Observable<ComputeServer>listByResourcePoolId(Long resourcePoolId) Lists allComputeServerobjects by aComputeZonePool.io.reactivex.rxjava3.core.Observable<ComputeServerIdentityProjection>listIdentityProjections(Long cloudId, String regionCode) Get a list ofComputeServerprojections based on Cloud idio.reactivex.rxjava3.core.Observable<ComputeServerIdentityProjection>listSyncProjections(Long cloudId) Deprecated.io.reactivex.rxjava3.core.Single<ServiceResponse>postUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) io.reactivex.rxjava3.core.Single<ServiceResponse>refreshUpdate(UpdateOperation updateOperation, ComputeServer... computeServer) io.reactivex.rxjava3.core.Single<Boolean>remove(List<ComputeServer> computeServers, InstanceScale instanceScale) Remove persisted ComputeServers from Morpheus and remove them theInstanceScalethey are associated withio.reactivex.rxjava3.core.Single<ServiceResponse>removeHost(ComputeServer server, RemoveHostRequest request) Removes the specified host using the supplied request details.io.reactivex.rxjava3.core.Single<Boolean>restartServer(Long computeServerId) Restart a ComputeServer.io.reactivex.rxjava3.core.Single<ServiceResponse>rollbackUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) io.reactivex.rxjava3.core.Single<ServiceResponse>runConfigurationDriftCheck(CheckLevel checkLevel, ComputeServer... computeServer) io.reactivex.rxjava3.core.Single<Boolean>startServer(Long computeServerId) Start a ComputeServer.io.reactivex.rxjava3.core.Single<Boolean>stopServer(Long computeServerId) Stop a ComputeServer.io.reactivex.rxjava3.core.Single<Void>updatePowerState(Long computeServerId, ComputeServer.PowerState state) Update the power state of a server and any related vmsio.reactivex.rxjava3.core.Single<ServiceResponse>validateUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, searchMethods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, save, saveMethods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<ComputeServerIdentityProjection> listIdentityProjections(Long cloudId, String regionCode) Get a list ofComputeServerprojections based on Cloud id- Parameters:
cloudId- Cloud idregionCode- theComputeZoneRegionto optionally filter by- Returns:
- Observable stream of sync projection
-
listSyncProjections
@Deprecated io.reactivex.rxjava3.core.Observable<ComputeServerIdentityProjection> listSyncProjections(Long cloudId) Deprecated.replaced by {listIdentityProjections(Long, String)}Get a list ofComputeServerprojections based on Cloud id- Parameters:
cloudId- Cloud id- Returns:
- Observable stream of sync projection
-
listByCloudAndExternalIdIn
io.reactivex.rxjava3.core.Observable<ComputeServer> listByCloudAndExternalIdIn(Long cloudId, Collection<String> externalIds) Lists allComputeServerobjects by cloud ID and a list of External IDs.- Parameters:
cloudId- the cloud to filter the list of servers by.externalIds- a Collection of external Ids to filter the list of servers by- Returns:
- an RxJava Observable stream of
ComputeServerto be subscribed to.
-
listByResourcePoolId
Lists allComputeServerobjects by aComputeZonePool.- Parameters:
resourcePoolId- the id of the resource pool (ComputeZonePool) to filter the list of servers by.- Returns:
- an RxJava Observable stream of
ComputeServerto be subscribed to.
-
updatePowerState
io.reactivex.rxjava3.core.Single<Void> updatePowerState(Long computeServerId, ComputeServer.PowerState state) Update the power state of a server and any related vms- Parameters:
computeServerId- id of theComputeServerstate- power state- Returns:
- void
-
getComputeServerInterface
MorpheusComputeServerInterfaceService getComputeServerInterface()Returns the ComputeServerInterfaceContext used for performing updates or queries onComputeServerInterfacerelated assets within Morpheus.- Returns:
- An instance of the ComputeServerInterface Context
-
getComputePort
MorpheusComputePortService getComputePort()Returns the ComputePort context used for performing sync operations onComputePortrelated assets within Morpheus.- Returns:
- An instance of the ComputePort context
-
getAccess
MorpheusComputeServerAccessService getAccess()Returns the ComputePort context used for performing sync operations onComputeServerAccessrelated assets within Morpheus.- Returns:
- An instance of the ComputeServerAccess context
-
getComputeDevice
MorpheusComputeDeviceService getComputeDevice()Returns the ComputeDevice context used for performing sync operations onComputeDevicerelated assets within Morpheus.- Returns:
- An instance of the ComputeDevice context
-
remove
io.reactivex.rxjava3.core.Single<Boolean> remove(List<ComputeServer> computeServers, InstanceScale instanceScale) Remove persisted ComputeServers from Morpheus and remove them theInstanceScalethey are associated with- Parameters:
computeServers- ComputeServers to deleteinstanceScale- the InstanceScale instance to remove the servers from- Returns:
- success
-
addHost
io.reactivex.rxjava3.core.Single<ServiceResponse<ComputeServer>> addHost(Cloud cloud, AddHostRequest request) Provisions a new host onto the targetCloudusing the supplied request details.This triggers host provisioning. A new
ComputeServeris created and queued for provisioning on the cloud; on success the returned server may still be in a provisioning state. This is not a metadata-only registration of an existing machine â it stands up a new compute host on the cloud.- Parameters:
cloud- the target cloud that should receive the newly provisioned hostrequest- the request object describing the host to provision- Returns:
- a
ServiceResponsecontaining the newly provisionedComputeServeron success - Since:
- 1.4.2
-
removeHost
io.reactivex.rxjava3.core.Single<ServiceResponse> removeHost(ComputeServer server, RemoveHostRequest request) Removes the specified host using the supplied request details.- Parameters:
server- theComputeServerhost to removerequest- the request object describing the host removal- Returns:
- a
ServiceResponseindicating success or failure - Since:
- 1.4.2
-
stopServer
Stop a ComputeServer. This is an async operation and the server may not be stopped immediately.- Parameters:
computeServerId- ComputeServer id to stop- Returns:
- success if the request to stop the server was successful
-
startServer
Start a ComputeServer. This is an async operation and the server may not be started immediately.- Parameters:
computeServerId- ComputeServer id to start- Returns:
- success if the request to start the server was successful
-
restartServer
Restart a ComputeServer. This is an async operation and the server may not be restarted immediately.- Parameters:
computeServerId- ComputeServer id to restart- Returns:
- success if the request to restart the server was successful
-
validateUpdate
io.reactivex.rxjava3.core.Single<ServiceResponse> validateUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) -
executeUpdate
io.reactivex.rxjava3.core.Single<ServiceResponse> executeUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) -
postUpdate
io.reactivex.rxjava3.core.Single<ServiceResponse> postUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) -
rollbackUpdate
io.reactivex.rxjava3.core.Single<ServiceResponse> rollbackUpdate(UpdateDefinition updateDefinition, ComputeServer... computeServer) -
refreshUpdate
io.reactivex.rxjava3.core.Single<ServiceResponse> refreshUpdate(UpdateOperation updateOperation, ComputeServer... computeServer) -
runConfigurationDriftCheck
io.reactivex.rxjava3.core.Single<ServiceResponse> runConfigurationDriftCheck(CheckLevel checkLevel, ComputeServer... computeServer) -
getConfigurationDriftDetails
io.reactivex.rxjava3.core.Single<ServiceResponse> getConfigurationDriftDetails(ComputeServer... computeServer) -
buildComputeServerInterface
ComputeServerInterface buildComputeServerInterface(Account account, Instance instance, ComputeServer server, MorpheusComputeServerNetworkInterfaceConfig networkInterfaceConfig)
-
listIdentityProjections(Long, String)}