Package com.morpheusdata.core.providers
Interface ResourceProvisionProvider
- All Superinterfaces:
PluginProvider
,ProvisionProvider
- All Known Subinterfaces:
CloudNativeProvisionProvider
Provides methods for interacting with the provisioning engine of Morpheus. This is akin to dealing with requests made
from "Add Instance" or from Application Blueprints
- Since:
- 0.15.3
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides methods for provisioning AppsNested classes/interfaces inherited from interface com.morpheusdata.core.providers.ProvisionProvider
ProvisionProvider.BlockDeviceNameFacet, ProvisionProvider.HypervisorConsoleFacet, ProvisionProvider.HypervisorProvisionFacet, ProvisionProvider.IacResourceFacet, ProvisionProvider.SnapshotFacet
-
Method Summary
Modifier and TypeMethodDescriptiondestroyInstance
(Instance instance, Map opts) This is the key method called to destroy / remove an instance.prepareInstance
(Instance instance, InstanceRequest instanceRequest, Map opts) This method is called before runInstance and provides an opportunity to perform action or obtain configuration that will be needed in runInstance.runInstance
(Instance instance, InstanceRequest instanceRequest, Map opts) This method is a key entry point in provisioning an instance.updateInstance
(Instance instance, InstanceRequest instanceRequest, Map opts) This method is a key entry point in provisioning an instance.validateInstance
(Instance instance, Map opts) Validate the provided provisioning options for an Instance.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
-
validateInstance
Validate the provided provisioning options for an Instance. A return of success = false will halt the creation and display errors- Parameters:
instance
- the Instance to validateopts
- options- Returns:
- Response from API
-
updateInstance
ServiceResponse<ProvisionResponse> updateInstance(Instance instance, InstanceRequest instanceRequest, Map opts) This method is a key entry point in provisioning an instance. Information associated with the passed Instance object is used to kick off the instance provision request- Parameters:
instance
- the Instance object we intend to provision along with some of the associated data needed to determine how best to provision the instanceinstanceRequest
- the InstanceRequest object containing the various configurations to update the instanceopts
- additional configuration options that may have been passed during provisioning- Returns:
- A ProvisionResponse object the should at least contain the response from the API
-
prepareInstance
ServiceResponse<PrepareInstanceResponse> prepareInstance(Instance instance, InstanceRequest instanceRequest, Map opts) This method is called before runInstance and provides an opportunity to perform action or obtain configuration that will be needed in runInstance.- Parameters:
instance
- the Instance object we intend to provision along with some of the associated data needed to determine how best to provision the instanceinstanceRequest
- the InstanceRequest object containing the various configurations that may be needed in running the Instance.opts
- additional configuration options that may have been passed during provisioning- Returns:
- A PrepareInstanceResponse object that should contain the instance with any required updates that will then be saved
-
runInstance
ServiceResponse<ProvisionResponse> runInstance(Instance instance, InstanceRequest instanceRequest, Map opts) This method is a key entry point in provisioning an instance. Information associated with the passed Instance object is used to kick off the instance provision request- Parameters:
instance
- the Instance object we intend to provision along with some of the associated data needed to determine how best to provision the instanceinstanceRequest
- the InstanceRequest object containing the various configurations that may be needed in running the instanceopts
- additional configuration options that may have been passed during provisioning- Returns:
- A ProvisionResponse object the should at least contain the response from the API
-
destroyInstance
This is the key method called to destroy / remove an instance. This should make the remote calls necessary to remove any assets associated with the instance.- Parameters:
instance
- to removeopts
- map of options- Returns:
- Response from API
-