Package com.morpheusdata.core.providers
Interface TaskProvider
- All Superinterfaces:
PluginProvider
- All Known Subinterfaces:
TaskProvider
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 Summary
Modifier and TypeMethodDescriptionexecuteContainerTask
(Workload workload, Task task) Task execution on a provisionedWorkload
executeContainerTask
(Workload workload, Task task, Map opts) Task execution on a provisionedWorkload
executeLocalTask
(Task task, Map opts, Workload workload, ComputeServer server, Instance instance) Task execution in a local contextexecuteRemoteTask
(Task task, Workload workload, ComputeServer server, Instance instance) Task execution in a remote contextexecuteRemoteTask
(Task task, Map opts, Workload workload, ComputeServer server, Instance instance) Task execution in a remote contextexecuteServerTask
(ComputeServer server, Task task) Task execution on a provisionedComputeServer
executeServerTask
(ComputeServer server, Task task, Map opts) Task execution on a provisionedComputeServer
getIcon()
Returns the Task Type Icon for display when a user is browsing tasksAdditional task configurationOptionType
getScope()
Deprecated.A flag indicating if the TaskType presents results that can be chained into other tasksA flag indicating if this task can be configured to execute on a remote contextA flag indicating if this task can be configured to execute on a remote contextA flag indicating if this task can be configured to execute on a resourceA flag indicating if this task can be configured to execute a script from a git repositoryA flag indicating if this task can be configured with ssh keysMethods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
-
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 configurationOptionType
- 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 executedopts
- contains the values of anyOptionType
that were defined for this taskworkload
- optionalWorkload
detailsserver
- optionalComputeServer
detailsinstance
- optionalInstance
details- Returns:
- the result of the task
-
executeServerTask
Task execution on a provisionedComputeServer
- Parameters:
server
- server detailstask
- Morpheus task to be executedopts
- contains the values of anyOptionType
that were defined for this task- Returns:
- the result of the task
-
executeServerTask
Task execution on a provisionedComputeServer
- Parameters:
server
-ComputeServer
detailstask
- Morpheus task to be executed- Returns:
- the result of the task
-
executeContainerTask
Task execution on a provisionedWorkload
- Parameters:
workload
-Workload
detailstask
- Morpheus task to be executedopts
- contains the values of anyOptionType
that were defined for this task- Returns:
- the result of the task
-
executeContainerTask
Task execution on a provisionedWorkload
- Parameters:
workload
-Workload
detailstask
- 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 executedopts
- contains the values of anyOptionType
that were defined for this taskworkload
- optionalWorkload
detailsserver
- optionalComputeServer
detailsinstance
- optionalInstance
details- Returns:
- the result of the task
-
executeRemoteTask
Task execution in a remote context- Parameters:
task
- Morpheus task to be executedworkload
- optionalWorkload
detailsserver
- optionalComputeServer
detailsinstance
- optionalInstance
details- Returns:
- the result of the task
-