Package com.morpheusdata.core.providers
Interface HostProvisionProvider
- All Superinterfaces:
ComputeProvisionProvider
,PluginProvider
,ProvisionProvider
- All Known Subinterfaces:
VmProvisionProvider
Provides methods for interacting with the provisioning engine of Morpheus for host and vms directly
- Since:
- 0.15.3
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Allows the server to be resizedNested classes/interfaces inherited from interface com.morpheusdata.core.providers.ComputeProvisionProvider
ComputeProvisionProvider.MoveFacet
Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.ProvisionProvider
ProvisionProvider.BlockDeviceNameFacet, ProvisionProvider.HypervisorConsoleFacet, ProvisionProvider.HypervisorProvisionFacet, ProvisionProvider.IacResourceFacet, ProvisionProvider.SnapshotFacet
-
Method Summary
Modifier and TypeMethodDescriptionfinalizeHost
(ComputeServer server) This method is called after successful completion of runHost and successful completion of waitForHost and provides an opportunity to perform some final actions during the provisioning process.prepareHost
(ComputeServer server, HostRequest hostRequest, Map opts) This method is called before runHost and provides an opportunity to perform action or obtain configuration that will be needed in runHost.runHost
(ComputeServer server, HostRequest hostRequest, Map opts) This method is called to provision a Host (i.e.validateHost
(ComputeServer server, Map opts) Validate the provided provisioning options for a Docker host server.default ServiceResponse<ProvisionResponse>
waitForHost
(ComputeServer server) This method is called after runHost returns successfully and provides implementations a mechanism to wait for the ComputeServer to finish the creation process in the underlying Cloud.Methods inherited from interface com.morpheusdata.core.providers.ComputeProvisionProvider
startServer, stopServer
Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
Methods inherited from interface com.morpheusdata.core.providers.ProvisionProvider
aclEnabled, canAddVolumes, canCustomizeDataVolumes, canCustomizeRootVolume, canReconfigureNetwork, canResizeRootVolume, cloneToTemplate, computeZonePoolRequired, createDefaultInstanceType, customSupported, disableRootDatastore, getCircularIcon, getComputeServerInterfaceTypes, getComputeTypeLayouts, getDataVolumeStorageTypes, getDefaultInstanceTypeDescription, getDefaultInstanceTypeOptions, getDeployTargetService, getHostDiskMode, getHostType, getMaxNetworks, getNodeFormat, getNodeOptionTypes, getOptionTypes, getProvisionTypeCode, getRootVolumeStorageTypes, getServicePlans, getTemplateParameters, getViewSet, getVirtualImages, getVirtualImageTypes, hasCloneTemplate, hasComputeZonePools, hasConfigurableSockets, hasDatastores, hasNetworks, hasNodeTypes, hasPlanTagMatch, hasSecurityGroups, hasStorageControllers, lvmSupported, multiTenant, networksScopedToPools, requiresVirtualImage, serverType, supportsAgent, supportsAutoDatastore, supportsCustomServicePlans
-
Method Details
-
validateHost
Validate the provided provisioning options for a Docker host server. A return of success = false will halt the creation and display errors- Parameters:
server
- the ComputeServer to validateopts
- options- Returns:
- Response from API
-
prepareHost
ServiceResponse<PrepareHostResponse> prepareHost(ComputeServer server, HostRequest hostRequest, Map opts) This method is called before runHost and provides an opportunity to perform action or obtain configuration that will be needed in runHost. At the end of this method, if deploying a ComputeServer with a VirtualImage, the sourceImage on ComputeServer should be determined and saved.- Parameters:
server
- the ComputeServer object we intend to provision along with some of the associated data needed to determine how best to provision the serverhostRequest
- the HostRequest object containing the various configurations that may be needed in running the server. This will be passed along into runHostopts
- additional configuration options that may have been passed during provisioning- Returns:
- Response from API
-
runHost
This method is called to provision a Host (i.e. Docker host). Information associated with the passed ComputeServer object is used to kick off the provision request. Implementations of this method should populate ProvisionResponse as complete as possible and as quickly as possible. Implementations may choose to save the externalId on the ComputeServer or pass it back in ProvisionResponse.- Parameters:
server
- the ComputeServer object we intend to provision along with some of the associated data needed to determine how best to provision the serverhostRequest
- the HostRequest object containing the various configurations that may be needed in running the server.opts
- additional configuration options that may have been passed during provisioning- Returns:
- Response from API
-
waitForHost
This method is called after runHost returns successfully and provides implementations a mechanism to wait for the ComputeServer to finish the creation process in the underlying Cloud. ProvisionResponse should be filled out as complete as possible.- Parameters:
server
- the ComputeServer object to wait for- Returns:
-
finalizeHost
This method is called after successful completion of runHost and successful completion of waitForHost and provides an opportunity to perform some final actions during the provisioning process. For example, ejected CDs, cleanup actions, etc- Parameters:
server
- the ComputeServer object that has been provisioned- Returns:
- Response from the API
-