[1/2] incubator-brooklyn git commit: Fix docs typo
Repository: incubator-brooklyn Updated Branches: refs/heads/master 286448623 -> dff30144d Fix docs typo Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/e4fa88ad Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/e4fa88ad Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/e4fa88ad Branch: refs/heads/master Commit: e4fa88adbac7dc9aa531bb65dbb70b3d3a7f274e Parents: 2864486 Author: SvetAuthored: Wed Jan 6 15:57:17 2016 +0200 Committer: Svet Committed: Wed Jan 6 15:57:17 2016 +0200 -- brooklyn-docs/guide/ops/persistence/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e4fa88ad/brooklyn-docs/guide/ops/persistence/index.md -- diff --git a/brooklyn-docs/guide/ops/persistence/index.md b/brooklyn-docs/guide/ops/persistence/index.md index 4788db9..02c05ff 100644 --- a/brooklyn-docs/guide/ops/persistence/index.md +++ b/brooklyn-docs/guide/ops/persistence/index.md @@ -104,7 +104,7 @@ providers, see [jclouds](http://jclouds.apache.org/reference/providers/#blobstor To configure the Object Store, add the credentials to `~/.brooklyn/brooklyn.properties` such as: {% highlight properties %} -brooklyn.location.named.aws-s3-eu-west-1:aws-s3:eu-west-1 +brooklyn.location.named.aws-s3-eu-west-1=aws-s3:eu-west-1 brooklyn.location.named.aws-s3-eu-west-1.identity=ABCDEFGHIJKLMNOPQRSTU brooklyn.location.named.aws-s3-eu-west-1.credential=abcdefghijklmnopqrstuvwxyz1234567890ab/c {% endhighlight %}
[7/8] incubator-brooklyn git commit: Merge pull request #2 from aledsage/googlielmo/feature/deferred-supplier-persistence-aled
Merge pull request #2 from aledsage/googlielmo/feature/deferred-supplier-persistence-aled More yaml AttributeWhenReady tests Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/ca6f6658 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/ca6f6658 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/ca6f6658 Branch: refs/heads/master Commit: ca6f6658293a502ae32517a42277a4709e5cfc3d Parents: d09147f 9504022 Author: Guglielmo NigriAuthored: Wed Dec 30 19:31:23 2015 +0100 Committer: Guglielmo Nigri Committed: Wed Dec 30 19:31:23 2015 +0100 -- .../camp/brooklyn/DslAndRebindYamlTest.java | 261 ++- 1 file changed, 138 insertions(+), 123 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ca6f6658/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java --
[1/8] incubator-brooklyn git commit: Test correct persistence of attributeWhenReady
Repository: incubator-brooklyn Updated Branches: refs/heads/master e300cf33c -> 7bcb3920d Test correct persistence of attributeWhenReady Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/68d8018a Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/68d8018a Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/68d8018a Branch: refs/heads/master Commit: 68d8018ae7c71df69006271a2a4c31e0f5350461 Parents: cd504e2 Author: Guglielmo NigriAuthored: Tue Dec 22 16:43:22 2015 +0100 Committer: Guglielmo Nigri Committed: Tue Dec 29 12:23:48 2015 +0100 -- .../brooklyn/camp/brooklyn/DslAndRebindYamlTest.java | 15 +++ 1 file changed, 15 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/68d8018a/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java -- diff --git a/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java b/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java index 31a7951..8f0f560 100644 --- a/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java +++ b/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java @@ -27,6 +27,7 @@ import org.apache.brooklyn.api.entity.Entity; import org.apache.brooklyn.api.mgmt.ManagementContext; import org.apache.brooklyn.api.sensor.AttributeSensor; import org.apache.brooklyn.api.sensor.Sensor; +import org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier; import org.apache.brooklyn.config.ConfigKey; import org.apache.brooklyn.core.config.ConfigKeys; import org.apache.brooklyn.core.entity.Attributes; @@ -39,6 +40,7 @@ import org.apache.brooklyn.core.test.entity.TestEntity; import org.apache.brooklyn.test.EntityTestUtils; import org.apache.brooklyn.util.collections.MutableSet; import org.apache.brooklyn.util.core.task.Tasks; +import org.apache.brooklyn.util.guava.Maybe; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -124,6 +126,19 @@ public class DslAndRebindYamlTest extends AbstractYamlTest { } @Test +public void testDslAttributeWhenReadyPersisted() throws Exception { +Entity testEntity = entityWithAttributeWhenReady(); +Application app2 = rebind(testEntity.getApplication()); +Entity e2 = Iterables.getOnlyElement( app2.getChildren() ); + +Maybe maybe = ((EntityInternal)e2).config().getLocalRaw(TestEntity.CONF_NAME); +Assert.assertTrue(maybe.isPresentAndNonNull()); + Assert.assertTrue(BrooklynDslDeferredSupplier.class.isInstance(maybe.get())); +BrooklynDslDeferredSupplier deferredSupplier = (BrooklynDslDeferredSupplier) maybe.get(); +Assert.assertEquals(deferredSupplier.toString(), "$brooklyn:entity(\"x\").attributeWhenReady(\"foo\")"); +} + +@Test public void testDslAttributeWhenReadyRebind() throws Exception { Entity testEntity = entityWithAttributeWhenReady(); ((EntityInternal)testEntity).sensors().set(Sensors.newStringSensor("foo"), "bar");
[4/8] incubator-brooklyn git commit: Test AWR value is not leaked in the persistent state
Test AWR value is not leaked in the persistent state - set test-cluster sensor `sensor` e.g. to `foo` and then ensure that `foo` is not being written Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/3746503c Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/3746503c Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/3746503c Branch: refs/heads/master Commit: 3746503c292c307ce28b56389fa508966503d1b4 Parents: 9d65a61 Author: Guglielmo NigriAuthored: Tue Dec 29 16:34:26 2015 +0100 Committer: Guglielmo Nigri Committed: Tue Dec 29 16:34:26 2015 +0100 -- .../camp/brooklyn/DslAndRebindYamlTest.java | 61 1 file changed, 61 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/3746503c/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java -- diff --git a/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java b/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java index 522d609..0a9f778 100644 --- a/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java +++ b/brooklyn-server/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/DslAndRebindYamlTest.java @@ -246,6 +246,67 @@ public class DslAndRebindYamlTest extends AbstractYamlTest { } @Test +public void testDslAttributeWhenReadyPersistedWithoutLeaks() throws Exception { +String yaml = "location: localhost\n" + +"name: Test Cluster\n" + +"services:\n" + +"- type: org.apache.brooklyn.entity.group.DynamicCluster\n" + +" id: test-cluster\n" + +" initialSize: 1\n" + +" memberSpec:\n" + +"$brooklyn:entitySpec:\n" + +" type: org.apache.brooklyn.core.test.entity.TestEntity\n" + +" brooklyn.config:\n" + +"test.confName: $brooklyn:component(\"test-cluster\").attributeWhenReady(\"sensor\")"; + +final Entity testEntity = createAndStartApplication(yaml); + +DynamicCluster clusterEntity1 = (DynamicCluster) Iterables.getOnlyElement(testEntity.getApplication().getChildren()); + +TestEntity testEntity1 = null; +for (Entity entity : clusterEntity1.getChildren()) { +if (entity instanceof TestEntity) { +testEntity1 = (TestEntity) entity; +break; +} +} +Assert.assertNotNull(testEntity1, "TestEntity not found in DynamicCluster"); + +final TestEntity childTestEntity = testEntity1; + +// Now set sensor value +((EntityInternal) clusterEntity1).sensors().set(Sensors.newStringSensor("sensor"), "bar"); + +String s1 = getConfigInTask(childTestEntity, TestEntity.CONF_NAME); +Assert.assertEquals(s1, "bar"); + +// Persist and rebind +Application app2 = rebind(testEntity.getApplication()); + +DynamicCluster clusterEntity2 = (DynamicCluster) Iterables.getOnlyElement(app2.getApplication().getChildren()); + +TestEntity testEntity2 = null; +for (Entity entity : clusterEntity2.getChildren()) { +if (entity instanceof TestEntity) { +testEntity2 = (TestEntity) entity; +break; +} +} +Assert.assertNotNull(testEntity2, "TestEntity not found in DynamicCluster"); + +// Assert the persisted state itself is as expected, and does not contain the value "bar" +BrooklynMementoRawData raw = BrooklynPersistenceUtils.newStateMemento(app2.getManagementContext(), MementoCopyMode.LOCAL); +String persistedState = raw.getEntities().get(testEntity2.getId()); +Matcher matcher = Pattern.compile(".*\\ (.*)\\<\\/test.confName\\>.*", Pattern.DOTALL) +.matcher(persistedState); +Assert.assertTrue(matcher.find()); +String testConfNamePersistedState = matcher.group(1); + +Assert.assertNotNull(testConfNamePersistedState); +Assert.assertFalse(testConfNamePersistedState.contains("bar"), "value leaked in persisted state"); +} + +@Test public void testDslAttributeWhenReadyRebind() throws Exception { Entity testEntity = entityWithAttributeWhenReady(); ((EntityInternal) testEntity).sensors().set(Sensors.newStringSensor("foo"), "bar");
[8/8] incubator-brooklyn git commit: This closes #1120
This closes #1120 Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/7bcb3920 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/7bcb3920 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/7bcb3920 Branch: refs/heads/master Commit: 7bcb3920d4d1770e031800addd902a2c3c507894 Parents: e300cf3 ca6f665 Author: Aled SageAuthored: Thu Jan 7 16:10:27 2016 + Committer: Aled Sage Committed: Thu Jan 7 16:10:27 2016 + -- .../camp/brooklyn/DslAndRebindYamlTest.java | 304 +++ 1 file changed, 252 insertions(+), 52 deletions(-) --
[2/2] incubator-brooklyn git commit: This closes #1129
This closes #1129 Fix getRequiredOpenPorts in SameServerDriverLifecycleEffectorTasks Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/e300cf33 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/e300cf33 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/e300cf33 Branch: refs/heads/master Commit: e300cf33c2ba508388c8d41047af8cda74e55839 Parents: dff3014 ddd55b1 Author: Sam CorbettAuthored: Thu Jan 7 15:36:30 2016 + Committer: Sam Corbett Committed: Thu Jan 7 15:36:30 2016 + -- .../SameServerDriverLifecycleEffectorTasks.java | 26 +++ ...eServerDriverLifecycleEffectorTasksTest.java | 72 2 files changed, 82 insertions(+), 16 deletions(-) --