brooklyn-dist git commit: Remove service enable line

2016-04-07 Thread aledsage
Repository: brooklyn-dist
Updated Branches:
  refs/heads/0.9.0 f08bddf20 -> c18130c9e


Remove service enable line


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

Branch: refs/heads/0.9.0
Commit: c18130c9e36222e6a27f7cf8ce0e0db5309da4de
Parents: f08bddf
Author: alrick87 
Authored: Thu Apr 7 16:13:29 2016 +0300
Committer: Aled Sage 
Committed: Thu Apr 7 22:16:26 2016 +0100

--
 packaging/pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/c18130c9/packaging/pom.xml
--
diff --git a/packaging/pom.xml b/packaging/pom.xml
index 1886662..e1975b2 100644
--- a/packaging/pom.xml
+++ b/packaging/pom.xml
@@ -146,13 +146,12 @@
 
 
 
-/bin/systemctl enable brooklyn.service
 /bin/systemctl daemon-reload
 /bin/systemctl start brooklyn.service
 
 
 
-/bin/systemctl stop brooklyn
+/bin/systemctl stop brooklyn.service
 
 
 /sbin/userdel brooklyn



brooklyn-ui git commit: Hotfix: Skip the creation of the contains method within Array prototype to avoid breaking other parts of the UI

2016-04-07 Thread aledsage
Repository: brooklyn-ui
Updated Branches:
  refs/heads/0.9.0 34d196678 -> 165482f4a


Hotfix: Skip the creation of the contains method within Array prototype to 
avoid breaking other parts of the UI


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

Branch: refs/heads/0.9.0
Commit: 165482f4a1abfdcd244db92e2c9f770d81ff6b52
Parents: 34d1966
Author: Thomas Bouron 
Authored: Thu Apr 7 13:13:47 2016 +0100
Committer: Aled Sage 
Committed: Thu Apr 7 21:01:17 2016 +0100

--
 src/main/webapp/assets/js/view/location-wizard.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/165482f4/src/main/webapp/assets/js/view/location-wizard.js
--
diff --git a/src/main/webapp/assets/js/view/location-wizard.js 
b/src/main/webapp/assets/js/view/location-wizard.js
index 5013f06..f3e2464 100644
--- a/src/main/webapp/assets/js/view/location-wizard.js
+++ b/src/main/webapp/assets/js/view/location-wizard.js
@@ -541,7 +541,8 @@ define([
 return item.getIdentifierName();
 }),
 spec: ['localhost']
-}
+},
+loggerEnabled: false
 });
 }
 });
@@ -702,7 +703,8 @@ define([
 vmOptions: that.vmOptions,
 osOptions: that.osOptions,
 templateOptions: that.templateOptions
-}
+},
+loggerEnabled: false
 });
 }, 100);
 },



brooklyn-server git commit: Fixed command for installing python via apt-get and yum by using sudo

2016-04-07 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/0.9.0 718aea7d2 -> d520fde68


Fixed command for installing python via apt-get and yum by using sudo

Cherry-picked Jongyoul Lee’s commit (a0341a4, PR #105), but conflicts 
due to server-cli/src/main/resources/catalog.bom not existing. Therefore
fixing conflict manually and committing.

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

Branch: refs/heads/0.9.0
Commit: d520fde682dfb597487943ec62ffb752d0f6ef17
Parents: 718aea7
Author: Aled Sage 
Authored: Thu Apr 7 20:59:13 2016 +0100
Committer: Aled Sage 
Committed: Thu Apr 7 20:59:13 2016 +0100

--
 server-cli/src/main/resources/brooklyn/default.catalog.bom | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d520fde6/server-cli/src/main/resources/brooklyn/default.catalog.bom
--
diff --git a/server-cli/src/main/resources/brooklyn/default.catalog.bom 
b/server-cli/src/main/resources/brooklyn/default.catalog.bom
index deca965..c1f0456 100644
--- a/server-cli/src/main/resources/brooklyn/default.catalog.bom
+++ b/server-cli/src/main/resources/brooklyn/default.catalog.bom
@@ -97,8 +97,8 @@ brooklyn.catalog:
   install.command: |
 # install python if not present
 which python || \
-  { apt-get update && apt-get install python ; } || \
-  { yum update && yum install python ; } || \
+  { sudo apt-get update && sudo apt-get install python ; } || \
+  { sudo yum update && sudo yum install python ; } || \
   { echo WARNING: cannot install python && exit 1 ; }
 
   customize.command: |



[1/2] brooklyn-dist git commit: Remove service enable line

2016-04-07 Thread svet
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master 563e04b25 -> f4f0ecaf6


Remove service enable line


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

Branch: refs/heads/master
Commit: f3bd6474cff86faa2ed34842443ccb99a13432c5
Parents: 563e04b
Author: alrick87 
Authored: Thu Apr 7 16:13:29 2016 +0300
Committer: alrick87 
Committed: Thu Apr 7 16:13:29 2016 +0300

--
 packaging/pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/f3bd6474/packaging/pom.xml
--
diff --git a/packaging/pom.xml b/packaging/pom.xml
index 59ac02f..7c51c67 100644
--- a/packaging/pom.xml
+++ b/packaging/pom.xml
@@ -146,13 +146,12 @@
 
 
 
-/bin/systemctl enable brooklyn.service
 /bin/systemctl daemon-reload
 /bin/systemctl start brooklyn.service
 
 
 
-/bin/systemctl stop brooklyn
+/bin/systemctl stop brooklyn.service
 
 
 /sbin/userdel brooklyn



[1/2] brooklyn-ui git commit: Hotfix: Skip the creation of the contains method within Array prototype to avoid breaking other parts of the UI

2016-04-07 Thread svet
Repository: brooklyn-ui
Updated Branches:
  refs/heads/master 22b3e1023 -> 400614836


Hotfix: Skip the creation of the contains method within Array prototype to 
avoid breaking other parts of the UI


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

Branch: refs/heads/master
Commit: 552e9b38df380c45909f5152ffaded281a1a5d66
Parents: 22b3e10
Author: Thomas Bouron 
Authored: Thu Apr 7 13:13:47 2016 +0100
Committer: Thomas Bouron 
Committed: Thu Apr 7 13:41:17 2016 +0100

--
 src/main/webapp/assets/js/view/location-wizard.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/552e9b38/src/main/webapp/assets/js/view/location-wizard.js
--
diff --git a/src/main/webapp/assets/js/view/location-wizard.js 
b/src/main/webapp/assets/js/view/location-wizard.js
index 5013f06..f3e2464 100644
--- a/src/main/webapp/assets/js/view/location-wizard.js
+++ b/src/main/webapp/assets/js/view/location-wizard.js
@@ -541,7 +541,8 @@ define([
 return item.getIdentifierName();
 }),
 spec: ['localhost']
-}
+},
+loggerEnabled: false
 });
 }
 });
@@ -702,7 +703,8 @@ define([
 vmOptions: that.vmOptions,
 osOptions: that.osOptions,
 templateOptions: that.templateOptions
-}
+},
+loggerEnabled: false
 });
 }, 100);
 },



[2/2] brooklyn-ui git commit: Closes #25

2016-04-07 Thread svet
Closes #25

Hotfix: Skip the creation of the contains method within Array prototype

This avoids breaking other parts of the UI


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

Branch: refs/heads/master
Commit: 40061483626b507359b193c15f3af53db9cdf11c
Parents: 22b3e10 552e9b3
Author: Svetoslav Neykov 
Authored: Thu Apr 7 16:20:00 2016 +0300
Committer: Svetoslav Neykov 
Committed: Thu Apr 7 16:20:00 2016 +0300

--
 src/main/webapp/assets/js/view/location-wizard.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--




[7/9] brooklyn-server git commit: Remove jersey compatibility

2016-04-07 Thread sjcorbett
Remove jersey compatibility


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

Branch: refs/heads/master
Commit: 3be4fe11e74b01a85234fe5d0c96d043d3cb44e1
Parents: 36a2918
Author: Svetoslav Neykov 
Authored: Thu Mar 31 11:37:30 2016 +0300
Committer: Svetoslav Neykov 
Committed: Fri Apr 1 09:31:08 2016 +0300

--
 camp/camp-server-jersey/pom.xml | 225 --
 .../brooklyn/camp/server/RestApiSetup.java  |  53 --
 .../rest/resource/ApiListingResource.java   | 260 ---
 .../rest/resource/ApidocRestResource.java   |  32 -
 .../src/main/webapp/WEB-INF/web.xml | 142 
 camp/pom.xml|   1 -
 karaf/features/src/main/feature/feature.xml |   3 -
 launcher/pom.xml|  25 +-
 parent/pom.xml  |  59 --
 pom.xml |   3 -
 rest/rest-client/pom.xml|  13 -
 rest/rest-server-jersey/pom.xml | 351 --
 .../org/apache/brooklyn/rest/RestApiSetup.java  | 113 ---
 .../rest/filter/EntitlementContextFilter.java   |  63 --
 .../rest/filter/HaHotCheckResourceFilter.java   | 196 --
 .../brooklyn/rest/filter/NoCacheFilter.java |  42 --
 .../rest/filter/RequestTaggingRsFilter.java |  76 --
 .../brooklyn/rest/filter/SwaggerFilter.java |  76 --
 .../rest/resources/ApiListingResource.java  | 260 ---
 .../brooklyn/rest/resources/ApidocResource.java |  33 -
 .../brooklyn/rest/util/FormMapProvider.java |  81 ---
 .../main/resources/build-metadata.properties|  18 -
 .../src/main/webapp/WEB-INF/web.xml | 149 
 .../BrooklynPropertiesSecurityFilterTest.java   | 151 
 .../brooklyn/rest/BrooklynRestApiLauncher.java  | 498 -
 .../rest/BrooklynRestApiLauncherTest.java   |  77 --
 .../BrooklynRestApiLauncherTestFixture.java | 109 ---
 .../apache/brooklyn/rest/HaHotCheckTest.java| 160 -
 .../brooklyn/rest/HaMasterCheckFilterTest.java  | 218 --
 .../rest/domain/AbstractDomainTest.java |  44 --
 .../brooklyn/rest/domain/ApiErrorTest.java  |  71 --
 .../rest/domain/ApplicationSpecTest.java|  40 --
 .../brooklyn/rest/domain/ApplicationTest.java   |  87 ---
 .../rest/domain/EffectorSummaryTest.java|  44 --
 .../brooklyn/rest/domain/EntitySpecTest.java|  48 --
 .../brooklyn/rest/domain/EntitySummaryTest.java |  48 --
 .../brooklyn/rest/domain/LocationSpecTest.java  |  58 --
 .../rest/domain/LocationSummaryTest.java|  41 --
 .../brooklyn/rest/domain/SensorSummaryTest.java | 103 ---
 .../rest/domain/VersionSummaryTest.java |  49 --
 .../AbstractRestApiEntitlementsTest.java| 111 ---
 .../ActivityApiEntitlementsTest.java| 122 
 .../AuthenticateAnyoneSecurityProvider.java |  41 --
 .../EntityConfigApiEntitlementsTest.java| 103 ---
 .../entitlement/SensorApiEntitlementsTest.java  | 108 ---
 .../entitlement/ServerApiEntitlementsTest.java  |  34 -
 .../StaticDelegatingEntitlementManager.java |  37 -
 .../rest/resources/AccessResourceTest.java  |  68 --
 .../rest/resources/ApidocResourceTest.java  | 173 -
 .../ApplicationResourceIntegrationTest.java | 133 
 .../rest/resources/ApplicationResourceTest.java | 701 ---
 .../rest/resources/CatalogResetTest.java| 113 ---
 .../rest/resources/CatalogResourceTest.java | 515 --
 .../rest/resources/DelegatingPrintStream.java   | 183 -
 .../rest/resources/DescendantsTest.java | 130 
 .../resources/EntityConfigResourceTest.java | 172 -
 .../rest/resources/EntityResourceTest.java  | 189 -
 .../rest/resources/ErrorResponseTest.java   |  98 ---
 .../rest/resources/LocationResourceTest.java| 188 -
 .../rest/resources/PolicyResourceTest.java  | 145 
 .../rest/resources/ScriptResourceTest.java  |  54 --
 .../SensorResourceIntegrationTest.java  |  82 ---
 .../rest/resources/SensorResourceTest.java  | 271 ---
 .../ServerResourceIntegrationTest.java  | 125 
 .../rest/resources/ServerResourceTest.java  | 168 -
 .../rest/resources/ServerShutdownTest.java  | 185 -
 .../rest/resources/UsageResourceTest.java   | 443 
 .../rest/resources/VersionResourceTest.java |  52 --
 .../rest/security/PasswordHasherTest.java   |  37 -
 .../security/provider/TestSecurityProvider.java |  46 --
 .../test/config/render/TestRendererHints.java   |  36 -
 .../brooklynnode/DeployBlueprintTest.java   |  

[1/9] brooklyn-server git commit: Remove jersey compatibility

2016-04-07 Thread sjcorbett
Repository: brooklyn-server
Updated Branches:
  refs/heads/master dc6a313d7 -> d27d6c72b


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3be4fe11/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
--
diff --git 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
 
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
deleted file mode 100644
index 3aee845..000
--- 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/EntityLocationUtilsTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.rest.util;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Arrays;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.AbstractLocation;
-import org.apache.brooklyn.core.location.geo.HostGeoInfo;
-import org.apache.brooklyn.core.location.internal.LocationInternal;
-import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.rest.testing.mocks.RestMockSimpleEntity;
-
-import com.google.common.collect.ImmutableList;
-
-public class EntityLocationUtilsTest extends BrooklynAppUnitTestSupport {
-
-private static final Logger log = 
LoggerFactory.getLogger(EntityLocationUtilsTest.class);
-
-private Location loc;
-
-@BeforeMethod(alwaysRun=true)
-@Override
-public void setUp() throws Exception {
-super.setUp();
-loc = mgmt.getLocationRegistry().getLocationManaged("localhost");
-((AbstractLocation)loc).setHostGeoInfo(new HostGeoInfo("localhost", 
"localhost", 50, 0));
-}
-
-@Test
-public void testCount() {
-@SuppressWarnings("unused")
-SoftwareProcess r1 = 
app.createAndManageChild(EntitySpec.create(SoftwareProcess.class, 
RestMockSimpleEntity.class));
-SoftwareProcess r2 = 
app.createAndManageChild(EntitySpec.create(SoftwareProcess.class, 
RestMockSimpleEntity.class));
-Entities.start(app, Arrays.asList(loc));
-
-Entities.dumpInfo(app);
-
-log.info("r2loc: "+r2.getLocations());
-log.info("props: 
"+((LocationInternal)r2.getLocations().iterator().next()).config().getBag().getAllConfig());
-
-Map counts = new 
EntityLocationUtils(mgmt).countLeafEntitiesByLocatedLocations();
-log.info("count: "+counts);
-assertEquals(ImmutableList.copyOf(counts.values()), 
ImmutableList.of(2), "counts="+counts);
-}
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3be4fe11/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/NoOpRecordingShutdownHandler.java
--
diff --git 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/NoOpRecordingShutdownHandler.java
 
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/NoOpRecordingShutdownHandler.java
deleted file mode 100644
index a99d3d9..000
--- 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/NoOpRecordingShutdownHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in 

[9/9] brooklyn-server git commit: This closes #95

2016-04-07 Thread sjcorbett
This closes #95

Remove jersey compatibility


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

Branch: refs/heads/master
Commit: d27d6c72b570405f71ea8316f0bda6581b8237ea
Parents: dc6a313 5838d16
Author: Sam Corbett 
Authored: Thu Apr 7 12:13:43 2016 +0100
Committer: Sam Corbett 
Committed: Thu Apr 7 12:13:43 2016 +0100

--
 camp/camp-server-jersey/pom.xml | 225 --
 .../brooklyn/camp/server/RestApiSetup.java  |  53 --
 .../rest/resource/ApiListingResource.java   | 260 ---
 .../rest/resource/ApidocRestResource.java   |  32 -
 .../src/main/webapp/WEB-INF/web.xml | 142 
 camp/pom.xml|   1 -
 karaf/features/src/main/feature/feature.xml |   3 -
 launcher/pom.xml|  32 +-
 parent/pom.xml  |  59 --
 pom.xml |   3 -
 rest/rest-client/pom.xml|  13 -
 rest/rest-server-jersey/pom.xml | 351 --
 .../org/apache/brooklyn/rest/RestApiSetup.java  | 113 ---
 .../rest/filter/EntitlementContextFilter.java   |  63 --
 .../rest/filter/HaHotCheckResourceFilter.java   | 196 --
 .../brooklyn/rest/filter/NoCacheFilter.java |  42 --
 .../rest/filter/RequestTaggingRsFilter.java |  76 --
 .../brooklyn/rest/filter/SwaggerFilter.java |  76 --
 .../rest/resources/ApiListingResource.java  | 260 ---
 .../brooklyn/rest/resources/ApidocResource.java |  33 -
 .../brooklyn/rest/util/FormMapProvider.java |  81 ---
 .../main/resources/build-metadata.properties|  18 -
 .../src/main/webapp/WEB-INF/web.xml | 149 
 .../BrooklynPropertiesSecurityFilterTest.java   | 151 
 .../brooklyn/rest/BrooklynRestApiLauncher.java  | 498 -
 .../rest/BrooklynRestApiLauncherTest.java   |  77 --
 .../BrooklynRestApiLauncherTestFixture.java | 109 ---
 .../apache/brooklyn/rest/HaHotCheckTest.java| 160 -
 .../brooklyn/rest/HaMasterCheckFilterTest.java  | 218 --
 .../rest/domain/AbstractDomainTest.java |  44 --
 .../brooklyn/rest/domain/ApiErrorTest.java  |  71 --
 .../rest/domain/ApplicationSpecTest.java|  40 --
 .../brooklyn/rest/domain/ApplicationTest.java   |  87 ---
 .../rest/domain/EffectorSummaryTest.java|  44 --
 .../brooklyn/rest/domain/EntitySpecTest.java|  48 --
 .../brooklyn/rest/domain/EntitySummaryTest.java |  48 --
 .../brooklyn/rest/domain/LocationSpecTest.java  |  58 --
 .../rest/domain/LocationSummaryTest.java|  41 --
 .../brooklyn/rest/domain/SensorSummaryTest.java | 103 ---
 .../rest/domain/VersionSummaryTest.java |  49 --
 .../AbstractRestApiEntitlementsTest.java| 111 ---
 .../ActivityApiEntitlementsTest.java| 122 
 .../AuthenticateAnyoneSecurityProvider.java |  41 --
 .../EntityConfigApiEntitlementsTest.java| 103 ---
 .../entitlement/SensorApiEntitlementsTest.java  | 108 ---
 .../entitlement/ServerApiEntitlementsTest.java  |  34 -
 .../StaticDelegatingEntitlementManager.java |  37 -
 .../rest/resources/AccessResourceTest.java  |  68 --
 .../rest/resources/ApidocResourceTest.java  | 173 -
 .../ApplicationResourceIntegrationTest.java | 133 
 .../rest/resources/ApplicationResourceTest.java | 701 ---
 .../rest/resources/CatalogResetTest.java| 113 ---
 .../rest/resources/CatalogResourceTest.java | 515 --
 .../rest/resources/DelegatingPrintStream.java   | 183 -
 .../rest/resources/DescendantsTest.java | 130 
 .../resources/EntityConfigResourceTest.java | 172 -
 .../rest/resources/EntityResourceTest.java  | 189 -
 .../rest/resources/ErrorResponseTest.java   |  98 ---
 .../rest/resources/LocationResourceTest.java| 188 -
 .../rest/resources/PolicyResourceTest.java  | 145 
 .../rest/resources/ScriptResourceTest.java  |  54 --
 .../SensorResourceIntegrationTest.java  |  82 ---
 .../rest/resources/SensorResourceTest.java  | 271 ---
 .../ServerResourceIntegrationTest.java  | 125 
 .../rest/resources/ServerResourceTest.java  | 168 -
 .../rest/resources/ServerShutdownTest.java  | 185 -
 .../rest/resources/UsageResourceTest.java   | 443 
 .../rest/resources/VersionResourceTest.java |  52 --
 .../rest/security/PasswordHasherTest.java   |  37 -
 .../security/provider/TestSecurityProvider.java |  46 --
 .../test/config/render/TestRendererHints.java   |  36 -
 .../brooklynnode/DeployBlueprintTest.java   

[6/9] brooklyn-server git commit: Remove jersey compatibility

2016-04-07 Thread sjcorbett
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3be4fe11/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/filter/SwaggerFilter.java
--
diff --git 
a/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/filter/SwaggerFilter.java
 
b/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/filter/SwaggerFilter.java
deleted file mode 100644
index ce8b747..000
--- 
a/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/filter/SwaggerFilter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.rest.filter;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.apache.brooklyn.rest.apidoc.RestApiResourceScanner;
-
-import io.swagger.config.ScannerFactory;
-import io.swagger.models.Info;
-import io.swagger.models.License;
-import io.swagger.models.Swagger;
-
-/**
- * Bootstraps swagger.
- * 
- * Swagger was intended to run as a servlet.
- *
- * @author Ciprian Ciubotariu 
- */
-public class SwaggerFilter implements Filter {
-
-static Info info = new Info()
-.title("Brooklyn API Documentation")
-.version("v1") // API version, not BROOKLYN_VERSION
-.license(new License()
-.name("Apache 2.0")
-.url("http://www.apache.org/licenses/LICENSE-2.0.html;));
-
-@Override
-public void init(FilterConfig filterConfig) throws ServletException {
-//ReflectiveJaxrsScanner scanner = new ReflectiveJaxrsScanner();
-//
scanner.setResourcePackage("org.apache.brooklyn.rest.api,org.apache.brooklyn.rest.apidoc,org.apache.brooklyn.rest.resources");
-//ScannerFactory.setScanner(scanner);
-ScannerFactory.setScanner(new RestApiResourceScanner());
-
-ServletContext context = filterConfig.getServletContext();
-Swagger swagger = new Swagger()
-.info(info);
-context.setAttribute("swagger", swagger);
-}
-
-@Override
-public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain) throws IOException, ServletException {
-chain.doFilter(request, response);
-}
-
-@Override
-public void destroy() {
-}
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3be4fe11/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/resources/ApiListingResource.java
--
diff --git 
a/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/resources/ApiListingResource.java
 
b/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/resources/ApiListingResource.java
deleted file mode 100644
index 74f8426..000
--- 
a/rest/rest-server-jersey/src/main/java/org/apache/brooklyn/rest/resources/ApiListingResource.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright 2015 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.brooklyn.rest.resources;
-
-import com.sun.jersey.spi.container.servlet.WebConfig;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.config.FilterFactory;
-import io.swagger.config.Scanner;
-import io.swagger.config.ScannerFactory;
-import io.swagger.config.SwaggerConfig;
-import io.swagger.core.filter.SpecFilter;
-import 

[5/9] brooklyn-server git commit: Remove jersey compatibility

2016-04-07 Thread sjcorbett
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3be4fe11/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApiErrorTest.java
--
diff --git 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApiErrorTest.java
 
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApiErrorTest.java
deleted file mode 100644
index f73bd30..000
--- 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApiErrorTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.rest.domain;
-
-import static org.apache.brooklyn.rest.util.RestApiTestUtils.asJson;
-import static org.apache.brooklyn.rest.util.RestApiTestUtils.fromJson;
-import static org.apache.brooklyn.rest.util.RestApiTestUtils.jsonFixture;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.testng.annotations.Test;
-import org.testng.util.Strings;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-public class ApiErrorTest extends AbstractDomainTest {
-
-@Override
-protected String getPath() {
-return "fixtures/api-error-basic.json";
-}
-
-@Override
-protected Object getDomainObject() {
-return ApiError.builder()
-.message("explanatory message")
-.details("accompanying details")
-.build();
-}
-
-@Test
-public void testSerializeApiErrorFromThrowable() throws IOException {
-Exception e = new Exception("error");
-e.setStackTrace(Thread.currentThread().getStackTrace());
-
-ApiError error = ApiError.builderFromThrowable(e).build();
-ApiError deserialised = fromJson(asJson(error), ApiError.class);
-
-assertFalse(Strings.isNullOrEmpty(deserialised.getDetails()), 
"Expected details to contain exception stack trace");
-assertEquals(deserialised, error);
-}
-
-@Test
-public void testSerializeApiErrorWithoutDetails() throws IOException {
-ApiError error = ApiError.builder()
-.message("explanatory message")
-.build();
-assertEquals(asJson(error), 
jsonFixture("fixtures/api-error-no-details.json"));
-}
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3be4fe11/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApplicationSpecTest.java
--
diff --git 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApplicationSpecTest.java
 
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApplicationSpecTest.java
deleted file mode 100644
index b2690d6..000
--- 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/domain/ApplicationSpecTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.rest.domain;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-public class ApplicationSpecTest extends AbstractDomainTest {
-
-@Override
-protected String getPath() {
-return "fixtures/application-spec.json";
-}
-
- 

[2/9] brooklyn-server git commit: Remove jersey compatibility

2016-04-07 Thread sjcorbett
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3be4fe11/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/UsageResourceTest.java
--
diff --git 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/UsageResourceTest.java
 
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/UsageResourceTest.java
deleted file mode 100644
index 72392fe..000
--- 
a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/resources/UsageResourceTest.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.rest.resources;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-
-import javax.ws.rs.core.Response;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.location.LocationSpec;
-import org.apache.brooklyn.api.location.NoMachinesAvailableException;
-import org.apache.brooklyn.core.mgmt.internal.LocalUsageManager;
-import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessEntityTest;
-import 
org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.rest.domain.ApplicationSpec;
-import org.apache.brooklyn.rest.domain.Status;
-import org.apache.brooklyn.rest.domain.TaskSummary;
-import org.apache.brooklyn.rest.domain.UsageStatistic;
-import org.apache.brooklyn.rest.domain.UsageStatistics;
-import org.apache.brooklyn.rest.testing.BrooklynRestResourceTest;
-import org.apache.brooklyn.rest.testing.mocks.RestMockSimpleEntity;
-import org.apache.brooklyn.util.repeat.Repeater;
-import org.apache.brooklyn.util.time.Time;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.GenericType;
-
-public class UsageResourceTest extends BrooklynRestResourceTest {
-
-@SuppressWarnings("unused")
-private static final Logger LOG = 
LoggerFactory.getLogger(UsageResourceTest.class);
-
-private static final long TIMEOUT_MS = 10*1000;
-
-private Calendar testStartTime;
-
-private final ApplicationSpec simpleSpec = 
ApplicationSpec.builder().name("simple-app").
-entities(ImmutableSet.of(new 
org.apache.brooklyn.rest.domain.EntitySpec("simple-ent", 
RestMockSimpleEntity.class.getName(.
-locations(ImmutableSet.of("localhost")).
-build();
-
-@BeforeMethod(alwaysRun=true)
-public void setUpMethod() {
-
((ManagementContextInternal)getManagementContext()).getStorage().remove(LocalUsageManager.APPLICATION_USAGE_KEY);
-
((ManagementContextInternal)getManagementContext()).getStorage().remove(LocalUsageManager.LOCATION_USAGE_KEY);
-testStartTime = new GregorianCalendar();
-}
-
-@Test
-public void testListApplicationUsages() throws Exception {
-// Create an app
-Calendar preStart = new GregorianCalendar();
-String appId = createApp(simpleSpec);
-Calendar postStart = new GregorianCalendar();
-
-// We will retrieve usage from one millisecond after start; this 
guarantees to not be  
-// told about both STARTING+RUNNING, which could otherwise happen if 
they are in the 
-// same milliscond.
-Calendar afterPostStart = 
Time.newCalendarFromMillisSinceEpochUtc(postStart.getTime().getTime()+1);
-
-// 

[8/9] brooklyn-server git commit: Fix failing tests - add missing test dependency

2016-04-07 Thread sjcorbett
Fix failing tests - add missing test dependency

Test dependencies are not transitive, all need to be explicit.


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

Branch: refs/heads/master
Commit: 5838d166f2bbe191bf1b8d1541ee36d3479fe96f
Parents: 3be4fe1
Author: Svetoslav Neykov 
Authored: Fri Apr 1 09:14:28 2016 +0300
Committer: Svetoslav Neykov 
Committed: Fri Apr 1 09:31:12 2016 +0300

--
 launcher/pom.xml | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/5838d166/launcher/pom.xml
--
diff --git a/launcher/pom.xml b/launcher/pom.xml
index 2ecb2f8..7bf7a11 100644
--- a/launcher/pom.xml
+++ b/launcher/pom.xml
@@ -187,6 +187,13 @@
 
 
 org.apache.brooklyn
+brooklyn-rest-resources
+${project.version}
+tests
+test
+
+
+org.apache.brooklyn
 brooklyn-rest-server
 ${project.version}
 tests