brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [16/21] incubator-brooklyn git commit: Deletes deprecated CLI option —noShutdownOnExit
Date Sat, 01 Aug 2015 15:46:09 GMT
Deletes deprecated CLI option —noShutdownOnExit


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/54cbccca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/54cbccca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/54cbccca

Branch: refs/heads/master
Commit: 54cbccca514ef5d28b07f167958883d302f9202a
Parents: da33c3d
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Jul 29 17:19:01 2015 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Sat Aug 1 00:16:51 2015 +0100

----------------------------------------------------------------------
 .../entity/brooklynnode/BrooklynNode.java       |  8 --------
 .../brooklynnode/BrooklynNodeSshDriver.java     |  3 ---
 usage/cli/src/main/java/brooklyn/cli/Main.java  | 20 +-------------------
 .../cli/src/test/java/brooklyn/cli/CliTest.java |  5 ++---
 .../brooklyn/launcher/BrooklynLauncher.java     |  1 -
 5 files changed, 3 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/54cbccca/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNode.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNode.java b/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNode.java
index 669ac61..0f5b97f 100644
--- a/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNode.java
+++ b/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNode.java
@@ -235,14 +235,6 @@ public interface BrooklynNode extends SoftwareProcess, UsesJava {
     public static final ConfigKey<Duration> POLL_PERIOD = ConfigKeys.newConfigKey(Duration.class,
"brooklynnode.poll_period",
             "Frequency to poll for client sensors", Duration.seconds(2));
 
-    @Deprecated
-    /** @deprecated since 0.7.0  this flag is being replaced with the stopWhichAppsOnShutdown
flag; 
-     * if truly needed that could be represented here, but in general the hope is to remove
all such complexity, 
-     * so the better way if you really do need this is to use {@link #EXTRA_LAUNCH_PARAMETERS}
*/
-    @SetFromFlag("noShutdownOnExit")
-    public static final ConfigKey<Boolean> NO_SHUTDOWN_ON_EXIT = ConfigKeys.newBooleanConfigKey("brooklynnode.noshutdownonexit",

-        "Whether to pass the (deprecated) noShutdownOnExit flag to the process", false);
-
     public interface DeployBlueprintEffector {
         ConfigKey<Map<String,Object>> BLUEPRINT_CAMP_PLAN = new MapConfigKey<Object>(Object.class,
"blueprintPlan",
             "CAMP plan for the blueprint to be deployed; currently only supports Java map
or JSON string (not yet YAML)");

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/54cbccca/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
b/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
index 82a98d5..bd1a2d4 100644
--- a/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
+++ b/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
@@ -318,9 +318,6 @@ public class BrooklynNodeSshDriver extends JavaSoftwareProcessSshDriver
implemen
         if (getEntity().getAttribute(BrooklynNode.NO_WEB_CONSOLE_AUTHENTICATION)) {
             cmd += " --noConsoleSecurity";
         }
-        if (getEntity().getConfig(BrooklynNode.NO_SHUTDOWN_ON_EXIT)) {
-            cmd += " --noShutdownOnExit ";
-        }
         if (Strings.isNonBlank(getEntity().getConfig(BrooklynNode.EXTRA_LAUNCH_PARAMETERS)))
{
             cmd += " "+getEntity().getConfig(BrooklynNode.EXTRA_LAUNCH_PARAMETERS);
         }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/54cbccca/usage/cli/src/main/java/brooklyn/cli/Main.java
----------------------------------------------------------------------
diff --git a/usage/cli/src/main/java/brooklyn/cli/Main.java b/usage/cli/src/main/java/brooklyn/cli/Main.java
index 0fe5531..3fa7cf4 100644
--- a/usage/cli/src/main/java/brooklyn/cli/Main.java
+++ b/usage/cli/src/main/java/brooklyn/cli/Main.java
@@ -321,12 +321,6 @@ public class Main extends AbstractMain {
                     + "Can be used in combination with --persist auto --persistenceDir <custom
folder location> to attach to the running app at a later time.")
         public boolean exitAndLeaveAppsRunningAfterStarting = false;
 
-        /** @deprecated since 0.7.0 see {@link #stopWhichAppsOnShutdown} */
-        @Deprecated
-        @Option(name = { "-ns", "--noShutdownOnExit" },
-            description = "Deprecated synonym for `--stopOnShutdown none`")
-        public boolean noShutdownOnExit = false;
-        
         final static String PERSIST_OPTION = "--persist";
         protected final static String PERSIST_OPTION_DISABLED = "disabled";
         protected final static String PERSIST_OPTION_AUTO = "auto";
@@ -561,18 +555,7 @@ public class Main extends AbstractMain {
         
         protected StopWhichAppsOnShutdown computeStopWhichAppsOnShutdown() {
             boolean isDefault = STOP_THESE_IF_NOT_PERSISTED.equals(stopWhichAppsOnShutdown);
-            if (noShutdownOnExit) {
-                if (isDefault) {
-                    // the default; assume it was not explicitly specified so no error
-                    stopWhichAppsOnShutdown = STOP_NONE;
-                    // but warn of deprecation
-                    log.warn("Deprecated paramater `--noShutdownOnExit` detected; this will
likely be removed in a future version; "
-                        + "replace with `"+STOP_WHICH_APPS_ON_SHUTDOWN+" "+stopWhichAppsOnShutdown+"`");
-                    return StopWhichAppsOnShutdown.NONE;
-                } else {
-                    throw new FatalConfigurationRuntimeException("Cannot specify both `--noShutdownOnExit`
and `"+STOP_WHICH_APPS_ON_SHUTDOWN+"`");
-                }
-            } else if (exitAndLeaveAppsRunningAfterStarting && isDefault) {
+            if (exitAndLeaveAppsRunningAfterStarting && isDefault) {
                 return StopWhichAppsOnShutdown.NONE;
             } else {
                 return Enums.valueOfIgnoreCase(StopWhichAppsOnShutdown.class, stopWhichAppsOnShutdown).get();
@@ -823,7 +806,6 @@ public class Main extends AbstractMain {
                     .add("catalogReset", catalogReset)
                     .add("catalogForce", catalogForce)
                     .add("stopWhichAppsOnShutdown", stopWhichAppsOnShutdown)
-                    .add("noShutdownOnExit", noShutdownOnExit)
                     .add("stopOnKeyPress", stopOnKeyPress)
                     .add("localBrooklynProperties", localBrooklynProperties)
                     .add("persist", persist)

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/54cbccca/usage/cli/src/test/java/brooklyn/cli/CliTest.java
----------------------------------------------------------------------
diff --git a/usage/cli/src/test/java/brooklyn/cli/CliTest.java b/usage/cli/src/test/java/brooklyn/cli/CliTest.java
index 13b27c1..9bf173c 100644
--- a/usage/cli/src/test/java/brooklyn/cli/CliTest.java
+++ b/usage/cli/src/test/java/brooklyn/cli/CliTest.java
@@ -241,7 +241,7 @@ public class CliTest {
                 "--location", "localhost",
                 "--port", "1234",
                 "--bindAddress", "myhostname",
-                "--noConsole", "--noConsoleSecurity", "--noShutdownOnExit", "--stopOnKeyPress",

+                "--noConsole", "--noConsoleSecurity", "--stopOnKeyPress", 
                 "--localBrooklynProperties", "/path/to/myprops",
                 LaunchCommand.PERSIST_OPTION, LaunchCommand.PERSIST_OPTION_REBIND, 
                 "--persistenceDir", "/path/to/mypersist",
@@ -255,7 +255,6 @@ public class CliTest {
         assertTrue(details.contains("bindAddress=myhostname"), details);
         assertTrue(details.contains("noConsole=true"), details);
         assertTrue(details.contains("noConsoleSecurity=true"), details);
-        assertTrue(details.contains("noShutdownOnExit=true"), details);
         assertTrue(details.contains("stopOnKeyPress=true"), details);
         assertTrue(details.contains("localBrooklynProperties=/path/to/myprops"), details);
         assertTrue(details.contains("persist=rebind"), details);
@@ -274,7 +273,7 @@ public class CliTest {
         assertTrue(details.contains("port=null"), details);
         assertTrue(details.contains("noConsole=false"), details);
         assertTrue(details.contains("noConsoleSecurity=false"), details);
-        assertTrue(details.contains("noShutdownOnExit=false"), details);
+        assertTrue(details.contains("stopWhichAppsOnShutdown=theseIfNotPersisted"), details);
         assertTrue(details.contains("stopOnKeyPress=false"), details);
         assertTrue(details.contains("localBrooklynProperties=null"), details);
         assertTrue(details.contains("persist=disabled"), details);

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/54cbccca/usage/launcher/src/main/java/brooklyn/launcher/BrooklynLauncher.java
----------------------------------------------------------------------
diff --git a/usage/launcher/src/main/java/brooklyn/launcher/BrooklynLauncher.java b/usage/launcher/src/main/java/brooklyn/launcher/BrooklynLauncher.java
index a6db5f7..76ded17 100644
--- a/usage/launcher/src/main/java/brooklyn/launcher/BrooklynLauncher.java
+++ b/usage/launcher/src/main/java/brooklyn/launcher/BrooklynLauncher.java
@@ -946,7 +946,6 @@ public class BrooklynLauncher {
                         .configure(BrooklynNode.WEB_CONSOLE_PUBLIC_ADDRESS, publicAddress)
                         .configure(BrooklynNode.CLASSPATH, Splitter.on(":").splitToList(classpath))
                         .configure(BrooklynNode.NO_WEB_CONSOLE_AUTHENTICATION, Boolean.TRUE.equals(skipSecurityFilter))
-                        .configure(BrooklynNode.NO_SHUTDOWN_ON_EXIT, stopWhichAppsOnShutdown
== StopWhichAppsOnShutdown.NONE)
                         .displayName("Brooklyn Console"));
             }
         };


Mime
View raw message