[3/3] brooklyn-server git commit: This closes #281

2016-08-29 Thread heneveld
This closes #281


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

Branch: refs/heads/master
Commit: b1cafd85f0272b1f5624202993e84da93c83ad05
Parents: b70841f 6ff2aff
Author: Alex Heneveld 
Authored: Mon Aug 29 21:28:12 2016 +0100
Committer: Alex Heneveld 
Committed: Mon Aug 29 21:28:12 2016 +0100

--
 .../brooklyn/ConfigInheritanceYamlTest.java | 14 +--
 .../core/entity/BrooklynConfigKeys.java | 36 +---
 .../util/core/internal/ssh/ExecCmdAsserts.java  | 27 +-
 .../software/base/AbstractVanillaProcess.java   | 29 --
 .../entity/software/base/SoftwareProcess.java   |  6 ++
 .../software/base/VanillaWindowsProcess.java| 93 
 .../base/VanillaSoftwareProcessTest.java| 67 ++
 7 files changed, 186 insertions(+), 86 deletions(-)
--




[2/3] brooklyn-server git commit: Added tests for changed SoftwareProcess config inheritance

2016-08-29 Thread heneveld
Added tests for changed SoftwareProcess config inheritance


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/6ff2aff5
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/6ff2aff5
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/6ff2aff5

Branch: refs/heads/master
Commit: 6ff2aff5f59f69919ac746e5908f66089d1839d6
Parents: 4cc823c
Author: Andrew Donald Kennedy 
Authored: Sun Aug 28 22:37:58 2016 +0100
Committer: Andrew Donald Kennedy 
Committed: Sun Aug 28 22:37:58 2016 +0100

--
 .../brooklyn/ConfigInheritanceYamlTest.java | 14 +---
 .../util/core/internal/ssh/ExecCmdAsserts.java  | 27 +++-
 .../base/VanillaSoftwareProcessTest.java| 67 +++-
 3 files changed, 76 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/6ff2aff5/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigInheritanceYamlTest.java
--
diff --git 
a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigInheritanceYamlTest.java
 
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigInheritanceYamlTest.java
index b44bf70..fd4472c 100644
--- 
a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigInheritanceYamlTest.java
+++ 
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigInheritanceYamlTest.java
@@ -202,18 +202,6 @@ public class ConfigInheritanceYamlTest extends 
AbstractYamlTest {
 "  brooklyn.config:",
 "shell.env:",
 "  ENV1: myEnv1",
-"templates.preinstall:",
-"  "+emptyFile.toUri()+": myfile",
-"files.preinstall:",
-"  "+emptyFile.toUri()+": myfile",
-"templates.install:",
-"  "+emptyFile.toUri()+": myfile",
-"files.install:",
-"  "+emptyFile.toUri()+": myfile",
-"templates.runtime:",
-"  "+emptyFile.toUri()+": myfile",
-"files.runtime:",
-"  "+emptyFile.toUri()+": myfile",
 "provisioning.properties:",
 "  mykey: myval",
 "  templateOptions:",
@@ -227,7 +215,7 @@ public class ConfigInheritanceYamlTest extends 
AbstractYamlTest {
 assertEmptySoftwareProcessConfig(
 entity,
 ImmutableMap.of("ENV1", "myEnv1"),
-ImmutableMap.of(emptyFile.toUri().toString(), "myfile"),
+null,
 ImmutableMap.of("mykey", "myval", "templateOptions", 
ImmutableMap.of("myOptionsKey", "myOptionsVal")));
 }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/6ff2aff5/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ExecCmdAsserts.java
--
diff --git 
a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ExecCmdAsserts.java
 
b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ExecCmdAsserts.java
index f5fcab5..8aab3b0 100644
--- 
a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ExecCmdAsserts.java
+++ 
b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/ExecCmdAsserts.java
@@ -15,16 +15,17 @@
  */
 package org.apache.brooklyn.util.core.internal.ssh;
 
+import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
 import java.util.List;
 
-import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool.ExecCmd;
-
 import com.google.common.annotations.Beta;
 import com.google.common.base.Predicate;
 
+import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool.ExecCmd;
+
 @Beta
 public class ExecCmdAsserts {
 
@@ -83,6 +84,28 @@ public class ExecCmdAsserts {
 }
 }
 
+public static void assertExecHasNever(List actuals, String 
expectedCmd) {
+assertExecHasExactly(actuals, expectedCmd, 0);
+}
+
+public static void assertExecHasOnlyOnce(List actuals, String 
expectedCmd) {
+assertExecHasExactly(actuals, expectedCmd, 1);
+}
+
+public static void assertExecHasExactly(List actuals, String 
expectedCmd, int expectedCount) {
+String errMsg = "actuals="+actuals+"; expected="+expectedCmd;
+int count = 0;
+for (ExecCmd actual : actuals) {
+for (String subActual : actual.commands) {
+if (subActual.matches(expectedCmd)) {
+count++;
+  

[1/3] brooklyn-server git commit: Prevent vanilla process commands from being inherited by children

2016-08-29 Thread heneveld
Repository: brooklyn-server
Updated Branches:
  refs/heads/master b70841f72 -> b1cafd85f


Prevent vanilla process commands from being inherited by children


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/4cc823c2
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/4cc823c2
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/4cc823c2

Branch: refs/heads/master
Commit: 4cc823c2c311f86c8785ae863f017c9bd65d997f
Parents: 50d5bee
Author: Andrew Donald Kennedy 
Authored: Fri Jul 29 09:16:21 2016 +0100
Committer: Andrew Donald Kennedy 
Committed: Sun Aug 28 22:23:21 2016 +0100

--
 .../core/entity/BrooklynConfigKeys.java | 36 +---
 .../software/base/AbstractVanillaProcess.java   | 29 --
 .../entity/software/base/SoftwareProcess.java   |  6 ++
 .../software/base/VanillaWindowsProcess.java| 93 
 4 files changed, 110 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/4cc823c2/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java 
b/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
index 3530760..21db6f0 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java
@@ -99,18 +99,30 @@ public class BrooklynConfigKeys {
 public static final ConfigKey SKIP_ENTITY_INSTALLATION = 
newBooleanConfigKey("install.skip", "Skip the driver install commands entirely, 
for pre-installed software");
 
 // The implementation in AbstractSoftwareSshDriver runs this command as an 
SSH command 
-public static final ConfigKey PRE_INSTALL_COMMAND = 
ConfigKeys.newStringConfigKey("pre.install.command",
-"Command to be run prior to the install method being called on the 
driver");
-public static final ConfigKey POST_INSTALL_COMMAND = 
ConfigKeys.newStringConfigKey("post.install.command",
-"Command to be run after the install method being called on the 
driver");
-public static final ConfigKey PRE_CUSTOMIZE_COMMAND = 
ConfigKeys.newStringConfigKey("pre.customize.command",
-"Command to be run prior to the customize method being called on 
the driver");
-public static final ConfigKey POST_CUSTOMIZE_COMMAND = 
ConfigKeys.newStringConfigKey("post.customize.command",
-"Command to be run after the customize method being called on the 
driver");
-public static final ConfigKey PRE_LAUNCH_COMMAND = 
ConfigKeys.newStringConfigKey("pre.launch.command",
-"Command to be run prior to the launch method being called on the 
driver");
-public static final ConfigKey POST_LAUNCH_COMMAND = 
ConfigKeys.newStringConfigKey("post.launch.command",
-"Command to be run after the launch method being called on the 
driver");
+public static final ConfigKey PRE_INSTALL_COMMAND = 
ConfigKeys.builder(String.class, "pre.install.command")
+.description("Command to be run prior to the install method being 
called on the driver")
+.parentInheritance(ConfigInheritance.NONE)
+.build();
+public static final ConfigKey POST_INSTALL_COMMAND = 
ConfigKeys.builder(String.class, "post.install.command")
+.description("Command to be run after the install method being 
called on the driver")
+.parentInheritance(ConfigInheritance.NONE)
+.build();
+public static final ConfigKey PRE_CUSTOMIZE_COMMAND = 
ConfigKeys.builder(String.class, "pre.customize.command")
+.description("Command to be run prior to the customize method 
being called on the driver")
+.parentInheritance(ConfigInheritance.NONE)
+.build();
+public static final ConfigKey POST_CUSTOMIZE_COMMAND = 
ConfigKeys.builder(String.class, "post.customize.command")
+.description("Command to be run after the customize method being 
called on the driver")
+.parentInheritance(ConfigInheritance.NONE)
+.build();
+public static final ConfigKey PRE_LAUNCH_COMMAND = 
ConfigKeys.builder(String.class, "pre.launch.command")
+.description("Command to be run prior to the launch method being 
called on the driver")
+.parentInheritance(ConfigInheritance.NONE)
+.build();
+public static final ConfigKey POST_LAUNCH_COMMAND = 
ConfigKeys.builder(String.class, "post.launch.command")
+.description("Command to be run after the launch 

[3/3] brooklyn-server git commit: This closes #280

2016-08-29 Thread grkvlt
This closes #280

* github/pr/280:
  Added test for entitySpec default usage in YAML parameters
  Add special flag decoration to parameters to enable EntitySpec values


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

Branch: refs/heads/master
Commit: b70841f722e1846f4361ea8f7c47455268c2ecb0
Parents: 196ce93 94ec61d
Author: Andrew Donald Kennedy 
Authored: Mon Aug 29 11:52:04 2016 +0100
Committer: Andrew Donald Kennedy 
Committed: Mon Aug 29 11:52:04 2016 +0100

--
 .../BrooklynComponentTemplateResolver.java  | 10 ++--
 .../BrooklynEntityDecorationResolver.java   | 17 ---
 .../spi/creation/CampInternalUtils.java |  2 +-
 .../camp/brooklyn/ConfigParametersYamlTest.java | 51 +---
 .../brooklyn/core/objs/BasicSpecParameter.java  | 13 +++--
 .../objs/BasicSpecParameterFromListTest.java|  2 +-
 6 files changed, 69 insertions(+), 26 deletions(-)
--




[1/3] brooklyn-server git commit: Added test for entitySpec default usage in YAML parameters

2016-08-29 Thread grkvlt
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 196ce93a6 -> b70841f72


Added test for entitySpec default usage in YAML parameters


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/94ec61dd
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/94ec61dd
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/94ec61dd

Branch: refs/heads/master
Commit: 94ec61dd0d5a8e1e197aa3bf2b7c8947964c3077
Parents: 874fa26
Author: Andrew Donald Kennedy 
Authored: Fri Aug 12 02:53:17 2016 +0100
Committer: Andrew Donald Kennedy 
Committed: Mon Aug 29 11:51:23 2016 +0100

--
 .../camp/brooklyn/ConfigParametersYamlTest.java | 51 +---
 1 file changed, 43 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/94ec61dd/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigParametersYamlTest.java
--
diff --git 
a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigParametersYamlTest.java
 
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigParametersYamlTest.java
index f187b6c..623ff16 100644
--- 
a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigParametersYamlTest.java
+++ 
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigParametersYamlTest.java
@@ -20,31 +20,35 @@ package org.apache.brooklyn.camp.brooklyn;
 
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
 
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import com.google.api.client.repackaged.com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Iterables;
+
 import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.api.entity.EntitySpec;
 import org.apache.brooklyn.api.location.PortRange;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.ConfigKeys;
 import org.apache.brooklyn.core.test.entity.TestEntity;
 import org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess;
+import org.apache.brooklyn.entity.stock.BasicApplication;
 import org.apache.brooklyn.test.Asserts;
 import org.apache.brooklyn.util.collections.MutableList;
 import org.apache.brooklyn.util.core.internal.ssh.ExecCmdAsserts;
 import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool;
 import org.apache.brooklyn.util.core.internal.ssh.RecordingSshTool.ExecCmd;
 import org.apache.brooklyn.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.api.client.repackaged.com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
 
 public class ConfigParametersYamlTest extends AbstractYamlTest {
 @SuppressWarnings("unused")
@@ -398,4 +402,35 @@ public class ConfigParametersYamlTest extends 
AbstractYamlTest {
 
assertEquals(entity.getEntityType().getConfigKey(keyName).getType(), 
entry.getValue());
 }
 }
+
+@Test
+public void testConfigParameterWithEntitySpecAsDefault() throws Exception {
+addCatalogItems(
+"brooklyn.catalog:",
+"  itemType: entity",
+"  items:",
+"  - id: entity-with-keys",
+"item:",
+"  type: "+TestEntity.class.getName(),
+"  brooklyn.parameters:",
+"  - name: my.param.key",
+"type: "+EntitySpec.class.getName(),
+"default: ",
+"  $brooklyn:entitySpec:",
+"  - type: "+BasicApplication.class.getName());
+
+String yaml = Joiner.on("\n").join(
+"services:",
+"- type: entity-with-keys");
+
+Entity app = createStartWaitAndLogApplication(yaml);
+TestEntity entity = (TestEntity) 
Iterables.getOnlyElement(app.getChildren());
+
+Object defaultVal = 
entity.config().get(entity.getEntityType().getConfigKey("my.param.key"));
+assertTrue(defaultVal instanceof EntitySpec, "defaultVal="+defaultVal);
+assertEquals(((EntitySpec)defaultVal).getType(), 
BasicApplication.class, "defaultVal="+defaultVal);
+
+Entity child = 

[1/2] brooklyn-server git commit: BROOKLYN-338: BrooklynApi fixes for karaf

2016-08-29 Thread svet
Repository: brooklyn-server
Updated Branches:
  refs/heads/master c95d6ff86 -> 196ce93a6


BROOKLYN-338: BrooklynApi fixes for karaf

These aren’t enough to fix BROOKLYN-338, but it’s a start:
* Ensures rest-client imports the resteasy marshallers package,
  which it calls with reflection (via the resteasy ProxyBuilder).
* Passes the ProxyBuilder a classloader that has access to the
  rest-api classes and to rest-client’s classloader (which thus
  can access the marshallers).


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/16eb543c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/16eb543c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/16eb543c

Branch: refs/heads/master
Commit: 16eb543c6d158deee11dae4613eb5706cb304364
Parents: 375bb88
Author: Aled Sage 
Authored: Tue Aug 23 23:35:47 2016 +0100
Committer: Aled Sage 
Committed: Mon Aug 29 09:35:27 2016 +0100

--
 rest/rest-client/pom.xml| 17 -
 .../brooklyn/rest/client/BrooklynApi.java   | 20 +---
 2 files changed, 33 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/16eb543c/rest/rest-client/pom.xml
--
diff --git a/rest/rest-client/pom.xml b/rest/rest-client/pom.xml
index 069bce5..2984331 100644
--- a/rest/rest-client/pom.xml
+++ b/rest/rest-client/pom.xml
@@ -144,5 +144,20 @@
 test
 
 
-
+
+
+
+
+org.apache.felix
+maven-bundle-plugin
+true
+
+
+
*,org.jboss.resteasy.client.core.marshallers
+
+
+
+
+
+
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/16eb543c/rest/rest-client/src/main/java/org/apache/brooklyn/rest/client/BrooklynApi.java
--
diff --git 
a/rest/rest-client/src/main/java/org/apache/brooklyn/rest/client/BrooklynApi.java
 
b/rest/rest-client/src/main/java/org/apache/brooklyn/rest/client/BrooklynApi.java
index d222e39..822e296 100644
--- 
a/rest/rest-client/src/main/java/org/apache/brooklyn/rest/client/BrooklynApi.java
+++ 
b/rest/rest-client/src/main/java/org/apache/brooklyn/rest/client/BrooklynApi.java
@@ -43,9 +43,11 @@ import org.apache.http.impl.client.HttpClients;
 import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.jboss.resteasy.client.ClientExecutor;
 import org.jboss.resteasy.client.ClientResponse;
-import org.jboss.resteasy.client.ProxyFactory;
+import org.jboss.resteasy.client.ProxyBuilder;
 import org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor;
+import org.jboss.resteasy.client.core.extractors.DefaultEntityExtractorFactory;
 import org.jboss.resteasy.specimpl.BuiltResponse;
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
 import org.jboss.resteasy.util.GenericType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -68,9 +70,10 @@ import org.apache.brooklyn.rest.api.ServerApi;
 import org.apache.brooklyn.rest.api.UsageApi;
 import org.apache.brooklyn.rest.api.VersionApi;
 import org.apache.brooklyn.rest.client.util.http.BuiltResponsePreservingError;
+import org.apache.brooklyn.util.collections.MutableMap;
 import org.apache.brooklyn.util.exceptions.Exceptions;
+import org.apache.brooklyn.util.javalang.AggregateClassLoader;
 import org.apache.brooklyn.util.net.Urls;
-import org.apache.brooklyn.util.os.Os;
 
 import io.swagger.annotations.ApiOperation;
 
@@ -265,7 +268,18 @@ public class BrooklynApi {
 
 @SuppressWarnings("unchecked")
 private  T proxy(Class clazz) {
-final T result0 = ProxyFactory.create(clazz, target, clientExecutor);
+AggregateClassLoader aggregateClassLoader =  
AggregateClassLoader.newInstanceWithNoLoaders();
+aggregateClassLoader.addLast(clazz.getClassLoader());
+aggregateClassLoader.addLast(getClass().getClassLoader());
+
+final T result0 = ProxyBuilder.build(clazz, target)
+.executor(clientExecutor)
+.classloader(aggregateClassLoader)
+.providerFactory(ResteasyProviderFactory.getInstance())
+.extractorFactory(new DefaultEntityExtractorFactory())
+.requestAttributes(MutableMap.of())
+.now();
+
 return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new 
Class[] { clazz }, new InvocationHandler() {
 @Override
 public Object invoke(Object proxy, Method method, Object[] args) 
throws 

[2/2] brooklyn-server git commit: Closes #305

2016-08-29 Thread svet
Closes #305

BROOKLYN-338: BrooklynApi fixes for karaf

These aren’t enough to fix BROOKLYN-338, but it’s a start:
* Ensures rest-client imports the resteasy marshallers package,
  which it calls with reflection (via the resteasy ProxyBuilder).
* Passes the ProxyBuilder a classloader that has access to the
  rest-api classes and to rest-client’s classloader (which thus
  can access the marshallers).


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/196ce93a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/196ce93a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/196ce93a

Branch: refs/heads/master
Commit: 196ce93a6c1d60eb3fbf424a017c7a6e3bbf7ca5
Parents: c95d6ff 16eb543
Author: Svetoslav Neykov 
Authored: Mon Aug 29 13:30:42 2016 +0300
Committer: Svetoslav Neykov 
Committed: Mon Aug 29 13:30:42 2016 +0300

--
 rest/rest-client/pom.xml| 17 -
 .../brooklyn/rest/client/BrooklynApi.java   | 20 +---
 2 files changed, 33 insertions(+), 4 deletions(-)
--




[2/2] brooklyn-docs git commit: Closes #101

2016-08-29 Thread svet
Closes #101

Add instructions on how to change default Karaf credentials


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

Branch: refs/heads/master
Commit: a77ce616b8c56791041a9ba7ea3d3e845d69f72b
Parents: 7df5569 0060d25
Author: Svetoslav Neykov 
Authored: Mon Aug 29 12:30:08 2016 +0300
Committer: Svetoslav Neykov 
Committed: Mon Aug 29 12:30:08 2016 +0300

--
 guide/ops/production-installation.md | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/a77ce616/guide/ops/production-installation.md
--



[1/2] brooklyn-docs git commit: Add instruction on how to change default Karaf credentials

2016-08-29 Thread svet
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 7df556977 -> a77ce616b


Add instruction on how to change default Karaf credentials


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/0060d25a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/0060d25a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/0060d25a

Branch: refs/heads/master
Commit: 0060d25a8994f7d76c955f57cd080b01a1da5e4e
Parents: 1679a90
Author: Svetoslav Neykov 
Authored: Wed Aug 24 17:42:01 2016 +0300
Committer: Svetoslav Neykov 
Committed: Wed Aug 24 19:01:43 2016 +0300

--
 guide/ops/production-installation.md | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/0060d25a/guide/ops/production-installation.md
--
diff --git a/guide/ops/production-installation.md 
b/guide/ops/production-installation.md
index 3748712..d5cf3e6 100644
--- a/guide/ops/production-installation.md
+++ b/guide/ops/production-installation.md
@@ -10,6 +10,7 @@ To install Apache Brooklyn on a production server:
 1. [Set up the prerequisites](#prerequisites)
 1. [Download Apache Brooklyn](#download)
 1. [Configuring brooklyn.properties](#configuring-properties)
+1. [Configuring Karaf Security](#configuring-karaf-security)
 1. [Configuring default.catalog.bom](#configuring-catalog)
 1. [Test the installation](#confirm)
 
@@ -81,6 +82,13 @@ It may be useful to use the following script to install an 
initial `brooklyn.pro
 % chmod 600 ~/.brooklyn/brooklyn.properties
 {% endhighlight %}
 
+### Configuring Karaf Security
+
+Out of the box, Apache Brooklyn includes the default Karaf security 
configuration.
+This configuration is used to manage connections to the ssh port of Karaf
+(which is available to localhost connections only).
+It is recommended that you update the credentials as detailed in the
+[Karaf 
Security](https://karaf.apache.org/manual/latest/security#_users_groups_roles_and_passwords)
 page.
 
 ### Configuring the Catalog
 



[1/2] brooklyn-server git commit: Do not inherit entity config defaultDisplayName

2016-08-29 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 50d5beeed -> c95d6ff86


Do not inherit entity config defaultDisplayName


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

Branch: refs/heads/master
Commit: dc2e14e596674e62a179edfd1fe883a897885d54
Parents: 9238a10
Author: Valentin Aitken 
Authored: Sat Aug 27 18:11:32 2016 +0300
Committer: Valentin Aitken 
Committed: Sat Aug 27 18:24:05 2016 +0300

--
 .../brooklyn/core/entity/AbstractEntity.java|  4 +++-
 .../brooklyn/core/entity/EntityNameTest.java| 21 
 2 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dc2e14e5/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java 
b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
index 49c1967..dc70034 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
@@ -27,6 +27,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.brooklyn.config.ConfigInheritance;
+import org.apache.brooklyn.core.config.BasicConfigKey;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -154,7 +156,7 @@ public abstract class AbstractEntity extends 
AbstractBrooklynObject implements E
 /**
  * The default name to use for this entity, if not explicitly overridden.
  */
-public static final ConfigKey DEFAULT_DISPLAY_NAME = 
ConfigKeys.newStringConfigKey("defaultDisplayName");
+public static final ConfigKey DEFAULT_DISPLAY_NAME = 
BasicConfigKey.builder(String.class).name("defaultDisplayName").parentInheritance(ConfigInheritance.NONE).build();
 
 public static final BasicNotificationSensor LOCATION_ADDED = new 
BasicNotificationSensor(
 Location.class, "entity.location.added", "Location dynamically 
added to entity");

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dc2e14e5/core/src/test/java/org/apache/brooklyn/core/entity/EntityNameTest.java
--
diff --git 
a/core/src/test/java/org/apache/brooklyn/core/entity/EntityNameTest.java 
b/core/src/test/java/org/apache/brooklyn/core/entity/EntityNameTest.java
index 1800095..ca94807 100644
--- a/core/src/test/java/org/apache/brooklyn/core/entity/EntityNameTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/entity/EntityNameTest.java
@@ -20,12 +20,15 @@ package org.apache.brooklyn.core.entity;
 
 import static org.testng.Assert.assertEquals;
 
+import com.google.common.collect.Iterables;
+import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.entity.EntitySpec;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
 import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
 import org.apache.brooklyn.core.test.entity.TestApplication;
 import org.apache.brooklyn.core.test.entity.TestEntity;
+import org.apache.brooklyn.entity.stock.BasicApplication;
 import org.apache.brooklyn.util.core.task.DeferredSupplier;
 import org.testng.annotations.Test;
 
@@ -70,17 +73,27 @@ public class EntityNameTest extends 
BrooklynAppUnitTestSupport {
 TestEntity entity = app.addChild(spec);
 assertEquals(entity.getDisplayName(), "myDefaultName");
 }
-
-
+
 @Test
 public void testAppUsesDefaultDisplayName() {
 EntitySpec appSpec = 
EntitySpec.create(TestApplication.class)
 .configure(AbstractApplication.DEFAULT_DISPLAY_NAME, 
"myDefaultName");
 TestApplication app2 = ApplicationBuilder.newManagedApp(appSpec, mgmt);
-
+
 assertEquals(app2.getDisplayName(), "myDefaultName");
 }
-
+
+@Test
+public void testAppUsesEntityName() {
+EntitySpec appSpec = 
EntitySpec.create(BasicApplication.class)
+.configure(AbstractApplication.DEFAULT_DISPLAY_NAME, 
"myDefaultName").child(EntitySpec.create(TestApplication.class));
+BasicApplication app2 = ApplicationBuilder.newManagedApp(appSpec, 
mgmt);
+
+assertEquals(app2.getDisplayName(), "myDefaultName");
+Entity childEntity = Iterables.getFirst(app2.getChildren(), null);
+

[2/2] brooklyn-server git commit: This closes #309

2016-08-29 Thread aledsage
This closes #309


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

Branch: refs/heads/master
Commit: c95d6ff86c23b8eb6cdaa01f25248b2d0d725438
Parents: 50d5bee dc2e14e
Author: Aled Sage 
Authored: Mon Aug 29 09:54:46 2016 +0100
Committer: Aled Sage 
Committed: Mon Aug 29 09:54:46 2016 +0100

--
 .../brooklyn/core/entity/AbstractEntity.java|  4 +++-
 .../brooklyn/core/entity/EntityNameTest.java| 21 
 2 files changed, 20 insertions(+), 5 deletions(-)
--