Interface TaskProvider

All Superinterfaces:
PluginProvider
All Known Subinterfaces:
TaskProvider

public interface TaskProvider extends PluginProvider
Provides a standard set of methods for interacting with cloud integrations or on-prem service providers. This includes syncing assets related to things like VirtualMachines or Containers for various cloud types. For integrating with actual provisioning a ProvisionProvider is also available.
Since:
0.15.1
  • Method Details

    • getService

      Deprecated.
      A service class containing task execution logic This interface is deprecated as the methods have been rolled up into the TaskProvider interface
      Returns:
      a task service
    • getScope

      TaskType.TaskScope getScope()
    • getDescription

      String getDescription()
    • isAllowExecuteLocal

      Boolean isAllowExecuteLocal()
      A flag indicating if this task can be configured to execute on a remote context
      Returns:
      boolean
    • isAllowExecuteRemote

      Boolean isAllowExecuteRemote()
      A flag indicating if this task can be configured to execute on a remote context
      Returns:
      boolean
    • isAllowExecuteResource

      Boolean isAllowExecuteResource()
      A flag indicating if this task can be configured to execute on a resource
      Returns:
      boolean
    • isAllowLocalRepo

      Boolean isAllowLocalRepo()
      A flag indicating if this task can be configured to execute a script from a git repository
      Returns:
      boolean
    • isAllowRemoteKeyAuth

      Boolean isAllowRemoteKeyAuth()
      A flag indicating if this task can be configured with ssh keys
      Returns:
      boolean
    • hasResults

      Boolean hasResults()
      A flag indicating if the TaskType presents results that can be chained into other tasks
      Returns:
    • getOptionTypes

      List<OptionType> getOptionTypes()
      Additional task configuration OptionType
      Returns:
      a List of OptionType
    • getIcon

      Icon getIcon()
      Returns the Task Type Icon for display when a user is browsing tasks
      Returns:
      Icon representation of assets stored in the src/assets of the project.
      Since:
      0.12.7
    • executeLocalTask

      TaskResult executeLocalTask(Task task, Map opts, Workload workload, ComputeServer server, Instance instance)
      Task execution in a local context
      Parameters:
      task - Morpheus task to be executed
      opts - contains the values of any OptionType that were defined for this task
      workload - optional Workload details
      server - optional ComputeServer details
      instance - optional Instance details
      Returns:
      the result of the task
    • executeServerTask

      TaskResult executeServerTask(ComputeServer server, Task task, Map opts)
      Task execution on a provisioned ComputeServer
      Parameters:
      server - server details
      task - Morpheus task to be executed
      opts - contains the values of any OptionType that were defined for this task
      Returns:
      the result of the task
    • executeServerTask

      TaskResult executeServerTask(ComputeServer server, Task task)
      Task execution on a provisioned ComputeServer
      Parameters:
      server - ComputeServer details
      task - Morpheus task to be executed
      Returns:
      the result of the task
    • executeContainerTask

      TaskResult executeContainerTask(Workload workload, Task task, Map opts)
      Task execution on a provisioned Workload
      Parameters:
      workload - Workload details
      task - Morpheus task to be executed
      opts - contains the values of any OptionType that were defined for this task
      Returns:
      the result of the task
    • executeContainerTask

      TaskResult executeContainerTask(Workload workload, Task task)
      Task execution on a provisioned Workload
      Parameters:
      workload - Workload details
      task - Morpheus task to be executed
      Returns:
      the result of the task
    • executeRemoteTask

      TaskResult executeRemoteTask(Task task, Map opts, Workload workload, ComputeServer server, Instance instance)
      Task execution in a remote context
      Parameters:
      task - Morpheus task to be executed
      opts - contains the values of any OptionType that were defined for this task
      workload - optional Workload details
      server - optional ComputeServer details
      instance - optional Instance details
      Returns:
      the result of the task
    • executeRemoteTask

      TaskResult executeRemoteTask(Task task, Workload workload, ComputeServer server, Instance instance)
      Task execution in a remote context
      Parameters:
      task - Morpheus task to be executed
      workload - optional Workload details
      server - optional ComputeServer details
      instance - optional Instance details
      Returns:
      the result of the task