You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ge...@apache.org on 2018/04/19 12:51:28 UTC
[3/3] brooklyn-server git commit: Closes #953
Closes #953
Defers reading of config in SshCommandSensor
This allows DSL to be used in the command, env and execution dir as
a management context will then be available
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/9a13fff4
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/9a13fff4
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/9a13fff4
Branch: refs/heads/master
Commit: 9a13fff41de47001d3de5fa9cb0ae8b2e8aad4b7
Parents: 30ce7fa 4e5dfc3
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Authored: Thu Apr 19 13:51:15 2018 +0100
Committer: Geoff Macartney <ge...@cloudsoftcorp.com>
Committed: Thu Apr 19 13:51:15 2018 +0100
----------------------------------------------------------------------
.../camp/brooklyn/SshCommandSensorYamlTest.java | 41 +++++++++++++++++++-
.../core/sensor/ssh/SshCommandSensor.java | 13 ++-----
.../apache/brooklyn/feed/CommandPollConfig.java | 8 ++--
3 files changed, 49 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/9a13fff4/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
index 6224ed3,27a7d9f..5ec9d22
--- a/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
+++ b/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
@@@ -70,13 -70,8 +70,10 @@@ public final class SshCommandSensor<T>
public static final ConfigKey<String> SENSOR_EXECUTION_DIR = ConfigKeys.newStringConfigKey("executionDir", "Directory where the command should run; "
+ "if not supplied, executes in the entity's run dir (or home dir if no run dir is defined); "
+ "use '~' to always execute in the home dir, or 'custom-feed/' to execute in a custom-feed dir relative to the run dir");
+ public static final ConfigKey<Object> VALUE_ON_ERROR = ConfigKeys.newConfigKey(Object.class, "value.on.error",
+ "Value to be used if an error occurs whilst executing the ssh command", null);
public static final MapConfigKey<Object> SENSOR_SHELL_ENVIRONMENT = BrooklynConfigKeys.SHELL_ENVIRONMENT;
- protected final String command;
- protected final String executionDir;
- protected final Map<String,Object> sensorEnv;
public SshCommandSensor(final ConfigBag params) {
super(params);