brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [14/50] brooklyn-server git commit: Mark resources as testing
Date Wed, 30 Mar 2016 13:59:51 GMT
Mark resources as testing


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

Branch: refs/heads/master
Commit: 3d3216ca8b4dc0b9a5dab5a720a79f29af8f499a
Parents: 9b318cd
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Mon Mar 7 12:59:27 2016 +0200
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Thu Mar 17 15:25:46 2016 +0200

----------------------------------------------------------------------
 .../brooklyn/rest/filter/HaHotCheckTest.java    | 12 +++---
 .../rest/util/HaHotStateCheckClassResource.java | 38 -----------------
 .../rest/util/HaHotStateCheckResource.java      | 44 --------------------
 .../rest/util/HaMasterCheckResource.java        | 40 ------------------
 .../TestingHaHotStateCheckClassResource.java    | 38 +++++++++++++++++
 .../util/TestingHaHotStateCheckResource.java    | 44 ++++++++++++++++++++
 .../rest/util/TestingHaMasterCheckResource.java | 40 ++++++++++++++++++
 .../apache/brooklyn/rest/HaHotCheckTest.java    | 12 +++---
 .../rest/util/HaHotStateCheckClassResource.java | 38 -----------------
 .../rest/util/HaHotStateCheckResource.java      | 44 --------------------
 .../rest/util/HaMasterCheckResource.java        | 41 ------------------
 .../TestingHaHotStateCheckClassResource.java    | 38 +++++++++++++++++
 .../util/TestingHaHotStateCheckResource.java    | 44 ++++++++++++++++++++
 .../rest/util/TestingHaMasterCheckResource.java | 41 ++++++++++++++++++
 .../BrooklynPropertiesSecurityFilter.java       |  3 +-
 15 files changed, 259 insertions(+), 258 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/filter/HaHotCheckTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/filter/HaHotCheckTest.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/filter/HaHotCheckTest.java
index 606862a..92c2f9a 100644
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/filter/HaHotCheckTest.java
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/filter/HaHotCheckTest.java
@@ -29,9 +29,9 @@ import org.apache.brooklyn.api.mgmt.ha.ManagementNodeState;
 import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
 import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
 import org.apache.brooklyn.rest.testing.BrooklynRestResourceTest;
-import org.apache.brooklyn.rest.util.HaHotStateCheckClassResource;
-import org.apache.brooklyn.rest.util.HaHotStateCheckResource;
-import org.apache.brooklyn.rest.util.HaMasterCheckResource;
+import org.apache.brooklyn.rest.util.TestingHaHotStateCheckClassResource;
+import org.apache.brooklyn.rest.util.TestingHaHotStateCheckResource;
+import org.apache.brooklyn.rest.util.TestingHaMasterCheckResource;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.testng.annotations.Test;
 
@@ -40,9 +40,9 @@ public class HaHotCheckTest extends BrooklynRestResourceTest {
     @Override
     protected void addBrooklynResources() {
         addResource(new HaHotCheckResourceFilter());
-        addResource(new HaHotStateCheckResource());
-        addResource(new HaHotStateCheckClassResource());
-        addResource(new HaMasterCheckResource());
+        addResource(new TestingHaHotStateCheckResource());
+        addResource(new TestingHaHotStateCheckClassResource());
+        addResource(new TestingHaMasterCheckResource());
         
         ((LocalManagementContext)getManagementContext()).noteStartupComplete();
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
deleted file mode 100644
index 80e9c46..0000000
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
+++ /dev/null
@@ -1,38 +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 javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.brooklyn.rest.filter.HaHotStateRequired;
-
-@Path("/ha/class")
-@Produces(MediaType.APPLICATION_JSON)
-@HaHotStateRequired
-public class HaHotStateCheckClassResource {
-
-    @GET
-    @Path("fail")
-    public String fail() {
-        return "FAIL";
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
deleted file mode 100644
index 5c9d4d1..0000000
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
+++ /dev/null
@@ -1,44 +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 javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.brooklyn.rest.filter.HaHotStateRequired;
-
-@Path("/ha/method")
-@Produces(MediaType.APPLICATION_JSON)
-public class HaHotStateCheckResource {
-
-    @GET
-    @Path("ok")
-    public String ok() {
-        return "OK";
-    }
-
-    @GET
-    @Path("fail")
-    @HaHotStateRequired
-    public String fail() {
-        return "FAIL";
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.java
deleted file mode 100644
index 53184e7..0000000
--- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.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.util;
-
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-@Produces(MediaType.APPLICATION_JSON)
-public class HaMasterCheckResource {
-
-    @POST
-    @Path("/server/shutdown")
-    public void shutdown() {
-
-    }
-
-    @POST
-    @Path("/ha/post")
-    public void post() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
new file mode 100644
index 0000000..a0084ef
--- /dev/null
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
@@ -0,0 +1,38 @@
+/*
+ * 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 javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.brooklyn.rest.filter.HaHotStateRequired;
+
+@Path("/ha/class")
+@Produces(MediaType.APPLICATION_JSON)
+@HaHotStateRequired
+public class TestingHaHotStateCheckClassResource {
+
+    @GET
+    @Path("fail")
+    public String fail() {
+        return "FAIL";
+    }
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
new file mode 100644
index 0000000..512d725
--- /dev/null
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
@@ -0,0 +1,44 @@
+/*
+ * 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 javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.brooklyn.rest.filter.HaHotStateRequired;
+
+@Path("/ha/method")
+@Produces(MediaType.APPLICATION_JSON)
+public class TestingHaHotStateCheckResource {
+
+    @GET
+    @Path("ok")
+    public String ok() {
+        return "OK";
+    }
+
+    @GET
+    @Path("fail")
+    @HaHotStateRequired
+    public String fail() {
+        return "FAIL";
+    }
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
new file mode 100644
index 0000000..d542868
--- /dev/null
+++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
@@ -0,0 +1,40 @@
+/*
+ * 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 javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+@Produces(MediaType.APPLICATION_JSON)
+public class TestingHaMasterCheckResource {
+
+    @POST
+    @Path("/server/shutdown")
+    public void shutdown() {
+
+    }
+
+    @POST
+    @Path("/ha/post")
+    public void post() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/HaHotCheckTest.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/HaHotCheckTest.java
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/HaHotCheckTest.java
index ee21155..044e54d 100644
--- a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/HaHotCheckTest.java
+++ b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/HaHotCheckTest.java
@@ -29,9 +29,9 @@ import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
 import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
 import org.apache.brooklyn.rest.filter.HaHotCheckResourceFilter;
 import org.apache.brooklyn.rest.testing.BrooklynRestResourceTest;
-import org.apache.brooklyn.rest.util.HaHotStateCheckClassResource;
-import org.apache.brooklyn.rest.util.HaHotStateCheckResource;
-import org.apache.brooklyn.rest.util.HaMasterCheckResource;
+import org.apache.brooklyn.rest.util.TestingHaHotStateCheckClassResource;
+import org.apache.brooklyn.rest.util.TestingHaHotStateCheckResource;
+import org.apache.brooklyn.rest.util.TestingHaMasterCheckResource;
 import org.apache.brooklyn.rest.util.ManagementContextProvider;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
@@ -55,9 +55,9 @@ public class HaHotCheckTest extends BrooklynRestResourceTest {
     protected void addBrooklynResources() {
         config.getProperties().put(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES,
             new HaHotCheckResourceFilter(new ManagementContextProvider(getManagementContext())));
-        addResource(new HaHotStateCheckResource());
-        addResource(new HaHotStateCheckClassResource());
-        addResource(new HaMasterCheckResource());
+        addResource(new TestingHaHotStateCheckResource());
+        addResource(new TestingHaHotStateCheckClassResource());
+        addResource(new TestingHaMasterCheckResource());
         
         ((LocalManagementContext)getManagementContext()).noteStartupComplete();
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
deleted file mode 100644
index 80e9c46..0000000
--- a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckClassResource.java
+++ /dev/null
@@ -1,38 +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 javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.brooklyn.rest.filter.HaHotStateRequired;
-
-@Path("/ha/class")
-@Produces(MediaType.APPLICATION_JSON)
-@HaHotStateRequired
-public class HaHotStateCheckClassResource {
-
-    @GET
-    @Path("fail")
-    public String fail() {
-        return "FAIL";
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
deleted file mode 100644
index 5c9d4d1..0000000
--- a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaHotStateCheckResource.java
+++ /dev/null
@@ -1,44 +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 javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.brooklyn.rest.filter.HaHotStateRequired;
-
-@Path("/ha/method")
-@Produces(MediaType.APPLICATION_JSON)
-public class HaHotStateCheckResource {
-
-    @GET
-    @Path("ok")
-    public String ok() {
-        return "OK";
-    }
-
-    @GET
-    @Path("fail")
-    @HaHotStateRequired
-    public String fail() {
-        return "FAIL";
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.java
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.java
deleted file mode 100644
index a1c83e8..0000000
--- a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/HaMasterCheckResource.java
+++ /dev/null
@@ -1,41 +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 javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-@Path("/")
-@Produces(MediaType.APPLICATION_JSON)
-public class HaMasterCheckResource {
-
-    @POST
-    @Path("/server/shutdown")
-    public void shutdown() {
-
-    }
-
-    @POST
-    @Path("/ha/post")
-    public void post() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
new file mode 100644
index 0000000..a0084ef
--- /dev/null
+++ b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckClassResource.java
@@ -0,0 +1,38 @@
+/*
+ * 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 javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.brooklyn.rest.filter.HaHotStateRequired;
+
+@Path("/ha/class")
+@Produces(MediaType.APPLICATION_JSON)
+@HaHotStateRequired
+public class TestingHaHotStateCheckClassResource {
+
+    @GET
+    @Path("fail")
+    public String fail() {
+        return "FAIL";
+    }
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
new file mode 100644
index 0000000..512d725
--- /dev/null
+++ b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaHotStateCheckResource.java
@@ -0,0 +1,44 @@
+/*
+ * 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 javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.brooklyn.rest.filter.HaHotStateRequired;
+
+@Path("/ha/method")
+@Produces(MediaType.APPLICATION_JSON)
+public class TestingHaHotStateCheckResource {
+
+    @GET
+    @Path("ok")
+    public String ok() {
+        return "OK";
+    }
+
+    @GET
+    @Path("fail")
+    @HaHotStateRequired
+    public String fail() {
+        return "FAIL";
+    }
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
----------------------------------------------------------------------
diff --git a/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
new file mode 100644
index 0000000..9b125dc
--- /dev/null
+++ b/rest/rest-server-jersey/src/test/java/org/apache/brooklyn/rest/util/TestingHaMasterCheckResource.java
@@ -0,0 +1,41 @@
+/*
+ * 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 javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+@Path("/")
+@Produces(MediaType.APPLICATION_JSON)
+public class TestingHaMasterCheckResource {
+
+    @POST
+    @Path("/server/shutdown")
+    public void shutdown() {
+
+    }
+
+    @POST
+    @Path("/ha/post")
+    public void post() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/3d3216ca/rest/rest-server/src/main/java/org/apache/brooklyn/rest/filter/BrooklynPropertiesSecurityFilter.java
----------------------------------------------------------------------
diff --git a/rest/rest-server/src/main/java/org/apache/brooklyn/rest/filter/BrooklynPropertiesSecurityFilter.java
b/rest/rest-server/src/main/java/org/apache/brooklyn/rest/filter/BrooklynPropertiesSecurityFilter.java
index a7af6de..c1d2d9f 100644
--- a/rest/rest-server/src/main/java/org/apache/brooklyn/rest/filter/BrooklynPropertiesSecurityFilter.java
+++ b/rest/rest-server/src/main/java/org/apache/brooklyn/rest/filter/BrooklynPropertiesSecurityFilter.java
@@ -35,6 +35,7 @@ import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.core.mgmt.entitlement.Entitlements;
 import org.apache.brooklyn.core.mgmt.entitlement.WebEntitlementContext;
 import org.apache.brooklyn.rest.BrooklynWebConfig;
+import org.apache.brooklyn.rest.resources.LogoutResource;
 import org.apache.brooklyn.rest.security.jaas.BrooklynLoginModule;
 import org.apache.brooklyn.rest.security.provider.DelegatingSecurityProvider;
 import org.apache.brooklyn.rest.util.OsgiCompat;
@@ -46,7 +47,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Provides basic HTTP authentication.
  * 
- * @deprecated since 0.9.0, use JAAS authentication instead, see {@link BrooklynLoginModule}.
+ * @deprecated since 0.9.0, use JAAS authentication instead, see {@link BrooklynLoginModule},
{@link LogoutResource}, {@link EntitlementContextFilter}.
  */
 @Deprecated
 public class BrooklynPropertiesSecurityFilter implements Filter {


Mime
View raw message