Remove null KubernetePod return heuristic

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

Branch: refs/heads/master
Commit: 90123e40512f9f6bbf5662791dee083197db6bb1
Parents: 5656c43
Author: Andrew Donald Kennedy <[email protected]>
Authored: Tue Jan 31 18:40:52 2017 +0000
Committer: Andrew Donald Kennedy <[email protected]>
Committed: Fri May 19 14:01:20 2017 +0100

----------------------------------------------------------------------
 .../kubernetes/location/KubernetesLocation.java               | 7 -------
 .../kubernetes/location/KubernetesLocationYamlLiveTest.java   | 3 ++-
 2 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/90123e40/kubernetes-location/src/main/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocation.java
----------------------------------------------------------------------
diff --git 
a/kubernetes-location/src/main/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocation.java
 
b/kubernetes-location/src/main/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocation.java
index fa0250d..28f193c 100644
--- 
a/kubernetes-location/src/main/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocation.java
+++ 
b/kubernetes-location/src/main/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocation.java
@@ -185,13 +185,6 @@ public class KubernetesLocation extends AbstractLocation 
implements MachineProvi
         if (isKubernetesResource(entity)) {
             return createKubernetesResourceLocation(entity, setup);
         } else {
-            // Heuristic for determining whether KubernetesPod is simply a 
container
-            if (isKubernetesPod(entity) &&
-                    entity.config().get(DockerContainer.IMAGE_NAME) == null &&
-                    entity.config().get(DockerContainer.INBOUND_TCP_PORTS) == 
null &&
-                    entity.getChildren().size() > 0) {
-                return null;
-            }
             return createKubernetesContainerLocation(entity, setup);
         }
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/90123e40/kubernetes-location/src/test/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocationYamlLiveTest.java
----------------------------------------------------------------------
diff --git 
a/kubernetes-location/src/test/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocationYamlLiveTest.java
 
b/kubernetes-location/src/test/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocationYamlLiveTest.java
index 853fbe5..9654d6d 100644
--- 
a/kubernetes-location/src/test/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocationYamlLiveTest.java
+++ 
b/kubernetes-location/src/test/java/io/cloudsoft/amp/containerservice/kubernetes/location/KubernetesLocationYamlLiveTest.java
@@ -32,6 +32,7 @@ import org.apache.brooklyn.core.sensor.Sensors;
 import org.apache.brooklyn.entity.software.base.EmptySoftwareProcess;
 import org.apache.brooklyn.entity.software.base.SoftwareProcess;
 import org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess;
+import org.apache.brooklyn.entity.stock.BasicStartable;
 import org.apache.brooklyn.location.ssh.SshMachineLocation;
 import org.apache.brooklyn.util.core.config.ConfigBag;
 import org.apache.brooklyn.util.net.Networking;
@@ -266,7 +267,7 @@ public class KubernetesLocationYamlLiveTest extends 
AbstractYamlTest {
         String yaml = Joiner.on("\n").join(
                 locationYaml,
                 "services:",
-                "  - type: " + KubernetesPod.class.getName(),
+                "  - type: " + BasicStartable.class.getName(),
                 "    brooklyn.children:",
                 "      - type: " + DockerContainer.class.getName(),
                 "        id: wordpress-mysql",

Reply via email to