You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by dr...@apache.org on 2017/06/29 15:36:11 UTC
[29/50] [abbrv] brooklyn-server git commit: white_check_mark: Fix
build and cleanup
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationLiveTest.java b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationLiveTest.java
index b12c511..f16fa3e 100644
--- a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationLiveTest.java
+++ b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationLiveTest.java
@@ -1,14 +1,31 @@
+/*
+ * 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.container.location.kubernetes;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.List;
-import java.util.Map;
-
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.google.common.net.HostAndPort;
import org.apache.brooklyn.api.location.MachineDetails;
import org.apache.brooklyn.api.location.OsDetails;
+import org.apache.brooklyn.container.location.kubernetes.machine.KubernetesMachineLocation;
+import org.apache.brooklyn.container.location.kubernetes.machine.KubernetesSshMachineLocation;
import org.apache.brooklyn.core.location.BasicMachineDetails;
import org.apache.brooklyn.core.location.LocationConfigKeys;
import org.apache.brooklyn.core.location.access.PortForwardManager;
@@ -23,37 +40,32 @@ import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.net.HostAndPort;
+import java.util.List;
+import java.util.Map;
-import org.apache.brooklyn.container.location.kubernetes.machine.KubernetesMachineLocation;
-import org.apache.brooklyn.container.location.kubernetes.machine.KubernetesSshMachineLocation;
+import static org.testng.Assert.*;
/**
-/**
+ * /**
* Live tests for deploying simple containers. Particularly useful during dev, but not so useful
* after that (because assumes the existence of a kubernetes endpoint). It needs configured with
* something like:
- *
- * {@code -Dtest.amp.kubernetes.endpoint=http://10.104.2.206:8080}).
- *
+ * <p>
+ * {@code -Dtest.amp.kubernetes.endpoint=http://10.104.2.206:8080}).
+ * <p>
* The QA Framework is more important for that - hence these tests (trying to be) kept simple
* and focused.
*/
public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
- private static final Logger LOG = LoggerFactory.getLogger(KubernetesLocationLiveTest.class);
-
public static final String KUBERNETES_ENDPOINT = System.getProperty("test.amp.kubernetes.endpoint", "");
public static final String IDENTITY = System.getProperty("test.amp.kubernetes.identity", "");
public static final String CREDENTIAL = System.getProperty("test.amp.kubernetes.credential", "");
-
+ private static final Logger LOG = LoggerFactory.getLogger(KubernetesLocationLiveTest.class);
protected KubernetesLocation loc;
protected List<KubernetesMachineLocation> machines;
- @BeforeMethod(alwaysRun=true)
+ @BeforeMethod(alwaysRun = true)
@Override
public void setUp() throws Exception {
super.setUp();
@@ -61,21 +73,21 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
}
// FIXME: Clear up properly: Test leaves deployment, replicas and pods behind if obtain fails.
- @AfterMethod(alwaysRun=true)
+ @AfterMethod(alwaysRun = true)
@Override
public void tearDown() throws Exception {
for (KubernetesMachineLocation machine : machines) {
try {
loc.release(machine);
} catch (Exception e) {
- LOG.error("Error releasing machine "+machine+" in location "+loc, e);
+ LOG.error("Error releasing machine " + machine + " in location " + loc, e);
}
}
super.tearDown();
}
protected KubernetesLocation newKubernetesLocation(Map<String, ?> flags) throws Exception {
- Map<String,?> allFlags = MutableMap.<String,Object>builder()
+ Map<String, ?> allFlags = MutableMap.<String, Object>builder()
.put("identity", IDENTITY)
.put("credential", CREDENTIAL)
.put("endpoint", KUBERNETES_ENDPOINT)
@@ -84,18 +96,18 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
return (KubernetesLocation) mgmt.getLocationRegistry().getLocationManaged("kubernetes", allFlags);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testDefault() throws Exception {
// Default is "cloudsoft/centos:7"
runImage(ImmutableMap.<String, Object>of(), "centos", "7");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testMatchesCentos() throws Exception {
runImage(ImmutableMap.<String, Object>of(KubernetesLocationConfig.OS_FAMILY.getName(), "centos"), "centos", "7");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testMatchesCentos7() throws Exception {
ImmutableMap<String, Object> conf = ImmutableMap.<String, Object>of(
KubernetesLocationConfig.OS_FAMILY.getName(), "centos",
@@ -103,12 +115,12 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
runImage(conf, "centos", "7");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testMatchesUbuntu() throws Exception {
runImage(ImmutableMap.<String, Object>of(KubernetesLocationConfig.OS_FAMILY.getName(), "ubuntu"), "ubuntu", "14.04");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testMatchesUbuntu16() throws Exception {
ImmutableMap<String, Object> conf = ImmutableMap.<String, Object>of(
KubernetesLocationConfig.OS_FAMILY.getName(), "ubuntu",
@@ -116,22 +128,22 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
runImage(conf, "ubuntu", "16.04");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testCloudsoftCentos7() throws Exception {
runImage(ImmutableMap.of(KubernetesLocationConfig.IMAGE.getName(), "cloudsoft/centos:7"), "centos", "7");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testCloudsoftUbuntu14() throws Exception {
runImage(ImmutableMap.of(KubernetesLocationConfig.IMAGE.getName(), "cloudsoft/ubuntu:14.04"), "ubuntu", "14.04");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testCloudsoftUbuntu16() throws Exception {
runImage(ImmutableMap.of(KubernetesLocationConfig.IMAGE.getName(), "cloudsoft/ubuntu:16.04"), "ubuntu", "16.04");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testFailsForNonMatching() throws Exception {
ImmutableMap<String, Object> conf = ImmutableMap.<String, Object>of(
KubernetesLocationConfig.OS_FAMILY.getName(), "weirdOsFamiliy");
@@ -150,12 +162,12 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
.put(LocationConfigKeys.CALLER_CONTEXT.getName(), app)
.build());
- assertTrue(machine.isSshable(), "not sshable machine="+machine);
+ assertTrue(machine.isSshable(), "not sshable machine=" + machine);
assertOsNameContains(machine, expectedOs, expectedVersion);
assertMachinePasswordSecure(machine);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
protected void testUsesSuppliedLoginPassword() throws Exception {
// Because defaulting to "cloudsoft/centos:7", it knows to set the loginUserPassword
// on container creation.
@@ -166,11 +178,11 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
.put(LocationConfigKeys.CALLER_CONTEXT.getName(), app)
.build());
- assertTrue(machine.isSshable(), "not sshable machine="+machine);
+ assertTrue(machine.isSshable(), "not sshable machine=" + machine);
assertEquals(machine.config().get(SshMachineLocation.PASSWORD), password);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testOpenPorts() throws Exception {
List<Integer> inboundPorts = ImmutableList.of(22, 443, 8000, 8081);
loc = newKubernetesLocation(ImmutableMap.<String, Object>of());
@@ -186,9 +198,9 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
PortForwardManager pfm = (PortForwardManager) mgmt.getLocationRegistry().getLocationManaged(PortForwardManagerLocationResolver.PFM_GLOBAL_SPEC);
for (int targetPort : inboundPorts) {
HostAndPort mappedPort = pfm.lookup(machine, targetPort);
- assertNotNull(mappedPort, "no mapping for targetPort "+targetPort);
+ assertNotNull(mappedPort, "no mapping for targetPort " + targetPort);
assertEquals(mappedPort.getHostText(), publicHostText);
- assertTrue(mappedPort.hasPort(), "no port-part in "+mappedPort+" for targetPort "+targetPort);
+ assertTrue(mappedPort.hasPort(), "no port-part in " + mappedPort + " for targetPort " + targetPort);
}
}
@@ -199,8 +211,8 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
OsDetails osDetails = machineDetails.getOsDetails();
String osName = osDetails.getName();
String osVersion = osDetails.getVersion();
- assertTrue(osName != null && osName.toLowerCase().contains(expectedNamePart), "osDetails="+osDetails);
- assertTrue(osVersion != null && osVersion.toLowerCase().contains(expectedVersionPart), "osDetails="+osDetails);
+ assertTrue(osName != null && osName.toLowerCase().contains(expectedNamePart), "osDetails=" + osDetails);
+ assertTrue(osVersion != null && osVersion.toLowerCase().contains(expectedVersionPart), "osDetails=" + osDetails);
}
protected SshMachineLocation newContainerMachine(KubernetesLocation loc, Map<?, ?> flags) throws Exception {
@@ -212,7 +224,7 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
protected void assertMachinePasswordSecure(SshMachineLocation machine) {
String password = machine.config().get(SshMachineLocation.PASSWORD);
- assertTrue(password.length() > 10, "password="+password);
+ assertTrue(password.length() > 10, "password=" + password);
boolean hasUpper = false;
boolean hasLower = false;
boolean hasNonAlphabetic = false;
@@ -221,6 +233,6 @@ public class KubernetesLocationLiveTest extends BrooklynAppLiveTestSupport {
if (Character.isLowerCase(c)) hasLower = true;
if (!Character.isAlphabetic(c)) hasNonAlphabetic = true;
}
- assertTrue(hasUpper && hasLower && hasNonAlphabetic, "password="+password);
+ assertTrue(hasUpper && hasLower && hasNonAlphabetic, "password=" + password);
}
}
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationResolverTest.java b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationResolverTest.java
index 353b590..d8abf0d 100644
--- a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationResolverTest.java
+++ b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationResolverTest.java
@@ -1,10 +1,23 @@
+/*
+ * 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.container.location.kubernetes;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Map;
-
import org.apache.brooklyn.api.location.LocationSpec;
import org.apache.brooklyn.core.internal.BrooklynProperties;
import org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport;
@@ -13,10 +26,15 @@ import org.slf4j.LoggerFactory;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import java.util.Map;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
public class KubernetesLocationResolverTest extends BrooklynMgmtUnitTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(KubernetesLocationResolverTest.class);
-
+
private BrooklynProperties brooklynProperties;
@BeforeMethod(alwaysRun = true)
@@ -34,7 +52,7 @@ public class KubernetesLocationResolverTest extends BrooklynMgmtUnitTestSupport
assertEquals(spec.getType(), KubernetesLocation.class);
KubernetesLocation loc = resolve("kubernetes");
- assertTrue(loc instanceof KubernetesLocation, "loc="+loc);
+ assertTrue(loc instanceof KubernetesLocation, "loc=" + loc);
}
@Test
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationYamlLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationYamlLiveTest.java b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationYamlLiveTest.java
index 3c2a31d..f67d91f 100644
--- a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationYamlLiveTest.java
+++ b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocationYamlLiveTest.java
@@ -1,30 +1,36 @@
+/*
+ * 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.container.location.kubernetes;
-import static com.google.common.base.Predicates.and;
-import static com.google.common.base.Predicates.equalTo;
-import static com.google.common.base.Predicates.not;
-import static com.google.common.base.Predicates.notNull;
-import static org.apache.brooklyn.container.location.kubernetes.KubernetesLocationLiveTest.CREDENTIAL;
-import static org.apache.brooklyn.container.location.kubernetes.KubernetesLocationLiveTest.IDENTITY;
-import static org.apache.brooklyn.container.location.kubernetes.KubernetesLocationLiveTest.KUBERNETES_ENDPOINT;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertAttributeEquals;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertAttributeEqualsEventually;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertAttributeEventually;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertAttributeEventuallyNonNull;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertEntityHealthy;
-import static org.apache.brooklyn.test.Asserts.succeedsEventually;
-import static org.apache.brooklyn.util.http.HttpAsserts.assertHttpStatusCodeEventuallyEquals;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.util.List;
-import java.util.Map;
-
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.net.HostAndPort;
+import io.fabric8.kubernetes.api.model.Pod;
+import io.fabric8.kubernetes.client.KubernetesClient;
import org.apache.brooklyn.api.entity.Entity;
import org.apache.brooklyn.api.location.MachineLocation;
import org.apache.brooklyn.api.location.MachineProvisioningLocation;
import org.apache.brooklyn.camp.brooklyn.AbstractYamlTest;
+import org.apache.brooklyn.container.entity.docker.DockerContainer;
+import org.apache.brooklyn.container.entity.kubernetes.KubernetesPod;
+import org.apache.brooklyn.container.entity.kubernetes.KubernetesResource;
import org.apache.brooklyn.core.entity.Attributes;
import org.apache.brooklyn.core.entity.Entities;
import org.apache.brooklyn.core.entity.EntityPredicates;
@@ -39,28 +45,28 @@ import org.apache.brooklyn.location.ssh.SshMachineLocation;
import org.apache.brooklyn.util.core.config.ConfigBag;
import org.apache.brooklyn.util.net.Networking;
import org.apache.brooklyn.util.text.Identifiers;
-import org.apache.logging.log4j.util.Strings;
+import org.apache.commons.lang3.StringUtils;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.google.common.net.HostAndPort;
+import java.util.List;
+import java.util.Map;
-import org.apache.brooklyn.container.entity.docker.DockerContainer;
-import org.apache.brooklyn.container.entity.kubernetes.KubernetesPod;
-import org.apache.brooklyn.container.entity.kubernetes.KubernetesResource;
-import io.fabric8.kubernetes.api.model.Pod;
-import io.fabric8.kubernetes.client.KubernetesClient;
+import static com.google.common.base.Predicates.*;
+import static org.apache.brooklyn.container.location.kubernetes.KubernetesLocationLiveTest.*;
+import static org.apache.brooklyn.core.entity.EntityAsserts.*;
+import static org.apache.brooklyn.test.Asserts.succeedsEventually;
+import static org.apache.brooklyn.util.http.HttpAsserts.assertHttpStatusCodeEventuallyEquals;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
/**
* Live tests for deploying simple blueprints. Particularly useful during dev, but not so useful
* after that (because assumes the existence of a kubernetes endpoint). It needs configured with
* something like:
- *
- * {@code -Dtest.amp.kubernetes.endpoint=http://10.104.2.206:8080}).
- *
+ * <p>
+ * {@code -Dtest.amp.kubernetes.endpoint=http://10.104.2.206:8080}).
+ * <p>
* The QA Framework is more important for that - hence these tests (trying to be) kept simple
* and focused.
*/
@@ -70,7 +76,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
protected List<MachineLocation> machines;
protected String locationYaml;
- @BeforeMethod(alwaysRun=true)
+ @BeforeMethod(alwaysRun = true)
@Override
public void setUp() throws Exception {
super.setUp();
@@ -79,11 +85,11 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
"location:",
" kubernetes:",
" " + KubernetesLocationConfig.MASTER_URL.getName() + ": \"" + KUBERNETES_ENDPOINT + "\"",
- " " + (Strings.isBlank(IDENTITY) ? "" : "identity: "+IDENTITY),
- " " + (Strings.isBlank(CREDENTIAL) ? "" : "credential: "+CREDENTIAL));
+ " " + (StringUtils.isBlank(IDENTITY) ? "" : "identity: " + IDENTITY),
+ " " + (StringUtils.isBlank(CREDENTIAL) ? "" : "credential: " + CREDENTIAL));
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testLoginPasswordOverride() throws Exception {
String customPassword = "myDifferentPassword";
@@ -103,7 +109,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
assertTrue(machine.isSshable());
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testNetcatServer() throws Exception {
// Runs as root user (hence not `sudo yum install ...`)
// breaks if shell.env uses attributeWhenReady, so not doing that - see testNetcatServerWithDslInShellEnv()
@@ -136,10 +142,10 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
String publicMapped = assertAttributeEventuallyNonNull(entity, Sensors.newStringSensor("netcat.endpoint.mapped.public"));
HostAndPort publicPort = HostAndPort.fromString(publicMapped);
- assertTrue(Networking.isReachable(publicPort), "publicPort="+publicPort);
+ assertTrue(Networking.isReachable(publicPort), "publicPort=" + publicPort);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testInterContainerNetworking() throws Exception {
String message = "mymessage";
int netcatPort = 8081;
@@ -189,13 +195,13 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
"cat netcat.out",
"grep " + message + " netcat.out"));
- String errMsg = "result1="+result1+"; result2="+result2+"; result3="+result3;
+ String errMsg = "result1=" + result1 + "; result2=" + result2 + "; result3=" + result3;
assertEquals(result1, 0, errMsg);
assertEquals(result2, 0, errMsg);
assertEquals(result3, 0, errMsg);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testTomcatPod() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -208,7 +214,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
runTomcat(yaml, KubernetesPod.class);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testTomcatPodExtras() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -231,7 +237,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
assertEquals(labels.get("extra"), "test");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testTomcatContainer() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -256,12 +262,12 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
HostAndPort publicPort = HostAndPort.fromString(publicMapped);
assertReachableEventually(publicPort);
- assertHttpStatusCodeEventuallyEquals("http://"+publicPort.getHostText()+":"+publicPort.getPort(), 200);
+ assertHttpStatusCodeEventuallyEquals("http://" + publicPort.getHostText() + ":" + publicPort.getPort(), 200);
return entity;
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testWordpressInContainersWithStartableParent() throws Exception {
// TODO docker.container.inboundPorts doesn't accept list of ints - need to use quotes
String randomId = Identifiers.makeRandomLowercaseId(4);
@@ -297,7 +303,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
runWordpress(yaml, randomId);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testWordpressInPodsWithStartableParent() throws Exception {
// TODO docker.container.inboundPorts doesn't accept list of ints - need to use quotes
String randomId = Identifiers.makeRandomLowercaseId(4);
@@ -331,7 +337,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
runWordpress(yaml, randomId);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testWordpressInPods() throws Exception {
// TODO docker.container.inboundPorts doesn't accept list of ints - need to use quotes
String randomId = Identifiers.makeRandomLowercaseId(4);
@@ -388,7 +394,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
// TODO more assertions (e.g. wordpress can successfully reach the database)
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testPod() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -407,7 +413,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
}
/* Test disabled as QA framework AMP does not have catalog entries deployed yet */
- @Test(groups={"Live"}, enabled=false)
+ @Test(groups = {"Live"}, enabled = false)
public void testPodCatalogEntry() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -434,10 +440,10 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
HostAndPort publicPort = HostAndPort.fromString(publicMapped);
assertReachableEventually(publicPort);
- assertHttpStatusCodeEventuallyEquals("http://"+publicPort.getHostText()+":"+publicPort.getPort(), 200);
+ assertHttpStatusCodeEventuallyEquals("http://" + publicPort.getHostText() + ":" + publicPort.getPort(), 200);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testNginxReplicationController() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -465,7 +471,7 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
assertAttributeEventually(entity, SoftwareProcess.SUBNET_ADDRESS, and(notNull(), not(equalTo("0.0.0.0"))));
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testNginxService() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -500,8 +506,9 @@ public class KubernetesLocationYamlLiveTest extends AbstractYamlTest {
protected void assertReachableEventually(final HostAndPort hostAndPort) {
succeedsEventually(new Runnable() {
public void run() {
- assertTrue(Networking.isReachable(hostAndPort), "publicPort="+hostAndPort);
- }});
+ assertTrue(Networking.isReachable(hostAndPort), "publicPort=" + hostAndPort);
+ }
+ });
}
public KubernetesClient getClient(Entity entity) {
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationLiveTest.java b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationLiveTest.java
index 529733e..08bdbd1 100644
--- a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationLiveTest.java
+++ b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationLiveTest.java
@@ -1,20 +1,37 @@
+/*
+ * 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.container.location.openshift;
-import java.util.Map;
-
+import org.apache.brooklyn.container.location.kubernetes.KubernetesLocationLiveTest;
import org.apache.brooklyn.util.collections.MutableMap;
import org.apache.brooklyn.util.os.Os;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.container.location.kubernetes.KubernetesLocationLiveTest;
+import java.util.Map;
/**
- * Tests deploying containers via the {@code openshift"} location, to an OpenShift endpoint.
+ * Tests deploying containers via the {@code openshift"} location, to an OpenShift endpoint.
* By extending {@link KubernetesLocationLiveTest}, we get all the k8s tests.
- *
+ * <p>
* It needs configured with something like:
- *
+ * <p>
* <pre>
* {@code
* -Dtest.amp.openshift.endpoint=https://192.168.99.100:8443/
@@ -24,19 +41,18 @@ import org.apache.brooklyn.container.location.kubernetes.KubernetesLocationLiveT
*/
public class OpenShiftLocationLiveTest extends KubernetesLocationLiveTest {
- @SuppressWarnings("unused")
- private static final Logger LOG = LoggerFactory.getLogger(OpenShiftLocationLiveTest.class);
-
public static final String OPENSHIFT_ENDPOINT = System.getProperty("test.amp.openshift.endpoint", "");
public static final String CERTS_BASE_DIR = System.getProperty("test.amp.openshift.certsBaseDir", Os.mergePaths(System.getProperty("user.home"), "openshift-certs"));
public static final String CA_CERT_FILE = System.getProperty("test.amp.openshift.caCert", Os.mergePaths(CERTS_BASE_DIR, "ca.crt"));
public static final String CLIENT_CERT_FILE = System.getProperty("test.amp.openshift.clientCert", Os.mergePaths(CERTS_BASE_DIR, "admin.crt"));
public static final String CLIENT_KEY_FILE = System.getProperty("test.amp.openshift.clientKey", Os.mergePaths(CERTS_BASE_DIR, "admin.key"));
public static final String NAMESPACE = System.getProperty("test.amp.openshift.namespace", "");
+ @SuppressWarnings("unused")
+ private static final Logger LOG = LoggerFactory.getLogger(OpenShiftLocationLiveTest.class);
@Override
protected OpenShiftLocation newKubernetesLocation(Map<String, ?> flags) throws Exception {
- Map<String,?> allFlags = MutableMap.<String,Object>builder()
+ Map<String, ?> allFlags = MutableMap.<String, Object>builder()
.put("endpoint", OPENSHIFT_ENDPOINT)
.put("caCert", CA_CERT_FILE)
.put("clientCert", CLIENT_CERT_FILE)
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationResolverTest.java b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationResolverTest.java
index a8db320..88f5d86 100644
--- a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationResolverTest.java
+++ b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationResolverTest.java
@@ -1,10 +1,23 @@
+/*
+ * 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.container.location.openshift;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Map;
-
import org.apache.brooklyn.api.location.LocationSpec;
import org.apache.brooklyn.core.internal.BrooklynProperties;
import org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport;
@@ -13,6 +26,11 @@ import org.slf4j.LoggerFactory;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import java.util.Map;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
public class OpenShiftLocationResolverTest extends BrooklynMgmtUnitTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(OpenShiftLocationResolverTest.class);
@@ -35,7 +53,7 @@ public class OpenShiftLocationResolverTest extends BrooklynMgmtUnitTestSupport {
assertEquals(spec.getType(), OpenShiftLocation.class);
OpenShiftLocation loc = resolve("openshift");
- assertTrue(loc instanceof OpenShiftLocation, "loc="+loc);
+ assertTrue(loc instanceof OpenShiftLocation, "loc=" + loc);
}
@Test
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationYamlLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationYamlLiveTest.java b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationYamlLiveTest.java
index 4ad146f..fce4fe0 100644
--- a/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationYamlLiveTest.java
+++ b/brooklyn-server/locations/container/src/test/java/org/apache/brooklyn/container/location/openshift/OpenShiftLocationYamlLiveTest.java
@@ -1,39 +1,39 @@
+/*
+ * 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.container.location.openshift;
-import static com.google.common.base.Predicates.and;
-import static com.google.common.base.Predicates.equalTo;
-import static com.google.common.base.Predicates.not;
-import static com.google.common.base.Predicates.notNull;
-import static org.apache.brooklyn.container.location.openshift.OpenShiftLocationLiveTest.CA_CERT_FILE;
-import static org.apache.brooklyn.container.location.openshift.OpenShiftLocationLiveTest.CLIENT_CERT_FILE;
-import static org.apache.brooklyn.container.location.openshift.OpenShiftLocationLiveTest.CLIENT_KEY_FILE;
-import static org.apache.brooklyn.container.location.openshift.OpenShiftLocationLiveTest.NAMESPACE;
-import static org.apache.brooklyn.container.location.openshift.OpenShiftLocationLiveTest.OPENSHIFT_ENDPOINT;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertAttribute;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertAttributeEquals;
-import static org.apache.brooklyn.core.entity.EntityAsserts.assertEntityHealthy;
-
+import com.google.common.base.Joiner;
import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
+import org.apache.brooklyn.container.entity.openshift.OpenShiftPod;
+import org.apache.brooklyn.container.entity.openshift.OpenShiftResource;
+import org.apache.brooklyn.container.location.kubernetes.KubernetesLocationYamlLiveTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import com.google.common.base.Joiner;
-import com.google.common.collect.Iterables;
-
-import org.apache.brooklyn.container.entity.kubernetes.KubernetesPod;
-import org.apache.brooklyn.container.entity.kubernetes.KubernetesResource;
-import org.apache.brooklyn.container.location.kubernetes.KubernetesLocationYamlLiveTest;
-import org.apache.brooklyn.container.entity.openshift.OpenShiftPod;
-import org.apache.brooklyn.container.entity.openshift.OpenShiftResource;
+import static org.apache.brooklyn.container.location.openshift.OpenShiftLocationLiveTest.*;
/**
* Tests YAML apps via the {@code openshift"} location, to an OpenShift endpoint.
* By extending {@link KubernetesLocationYamlLiveTest}, we get all the k8s tests.
- *
+ * <p>
* It needs configured with something like:
- *
+ * <p>
* <pre>
* {@code
* -Dtest.amp.openshift.endpoint=https://master.example.com:8443/
@@ -64,7 +64,7 @@ public class OpenShiftLocationYamlLiveTest extends KubernetesLocationYamlLiveTes
//
// With node1, it takes only 6 seconds to deploy the we app.
- @BeforeMethod(alwaysRun=true)
+ @BeforeMethod(alwaysRun = true)
@Override
public void setUp() throws Exception {
super.setUp();
@@ -81,7 +81,7 @@ public class OpenShiftLocationYamlLiveTest extends KubernetesLocationYamlLiveTes
" " + OpenShiftLocation.LOGIN_USER_PASSWORD.getName() + ": p4ssw0rd");
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testTomcatOpenShiftPod() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -94,7 +94,7 @@ public class OpenShiftLocationYamlLiveTest extends KubernetesLocationYamlLiveTes
runTomcat(yaml, OpenShiftPod.class);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testOpenShiftPod() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -113,7 +113,7 @@ public class OpenShiftLocationYamlLiveTest extends KubernetesLocationYamlLiveTes
}
/* Test disabled as QA framework AMP does not have catalog entries deployed yet */
- @Test(groups={"Live"}, enabled=false)
+ @Test(groups = {"Live"}, enabled = false)
public void testOpenShiftPodCatalogEntry() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -131,7 +131,7 @@ public class OpenShiftLocationYamlLiveTest extends KubernetesLocationYamlLiveTes
checkPod(app, OpenShiftPod.class);
}
- @Test(groups={"Live"})
+ @Test(groups = {"Live"})
public void testNginxOpenShiftResource() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
@@ -147,7 +147,7 @@ public class OpenShiftLocationYamlLiveTest extends KubernetesLocationYamlLiveTes
}
/* Test disabled as QA framework AMP does not have catalog entries deployed yet */
- @Test(groups={"Live"}, enabled=false)
+ @Test(groups = {"Live"}, enabled = false)
public void testNginxOpenShiftResourceCatalogEntry() throws Exception {
String yaml = Joiner.on("\n").join(
locationYaml,
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/resources/nginx-replication-controller.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/resources/nginx-replication-controller.yaml b/brooklyn-server/locations/container/src/test/resources/nginx-replication-controller.yaml
index 6788a05..8aeafac 100644
--- a/brooklyn-server/locations/container/src/test/resources/nginx-replication-controller.yaml
+++ b/brooklyn-server/locations/container/src/test/resources/nginx-replication-controller.yaml
@@ -1,3 +1,20 @@
+# 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.
+
apiVersion: v1
kind: ReplicationController
metadata:
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/brooklyn-server/locations/container/src/test/resources/nginx-service.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-server/locations/container/src/test/resources/nginx-service.yaml b/brooklyn-server/locations/container/src/test/resources/nginx-service.yaml
index 3964283..db16d5b 100644
--- a/brooklyn-server/locations/container/src/test/resources/nginx-service.yaml
+++ b/brooklyn-server/locations/container/src/test/resources/nginx-service.yaml
@@ -1,3 +1,20 @@
+# 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.
+
apiVersion: v1
kind: Service
metadata:
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/docker-location/pom.xml
----------------------------------------------------------------------
diff --git a/docker-location/pom.xml b/docker-location/pom.xml
deleted file mode 100644
index 077de34..0000000
--- a/docker-location/pom.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>docker-location</artifactId>
- <packaging>jar</packaging>
-
- <parent>
- <groupId>io.cloudsoft.amp.containerservice</groupId>
- <artifactId>containerservice-parent</artifactId>
- <version>2.1.0-SNAPSHOT</version> <!-- CONTAINER_SERVICE_VERSION -->
- </parent>
-
- <name>Docker Location</name>
-
- <properties>
- <jclouds.groupId>org.apache.jclouds</jclouds.groupId>
- <jclouds.docker.version>2.0.0</jclouds.docker.version>
- </properties>
-
- <dependencies>
- <!--
- Expect AMP to exclude this, and to choose its own jclouds-docker version.
- So if this version is not kept up-to-date then it won't impact AMP.
- -->
- <dependency>
- <groupId>${jclouds.groupId}.api</groupId>
- <artifactId>docker</artifactId>
- <version>${jclouds.docker.version}</version>
- <exclusions>
- <exclusion>
- <!-- Conflicts with javax.ws.rs-api -->
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-core</artifactId>
- <version>${brooklyn.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-software-base</artifactId>
- <version>${brooklyn.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-locations-jclouds</artifactId>
- <version>${brooklyn.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>docker</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-logback-xml</artifactId>
- <version>${brooklyn.version}</version>
- <!-- optional so that this project has logging; dependencies may redeclare or supply their own -->
- <optional>true</optional>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-test-support</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-utils-test-support</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testng.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-core</artifactId>
- <version>${brooklyn.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-locations-jclouds</artifactId>
- <version>${brooklyn.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>docker</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${jax-rs-api.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-launcher</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-launcher</artifactId>
- <version>${brooklyn.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>2.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/kubernetes-location/pom.xml
----------------------------------------------------------------------
diff --git a/kubernetes-location/pom.xml b/kubernetes-location/pom.xml
deleted file mode 100644
index 4867f5f..0000000
--- a/kubernetes-location/pom.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>kubernetes-location</artifactId>
- <packaging>jar</packaging>
-
- <parent>
- <groupId>io.cloudsoft.amp.containerservice</groupId>
- <artifactId>containerservice-parent</artifactId>
- <version>2.1.0-SNAPSHOT</version> <!-- CONTAINER_SERVICE_VERSION -->
- </parent>
-
- <name>Kubernetes Location</name>
-
- <properties>
- <kubernetes-client.version>1.4.27</kubernetes-client.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>io.fabric8</groupId>
- <artifactId>kubernetes-client</artifactId>
- <version>${kubernetes-client.version}</version>
- <classifier>bundle</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-logback-xml</artifactId>
- <version>${brooklyn.version}</version>
- <!-- optional so that this project has logging; dependencies may redeclare or supply their own -->
- <optional>true</optional>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>io.cloudsoft.amp.containerservice</groupId>
- <artifactId>docker-location</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-test-support</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-utils-test-support</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-core</artifactId>
- <version>${brooklyn.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-launcher</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-launcher</artifactId>
- <version>${brooklyn.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-camp</artifactId>
- <version>${brooklyn.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${jax-rs-api.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testng.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>2.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/openshift-location/pom.xml
----------------------------------------------------------------------
diff --git a/openshift-location/pom.xml b/openshift-location/pom.xml
deleted file mode 100644
index ea61d4a..0000000
--- a/openshift-location/pom.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>openshift-location</artifactId>
- <packaging>jar</packaging>
-
- <parent>
- <groupId>io.cloudsoft.amp.containerservice</groupId>
- <artifactId>containerservice-parent</artifactId>
- <version>2.1.0-SNAPSHOT</version> <!-- CONTAINER_SERVICE_VERSION -->
- </parent>
-
- <name>OpenShift Location</name>
-
- <properties>
- <kubernetes-client.version>1.4.27</kubernetes-client.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>io.fabric8</groupId>
- <artifactId>openshift-client</artifactId>
- <version>${kubernetes-client.version}</version>
- <classifier>bundle</classifier>
- </dependency>
-
- <dependency>
- <groupId>io.cloudsoft.amp.containerservice</groupId>
- <artifactId>kubernetes-location</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-logback-xml</artifactId>
- <version>${brooklyn.version}</version>
- <!-- optional so that this project has logging; dependencies may redeclare or supply their own -->
- <optional>true</optional>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-test-support</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testng.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-core</artifactId>
- <version>${brooklyn.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>io.cloudsoft.amp.containerservice</groupId>
- <artifactId>kubernetes-location</artifactId>
- <version>${project.parent.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>${jax-rs-api.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-launcher</artifactId>
- <version>${brooklyn.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-launcher</artifactId>
- <version>${brooklyn.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-camp</artifactId>
- <version>${brooklyn.version}</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>2.5</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a334e0fe/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 3bee6f1..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>io.cloudsoft.amp.containerservice</groupId>
- <artifactId>containerservice-parent</artifactId>
- <packaging>pom</packaging>
- <version>2.1.0-SNAPSHOT</version> <!-- CONTAINER_SERVICE_VERSION -->
-
- <name>Cloudsoft Container Service</name>
- <description>
- AMP's Cloudsoft Container Service.
- </description>
-
- <parent>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-downstream-parent</artifactId>
- <version>0.12.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
- </parent>
-
- <licenses>
- <license>
- <name>Cloudsoft Commercial License</name>
- <url>http://www.cloudsoftcorp.com/cloudsoft-developer-license</url>
- </license>
- </licenses>
-
- <developers>
- <developer>
- <name>Cloudsoft Corporation</name>
- </developer>
- </developers>
-
- <scm>
- <connection>scm:git:git://github.com/cloudsoft/container-service.git</connection>
- <developerConnection>scm:git:git@github.com:cloudsoft/container-service.git</developerConnection>
- <url>https://github.com/cloudsoft/container-service</url>
- </scm>
-
- <repositories>
- <repository>
- <id>sonatype-oss-releases</id>
- <url>https://oss.sonatype.org/content/repositories/releases/</url>
- </repository>
- <repository>
- <id>sonatype-oss-snapshots</id>
- <url>https://oss.sonatype.org/content/repositories/snapshots</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>apache-snapshots</id>
- <url>https://repository.apache.org/content/repositories/snapshots</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- <!-- Cloudsoft repo, for custom releases of Brooklyn etc -->
- <repository>
- <id>cloudsoft-releases</id>
- <url>https://artifactory.cloudsoftcorp.com/artifactory/libs-release-local/</url>
- </repository>
- <repository>
- <id>cloudsoft-snapshots</id>
- <url>https://artifactory.cloudsoftcorp.com/artifactory/libs-snapshot-local/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
-
- <modules>
- <module>docker-location</module>
- <module>kubernetes-location</module>
- <module>openshift-location</module>
- <module>catalog</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.5.0</version>
- <extensions>true</extensions>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <supportedProjectTypes>
- <supportedProjectType>jar</supportedProjectType>
- </supportedProjectTypes>
- <instructions>
- <!-- OSGi specific instruction -->
- <Import-Package>!com.maxmind.geoip2,*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>Release</id>
- <activation>
- <property>
- <name>brooklyn.deployTo</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>verify</phase>
- <goals>
- <goal>jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <use>false</use>
- <links>
- <link>http://download.oracle.com/javaee/6/api</link>
- </links>
- <keywords>true</keywords>
- <author>false</author>
- <quiet>true</quiet>
- <aggregate>false</aggregate>
- <detectLinks />
- </configuration>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-gpg-plugin</artifactId>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>verify</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>cloudsoft-release</id>
- <activation>
- <property>
- <name>brooklyn.deployTo</name>
- <value>cloudsoft</value>
- </property>
- </activation>
- <distributionManagement>
- <repository>
- <id>cloudsoft-deploy-artifactory-release</id>
- <name>Cloudsoft Artifactory libs-release-local repo</name>
- <url>http://ccweb.cloudsoftcorp.com/maven/libs-release-local/</url>
- </repository>
- <snapshotRepository>
- <id>cloudsoft-deploy-artifactory-snapshot</id>
- <name>Cloudsoft Artifactory libs-snapshot-local repo</name>
- <url>http://ccweb.cloudsoftcorp.com/maven/libs-snapshot-local/</url>
- </snapshotRepository>
- </distributionManagement>
- </profile>
-
- </profiles>
-</project>