Interface ResourceProvisionProvider

All Superinterfaces:
PluginProvider, ProvisionProvider
All Known Subinterfaces:
CloudNativeProvisionProvider

public interface ResourceProvisionProvider extends ProvisionProvider
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
  • Method Details

    • validateInstance

      ServiceResponse validateInstance(Instance instance, Map opts)
      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 validate
      opts - 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 instance
      instanceRequest - the InstanceRequest object containing the various configurations to update the instance
      opts - 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 instance
      instanceRequest - 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 instance
      instanceRequest - 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 ProvisionResponse object the should at least contain the response from the API
    • destroyInstance

      ServiceResponse destroyInstance(Instance instance, Map opts)
      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 remove
      opts - map of options
      Returns:
      Response from API