Class: HybridPlatformsConductor::HpcPlugins::Action::Interactive
- Defined in:
- lib/hybrid_platforms_conductor/hpc_plugins/action/interactive.rb
Overview
Execute an interactive session on the remote node
Constant Summary
Constants included from LoggerHelpers
LoggerHelpers::LEVELS_MODIFIERS, LoggerHelpers::LEVELS_TO_STDERR
Instance Method Summary collapse
-
#execute ⇒ Object
Execute the action [API] - This method is mandatory [API] - @cmd_runner is accessible [API] - @actions_executor is accessible [API] - @action_info is accessible with the action details [API] - @node (String) can be used to know on which node the action is to be executed [API] - @connector (Connector or nil) can be used to access the node’s connector if the action needs remote connection [API] - @timeout (Integer) should be used to make sure the action execution does not get past this number of seconds [API] - @stdout_io can be used to log stdout messages [API] - @stderr_io can be used to log stderr messages [API] - run_cmd(String) method can be used to execute a command.
-
#need_connector? ⇒ Boolean
Do we need a connector to execute this action on a node?.
Methods inherited from Action
Methods inherited from Plugin
extend_config_dsl_with, #initialize, valid?
Methods included from LoggerHelpers
#err, #init_loggers, #log_component=, #log_debug?, #log_level=, #out, #section, #set_loggers_format, #stderr_device, #stderr_device=, #stderr_displayed?, #stdout_device, #stdout_device=, #stdout_displayed?, #stdouts_to_s, #with_progress_bar
Constructor Details
This class inherits a constructor from HybridPlatformsConductor::Action
Instance Method Details
#execute ⇒ Object
Execute the action
- API
-
This method is mandatory
-
- API
-
@cmd_runner is accessible
-
- API
-
@actions_executor is accessible
-
- API
-
@action_info is accessible with the action details
-
- API
-
@node (String) can be used to know on which node the action is to be executed
-
- API
-
@connector (Connector or nil) can be used to access the node’s connector if the action needs remote connection
-
- API
-
@timeout (Integer) should be used to make sure the action execution does not get past this number of seconds
-
- API
-
@stdout_io can be used to log stdout messages
-
- API
-
@stderr_io can be used to log stderr messages
-
- API
-
run_cmd(String) method can be used to execute a command. See CmdRunner#run_cmd to know about the result’s signature.
-
29 30 31 32 33 34 35 36 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/action/interactive.rb', line 29 def execute log_debug "[#{@node}] - Run interactive remote session..." if @cmd_runner.dry_run log_debug "[#{@node}] - Won't execute interactive shell in dry_run mode." else @connector.remote_interactive end end |
#need_connector? ⇒ Boolean
Do we need a connector to execute this action on a node?
- Result
-
Boolean: Do we need a connector to execute this action on a node?
14 15 16 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/action/interactive.rb', line 14 def need_connector? true end |