brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [3/4] brooklyn-library git commit: DatastoreMixins.CanExecuteScript.COMMANDS: remove
Date Wed, 13 Sep 2017 12:35:44 GMT
DatastoreMixins.CanExecuteScript.COMMANDS: remove

Because entities extend this interface, they were reporting this as a
config key on the entity rather than just on the effector. Therefore
remove it as a constant.

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/0d59c30c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/0d59c30c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/0d59c30c

Branch: refs/heads/master
Commit: 0d59c30c6fe7d84cd9e9ce9fc84851cd4399ec6a
Parents: 021400c
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Sep 12 18:36:33 2017 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Tue Sep 12 18:36:33 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/entity/database/DatastoreMixins.java | 3 +--
 .../apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/0d59c30c/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
b/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
index def05a3..dc46f68 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/DatastoreMixins.java
@@ -58,10 +58,9 @@ public class DatastoreMixins {
     public static final Effector<String> EXECUTE_SCRIPT = CanExecuteScript.EXECUTE_SCRIPT;
     
     public static interface CanExecuteScript {
-        ConfigKey<String> COMMANDS = ConfigKeys.newStringConfigKey("commands");
         Effector<String> EXECUTE_SCRIPT = Effectors.effector(String.class, "executeScript")
             .description("executes the given script contents")
-            .parameter(COMMANDS)
+            .parameter(ConfigKeys.newStringConfigKey("commands"))
             .buildAbstract();
     }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/0d59c30c/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
index 9f8dc6d..7ba1ce0 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterUtils.java
@@ -37,7 +37,7 @@ public class MySqlClusterUtils {
 
     // Can't call node.executeScript directly, need to change execution context, so use an
effector task
     protected static Task<String> executeSqlOnNodeAsync(MySqlNode node, String commands)
{
-        return DynamicTasks.queue(Effectors.invocation(node, MySqlNode.EXECUTE_SCRIPT, ImmutableMap.of(CanExecuteScript.COMMANDS.getName(),
commands))).asTask();
+        return DynamicTasks.queue(Effectors.invocation(node, MySqlNode.EXECUTE_SCRIPT, ImmutableMap.of("commands",
commands))).asTask();
     }
 
     protected static String validateSqlParam(String config) {


Mime
View raw message