You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/07/26 02:25:03 UTC
[04/11] stratos git commit: Upgrading fabric8 kubernetes api version
to 2.2.16 and removing forked code
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ParseTest.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ParseTest.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ParseTest.java
deleted file mode 100644
index 7df3ffc..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ParseTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * Copyright 2005-2014 Red Hat, Inc.
- *
- * Red Hat 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 io.fabric8.kubernetes.api;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import io.fabric8.kubernetes.api.model.*;
-import io.fabric8.openshift.api.model.template.Template;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.List;
-
-import static io.fabric8.kubernetes.api.KubernetesHelper.getContainerPorts;
-import static io.fabric8.kubernetes.api.KubernetesHelper.toJson;
-import static io.fabric8.kubernetes.api.ParseExamplesTest.assertNotEmpty;
-import static io.fabric8.utils.Files.assertDirectoryExists;
-import static io.fabric8.utils.Files.assertFileExists;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.*;
-
-/**
- * Parses the example JSON
- */
-public class ParseTest {
-
- private static final transient Logger LOG = LoggerFactory.getLogger(ParseTest.class);
-
- public static final String SYSTEM_PROPERTY_KUBE_DIR = "kube.dir";
-
- @Test
- public void testParsePodList() throws Exception {
- KubernetesList podList = assertParseExampleFile("pod-list.json", KubernetesList.class);
- List<HasMetadata> items = podList.getItems();
- assertNotEmpty("items", items);
-
- Pod pod = (Pod) items.get(0);
- assertNotNull("pod1", pod);
- assertEquals("pod1.id", "my-pod-1", KubernetesHelper.getName(pod));
- PodSpec podSpec = pod.getSpec();
- assertNotNull("pod1.podSpec", podSpec);
- List<Container> containers = podSpec.getContainers();
- assertNotEmpty("pod1.podSpec.manifest.containers", containers);
- Container container = containers.get(0);
- assertNotNull("pod1.podSpec.container[0]", container);
- assertEquals("pod1.podSpec.container[0].name", "nginx", container.getName());
- assertEquals("pod1.podSpec.container[0].image", "dockerfile/nginx", container.getImage());
-
- LOG.info("pod1 container1 " + container);
-
- String json = toJson(podList);
- LOG.info("Got JSON: " + json);
- }
-
- @Test
- public void testParsePodListEmptyResults() throws Exception {
- PodList podList = assertParseExampleFile("pod-list-empty-results.json", PodList.class);
- List<Pod> items = podList.getItems();
- assertNotEmpty("items", items);
-
- Pod pod = items.get(0);
- assertNotNull("pod1", pod);
- assertEquals("127.0.0.1", pod.getStatus().getHostIP());
- }
-
- @Test
- public void testParseService() throws Exception {
- Service service = assertParseExampleFile("service.json", Service.class);
-
- assertEquals("Service", service.getKind());
-
- Integer expectedPort = 9090;
- assertEquals(expectedPort, getContainerPorts(service).iterator().next());
-
- ObjectMapper mapper = KubernetesFactory.createObjectMapper();
-
- //mapper.writer().writeValue(System.out, service);
- }
-
- @Test
- public void testParsePod() throws Exception {
- assertParseExampleFile("pod.json", Pod.class);
- }
-
- @Test
- public void testParseTemplate() throws Exception {
- Template template = assertParseExampleFile("template.json", Template.class);
- List<HasMetadata> objects = template.getObjects();
- assertNotEmpty("objects", objects);
- assertTrue("size is " + objects.size(), objects.size() == 2);
- Object service = objects.get(0);
- assertThat(service).isInstanceOf(Service.class);
-
- Object rc = objects.get(1);
- assertThat(rc).isInstanceOf(ReplicationController.class);
-
- System.out.println("Generated JSON: " + toJson(template));
- }
-
- @Test
- public void testParseList() throws Exception {
- KubernetesList list = assertParseExampleFile("list.json", KubernetesList.class);
- List<HasMetadata> objects = list.getItems();
- assertNotEmpty("objects", objects);
- assertEquals("size", 2, objects.size());
- Object service = objects.get(0);
- assertThat(service).isInstanceOf(Service.class);
-
- Object rc = objects.get(1);
- assertThat(rc).isInstanceOf(ReplicationController.class);
-
- System.out.println("Generated JSON: " + toJson(list));
- }
-
- public static <T> T assertParseExampleFile(String fileName, Class<T> clazz) throws Exception {
- ObjectMapper mapper = KubernetesFactory.createObjectMapper();
- File exampleFile = new File(getKubernetesExamplesDir(), fileName);
- assertFileExists(exampleFile);
- Object answer = mapper.reader(clazz).readValue(exampleFile);
- assertNotNull("Null returned while unmarshalling " + exampleFile, answer);
- LOG.info("Parsed: " + fileName + " as: " + answer);
- assertTrue("Is not an instance of " + clazz.getSimpleName() + " was: "+ answer.getClass().getName(), clazz.isInstance(answer));
- return clazz.cast(answer);
- }
-
- public static File getKubernetesSourceDir() {
- //String path = System.getProperty(SYSTEM_PROPERTY_KUBE_DIR, "../../../kubernetes");
- String basedir = System.getProperty("basedir", ".");
- String kubeSourceDir = basedir + "/src/main/kubernetes";
- String path = System.getProperty(SYSTEM_PROPERTY_KUBE_DIR, kubeSourceDir);
- File kubeDir = new File(path);
- assertTrue("Kube directory " + kubeDir
- + " does not exist! Please supply the correct value in the " + SYSTEM_PROPERTY_KUBE_DIR + " system property value",
- kubeDir.exists());
- return kubeDir;
- }
-
- public static File getKubernetesExamplesDir() {
- File answer = new File(getKubernetesSourceDir(), "api/examples");
- assertDirectoryExists(answer);
- return answer;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/PodIdToReplicationControllerIDExample.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/PodIdToReplicationControllerIDExample.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/PodIdToReplicationControllerIDExample.java
deleted file mode 100644
index 45a1d61..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/PodIdToReplicationControllerIDExample.java
+++ /dev/null
@@ -1,42 +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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.model.ReplicationController;
-
-/**
- */
-public class PodIdToReplicationControllerIDExample {
- public static void main(String[] args) {
- if (args.length < 2) {
- System.out.println("Arguments: kuberneteMasterUrl podID");
- return;
- }
- String kuberneteMasterUrl = args[0];
- String podID = args[1];
- System.out.println("Looking up ReplicationController for pod ID: " + podID);
- KubernetesClient client = new KubernetesClient(kuberneteMasterUrl);
- ReplicationController replicationController = client.getReplicationControllerForPod(podID);
- if (replicationController != null) {
- String id = KubernetesHelper.getName(replicationController);
- System.out.println("Found replication controller: " + id);
- } else {
- System.out.println("Could not find replication controller!");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ProcessTemplateLocallyTest.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ProcessTemplateLocallyTest.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ProcessTemplateLocallyTest.java
deleted file mode 100644
index 18c0044..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ProcessTemplateLocallyTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright 2005-2014 Red Hat, Inc.
- *
- * Red Hat 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.extensions.Templates;
-import io.fabric8.kubernetes.api.model.HasMetadata;
-import io.fabric8.kubernetes.api.model.KubernetesList;
-import io.fabric8.openshift.api.model.template.Template;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-import static io.fabric8.kubernetes.api.KubernetesHelper.toJson;
-import static io.fabric8.kubernetes.api.ParseExamplesTest.assertNotEmpty;
-import static io.fabric8.kubernetes.api.ParseTest.assertParseExampleFile;
-import static org.assertj.core.api.Assertions.assertThat;
-
-/**
- * Parses the example JSON
- */
-public class ProcessTemplateLocallyTest {
- private static final transient Logger LOG = LoggerFactory.getLogger(ProcessTemplateLocallyTest.class);
-
- @Test
- public void testProcessTemplateLocally() throws Exception {
- Template template = assertParseExampleFile("template.json", Template.class);
- List<HasMetadata> objects = template.getObjects();
- assertNotEmpty("objects", objects);
-
-
- KubernetesList list = Templates.processTemplatesLocally(template);
- assertThat(list).describedAs("results").isNotNull();
- List<HasMetadata> items = list.getItems();
- assertThat(items).describedAs("items").isNotNull();
-
- System.out.println("Created JSON: " + toJson(list));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TemplatesTest.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TemplatesTest.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TemplatesTest.java
deleted file mode 100644
index 8dc8c19..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TemplatesTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Copyright 2005-2014 Red Hat, Inc.
- * <p/>
- * Red Hat 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.extensions.Templates;
-import io.fabric8.kubernetes.api.model.KubernetesList;
-import io.fabric8.kubernetes.api.model.KubernetesListBuilder;
-import io.fabric8.kubernetes.api.model.Service;
-import io.fabric8.kubernetes.api.model.ServiceBuilder;
-import io.fabric8.openshift.api.model.template.Template;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class TemplatesTest {
-
- private static final transient Logger LOG = LoggerFactory.getLogger(TemplatesTest.class);
-
- @Test
- public void testCombineResourcesIntoTemplate() throws Exception {
- Service templateService = new ServiceBuilder().withNewMetadata().withName("templateService").endMetadata().build();
-
- KubernetesList list = new KubernetesListBuilder().
- addNewServiceItem().withNewMetadata().withName("service1").endMetadata().endServiceItem().
- addNewTemplateItem().
- addNewParameter().withName("PARAM1").withValue("ABC").endParameter().
- addToObjects(templateService).endTemplateItem().
- addNewServiceItem().withNewMetadata().withName("service2").endMetadata().endServiceItem().build();
-
- Object result = Templates.combineTemplates(list);
- System.out.println("Combined as " + KubernetesHelper.toJson(result));
- assertThat(result).isInstanceOf(Template.class);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TriggerBuild.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TriggerBuild.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TriggerBuild.java
deleted file mode 100644
index abb0c89..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/TriggerBuild.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright 2005-2014 Red Hat, Inc.
- *
- * Red Hat 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 io.fabric8.kubernetes.api;
-
-/**
- * Triggers a build using the Java API
- */
-public class TriggerBuild {
- public static void main(String... args) {
- if (args.length < 1) {
- System.out.println("Usage: buildConfigName namespace secret type");
- return;
- }
- String name = args[0];
- String namespace = "default";
- if (args.length > 1) {
- namespace = args[1];
- }
-
- KubernetesClient client = new KubernetesClient();
-
- System.out.println("Connecting to kubernetes on: " + client.getAddress());
-
- try {
- String uuid = client.triggerBuildAndGetUuid(name, namespace);
- System.out.println("Build triggered: got UUID: " + uuid);
- } catch (Exception e) {
- System.out.println("FAILED: " + e);
- e.printStackTrace();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/UsingBadAddressTest.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/UsingBadAddressTest.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/UsingBadAddressTest.java
deleted file mode 100644
index 40b650e..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/UsingBadAddressTest.java
+++ /dev/null
@@ -1,47 +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 io.fabric8.kubernetes.api;
-
-import io.fabric8.utils.Asserts;
-import io.fabric8.utils.Block;
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-/**
- */
-public class UsingBadAddressTest {
- protected String badAddress = "cheese://does.notexist.redhat.com:666";
-
- @Test
- public void testUseBadAddressFails() throws Exception {
- Asserts.assertException(new Block() {
- @Override
- public void invoke() throws Exception {
- new KubernetesFactory(badAddress);
- }
- });
- }
-
- @Test
- public void testUseBadAddressWithoutValidation() throws Exception {
- KubernetesFactory factory = new KubernetesFactory(badAddress, false);
- assertThat(factory).isNotNull();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewEndpoints.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewEndpoints.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewEndpoints.java
deleted file mode 100644
index 445de7f..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewEndpoints.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright 2005-2014 Red Hat, Inc.
- *
- * Red Hat 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.model.*;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static io.fabric8.utils.Lists.notNullList;
-
-/**
- * Views the endpoints for all services or the given service id and namespace
- */
-public class ViewEndpoints {
- public static void main(String... args) {
- System.out.println("Usage: [serviceId] [namespace]");
- KubernetesClient client = new KubernetesClient();
-
- System.out.println("Connecting to kubernetes on: " + client.getAddress());
-
- try {
- String service = null;
- String namespace = null;
- if (args.length > 0) {
- service = args[0];
- }
- if (args.length > 1) {
- namespace = args[1];
- }
- listEndpoints(client, service, namespace);
- } catch (Exception e) {
- System.out.println("FAILED: " + e);
- e.printStackTrace();
- }
- }
-
- protected static void listEndpoints(KubernetesClient client, String service, String namespace) throws Exception {
- if (service != null) {
- Endpoints endpoints = client.endpointsForService(service, namespace);
- display(endpoints);
-
- } else {
- EndpointsList endpointsList = client.getEndpoints();
- if (endpointsList != null) {
- List<Endpoints> items = notNullList(endpointsList.getItems());
- for (Endpoints item : items) {
- display(item);
- }
- }
- }
- }
-
- protected static void display(Endpoints endpoints) {
- if (endpoints != null) {
- String name = endpoints.getMetadata().getName();
- String namespace = endpoints.getMetadata().getNamespace();
- List<String> urls = new ArrayList<>();
- List<EndpointSubset> endpointsSubsets = endpoints.getSubsets();
-
- for (EndpointSubset endpointSubset : endpointsSubsets) {
- for (EndpointAddress endpointAddress : endpointSubset.getAddresses()) {
- for (EndpointPort endpointPort : endpointSubset.getPorts()) {
- urls.add(endpointAddress.getIP() + ":" + endpointPort.getPort());
- }
- }
- }
-
- System.out.println("Service: " + name + " namespace: " + namespace + " urls: " + urls);
- } else {
- System.out.println("null endpoints");
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewNodes.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewNodes.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewNodes.java
deleted file mode 100644
index da577ce..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewNodes.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright 2005-2014 Red Hat, Inc.
- *
- * Red Hat 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.model.Node;
-import io.fabric8.kubernetes.api.model.NodeList;
-
-import java.util.List;
-
-import static io.fabric8.utils.Lists.notNullList;
-
-/**
- * Views the minions
- */
-public class ViewNodes {
- public static void main(String... args) {
- KubernetesClient client = new KubernetesClient();
-
- System.out.println("Connecting to kubernetes on: " + client.getAddress());
-
- try {
- listMinions(client);
- } catch (Exception e) {
- System.out.println("FAILED: " + e);
- e.printStackTrace();
- }
- }
-
- protected static void listMinions(KubernetesClient client) throws Exception {
- NodeList nodeList = client.getNodes();
- if (nodeList != null) {
- List<Node> items = notNullList(nodeList.getItems());
- for (Node item : items) {
- display(item);
- }
- }
- }
-
- protected static void display(Node node) {
- if (node != null) {
- String id = node.getMetadata().getName();
- System.out.println("Node: " + id + " resources: " + node.getStatus().getCapacity());
- } else {
- System.out.println("null node");
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewServiceIPs.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewServiceIPs.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewServiceIPs.java
deleted file mode 100644
index 0ea2bb6..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/ViewServiceIPs.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright 2005-2014 Red Hat, Inc.
- *
- * Red Hat 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 io.fabric8.kubernetes.api;
-
-import java.util.Set;
-
-/**
- * Views the endpoints for all services or the given service id and namespace
- */
-public class ViewServiceIPs {
- public static void main(String... args) {
- System.out.println("Usage: [serviceName]");
-
- try {
- String service = null;
- if (args.length > 0) {
- service = args[0];
- }
-
- Set<String> addresses = KubernetesHelper.lookupServiceInDns(service);
- if (addresses != null) {
- System.out.println("addresses: " + addresses);
- } else {
- System.out.println("null addresses");
- }
- } catch (Exception e) {
- System.out.println("FAILED: " + e);
- e.printStackTrace();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuilds.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuilds.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuilds.java
deleted file mode 100644
index 4b64330..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuilds.java
+++ /dev/null
@@ -1,56 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.builds.BuildFinishedEvent;
-import io.fabric8.kubernetes.api.builds.BuildListener;
-import io.fabric8.kubernetes.api.builds.BuildWatcher;
-import io.fabric8.kubernetes.api.builds.Links;
-
-/**
- * Triggers a build using the Java API
- */
-public class WatchBuilds {
- public static void main(String... args) {
- String namespace = null;
- if (args.length > 0) {
- namespace = args[0];
- }
-
- String consoleLink = Links.getFabric8ConsoleLink();
-
- KubernetesClient client = new KubernetesClient();
- BuildListener buildListener = new BuildListener() {
- @Override
- public void onBuildFinished(BuildFinishedEvent event) {
- System.out.println("Build: " + event.getUid()
- + " for config: " + event.getConfigName()
- + " finished. Status: " + event.getStatus()
- + " link: " + event.getBuildLink());
- }
- };
- BuildWatcher watcher = new BuildWatcher(client, buildListener, namespace, consoleLink);
-
- long pollTime = 3000;
- watcher.schedule(pollTime);
-
- watcher.join();
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuildsExample.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuildsExample.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuildsExample.java
deleted file mode 100644
index 366db91..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchBuildsExample.java
+++ /dev/null
@@ -1,42 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.openshift.api.model.Build;
-import org.eclipse.jetty.websocket.client.WebSocketClient;
-
-public class WatchBuildsExample {
-
- public static void main(String... args) throws Exception {
- KubernetesClient kube = new KubernetesClient();
- System.out.println("Connecting to kubernetes on: " + kube.getAddress());
- WebSocketClient client = kube.watchBuilds(new ExampleWatcher());
- Thread.sleep(10000l);
- client.stop();
- }
-
- static class ExampleWatcher extends AbstractWatcher<Build> {
- @Override
- public void eventReceived(Action action, Build object) {
- System.out.println(action + ": " + object);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchPodsExample.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchPodsExample.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchPodsExample.java
deleted file mode 100644
index 55f6d0b..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchPodsExample.java
+++ /dev/null
@@ -1,42 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.model.Pod;
-import org.eclipse.jetty.websocket.client.WebSocketClient;
-
-public class WatchPodsExample {
-
- public static void main(String... args) throws Exception {
- KubernetesClient kube = new KubernetesClient();
- System.out.println("Connecting to kubernetes on: " + kube.getAddress());
- WebSocketClient client = kube.watchPods("default", null, new ExampleWatcher());
- Thread.sleep(10000l);
- client.stop();
- }
-
- static class ExampleWatcher extends AbstractWatcher<Pod> {
- @Override
- public void eventReceived(Watcher.Action action, Pod object) {
- System.out.println(action + ": " + object);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchServicesExample.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchServicesExample.java b/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchServicesExample.java
deleted file mode 100644
index a4acf4f..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/java/io/fabric8/kubernetes/api/WatchServicesExample.java
+++ /dev/null
@@ -1,42 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api;
-
-import io.fabric8.kubernetes.api.model.Service;
-import org.eclipse.jetty.websocket.client.WebSocketClient;
-
-public class WatchServicesExample {
-
- public static void main(String... args) throws Exception {
- KubernetesClient kube = new KubernetesClient();
- System.out.println("Connecting to kubernetes on: " + kube.getAddress());
- WebSocketClient client = kube.watchServices("jimmi", null, new ExampleWatcher());
- Thread.sleep(10000l);
- client.stop();
- }
-
- static class ExampleWatcher extends AbstractWatcher<Service> {
- @Override
- public void eventReceived(Action action, Service object) {
- System.out.println(action + ": " + object);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/resources/config.yml
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/resources/config.yml b/dependencies/fabric8/kubernetes-api/src/test/resources/config.yml
deleted file mode 100644
index 8ff585a..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/resources/config.yml
+++ /dev/null
@@ -1,70 +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.
-#
-apiVersion: v1
-clusters:
-- cluster:
- insecure-skip-tls-verify: true
- server: https://localhost:8443
- name: localhost-8443-0
-- cluster:
- insecure-skip-tls-verify: true
- server: https://localhost:8443
- name: localhost-8443-1
-- cluster:
- insecure-skip-tls-verify: true
- server: https://localhost:8443
- name: 172-28-128-4:8443
-- cluster:
- insecure-skip-tls-verify: true
- server: https://localhost:8443
- name: localhost:8443
-contexts:
-- context:
- cluster: localhost:8443
- namespace: claus
- user: admin/localhost:8443
- name: claus/localhost:8443/admin
-- context:
- cluster: 172-28-128-4:8443
- namespace: jimmi-does-rock
- user: admin/localhost:8443
- name: default/localhost:8443/admin
-- context:
- cluster: localhost:8443
- namespace: james
- user: admin/localhost:8443
- name: james/localhost:8443/admin
-- context:
- cluster: localhost:8443
- namespace: roland
- user: admin/localhost:8443
- name: roland/localhost:8443/admin
-current-context: default/localhost:8443/admin
-kind: Config
-preferences: {}
-users:
-- name: admin/somewhere:8443
- user:
- token: DEF
-- name: admin/somewhere-else:8443
- user:
- token: ABC
-- name: admin/localhost:8443
- user:
- token: ExpectedToken
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/resources/errorexample.json
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/resources/errorexample.json b/dependencies/fabric8/kubernetes-api/src/test/resources/errorexample.json
deleted file mode 100644
index 3338c5d..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/resources/errorexample.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "id": "nova-compute-controller",
- "apiVersion": "v1beta1",
- "desiredState": {
- "replicas": 6,
- "podTemplate": {
- "desiredState": {
- "manifest": {
- "id": "nova-compute-controller",
- "containers": [
- {
- "ports": [
- {
- "hostPort": 12000,
- "containerPort": 12000
- }
- ],
- "name": "nova-compute",
- "image": "kollaglue/fedora-rdo-nova-compute",
- "env": [
- {
- "name": "DB_ROOT_PASSWORD",
- "value": "password"
- },
- {
- "name": "NOVA_DB_PASSWORD",
- "value": "novadbpassword"
- },
- {
- "name": "KEYSTONE_ADMIN_TOKEN",
- "value": "ADMINTOKEN"
- }
- ],
- "privileged": true
- },
- {
- "ports": [
- {
- "hostPort": 12001,
- "containerPort": 12001
- }
- ],
- "name": "nova-network",
- "image": "kollaglue/fedora-rdo-nova-network",
- "env": [
- {
- "name": "DB_ROOT_PASSWORD",
- "value": "password"
- },
- {
- "name": "NOVA_DB_PASSWORD",
- "value": "novadbpassword"
- },
- {
- "name": "KEYSTONE_ADMIN_TOKEN",
- "value": "ADMINTOKEN"
- }
- ],
- "privileged": true
- }
- ],
- "version": "v1beta1"
- }
- },
- "labels": {
- "name": "nova-compute"
- }
- },
- "replicaSelector": {
- "name": "nova-compute"
- }
- },
- "labels": {
- "name": "nova-compute"
- },
- "kind": "ReplicationController"
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/resources/fmq-service.json
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/resources/fmq-service.json b/dependencies/fabric8/kubernetes-api/src/test/resources/fmq-service.json
deleted file mode 100644
index 4b704ba..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/resources/fmq-service.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "kind": "Service",
- "apiVersion": "v1beta3",
- "metadata": {
- "name": "fabric8-mq-service"
- },
- "spec": {
- "ports": [
- {
- "port": 6163,
- "targetPort": 6162
- }
- ],
- "selector": {
- "container": "java",
- "name": "fabric8MQ",
- "group": "fabric8MQ"
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/resources/glance-api-service.yaml
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/resources/glance-api-service.yaml b/dependencies/fabric8/kubernetes-api/src/test/resources/glance-api-service.yaml
deleted file mode 100644
index bc3f2bf..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/resources/glance-api-service.yaml
+++ /dev/null
@@ -1,25 +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.
-#
-apiVersion: v1beta1
-containerPort: 9292
-id: glance-api
-kind: Service
-port: 9292
-selector:
- name: glance
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-api/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/src/test/resources/log4j.properties b/dependencies/fabric8/kubernetes-api/src/test/resources/log4j.properties
deleted file mode 100644
index 50114a0..0000000
--- a/dependencies/fabric8/kubernetes-api/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright 2005-2014 Red Hat, Inc.
-#
-# Red Hat 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.
-#
-
-log4j.rootLogger=INFO, stdout
-
-#The logging properties used during tests..
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%-5p %-30.30c{1} - %m%n
-log4j.appender.stdout.threshold=DEBUG
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/README.md
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/README.md b/dependencies/fabric8/kubernetes-model/README.md
deleted file mode 100644
index 6019aa8..0000000
--- a/dependencies/fabric8/kubernetes-model/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## Fabric8 Kubernetes Client API Model
-
-Fabric8 Kubernetes Client API Model 2.1.11 has been forked to fix issue [1]. The fix has been merged to master branch,
-once the next Fabric8 release is published to Nexus this fork can be removed.
-
-[1] [origin-schema-generator/pull/50] (https://github.com/fabric8io/origin-schema-generator/pull/50)
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/pom.xml b/dependencies/fabric8/kubernetes-model/pom.xml
deleted file mode 100644
index 1b0ca97..0000000
--- a/dependencies/fabric8/kubernetes-model/pom.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2005-2014 Red Hat, Inc.
-
- Red Hat 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.
-
--->
-<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>
-
- <parent>
- <groupId>org.apache.stratos</groupId>
- <artifactId>stratos-dependencies-fabric8</artifactId>
- <version>4.1.1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>kubernetes-model</artifactId>
- <version>2.1.11-stratosv1</version>
- <packaging>bundle</packaging>
-
- <name>Fabric8 :: Kubernetes Generated Model</name>
-
- <properties>
- <clone-kube>true</clone-kube>
- <kube.dir>${basedir}/src/main/resources</kube.dir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>io.sundr</groupId>
- <artifactId>sundr-annotations</artifactId>
- <version>0.0.16</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.module</groupId>
- <artifactId>jackson-module-jaxb-annotations</artifactId>
- <version>2.4.0</version>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.1.0.Final</version>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jsonschema2pojo</groupId>
- <artifactId>jsonschema2pojo-maven-plugin</artifactId>
- <version>0.4.10</version>
- <configuration>
- <sourceDirectory>${kube.dir}/schema</sourceDirectory>
- <targetPackage>io.fabric8.kubernetes.api.model</targetPackage>
- <includeConstructors>true</includeConstructors>
- <includeJsr303Annotations>true</includeJsr303Annotations>
- <outputDirectory>${basedir}/target/generated-sources</outputDirectory>
- <customAnnotator>io.fabric8.kubernetes.annotator.KubernetesTypeAnnotator</customAnnotator>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>io.fabric8.schemagenerator</groupId>
- <artifactId>kubernetes-annotator</artifactId>
- <version>0.0.45</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <configuration>
- <target>
- <echo>removing the duplicate generated calss</echo>
- <delete file="${basedir}/target/generated-sources/io/fabric8/kubernetes/api/model/util/IntOrString.java" verbose="true" />
- <delete file="${basedir}/target/generated-sources/io/fabric8/kubernetes/api/model/resource/Quantity.java" verbose="true" />
- <delete file="${basedir}/target/generated-sources/io/fabric8/openshift/api/model/template/Template.java" verbose="true" />
- <delete file="${basedir}/target/generated-sources/io/fabric8/kubernetes/api/model/HasMetadata.java" verbose="true" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <version>2.3.7</version>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
- <Export-Package>
- io.fabric8.kubernetes.api.model
- </Export-Package>
- <Import-Package>
- org.osgi.framework,
- *;resolution:=optional
- </Import-Package>
- <DynamicImport-Package>*</DynamicImport-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.9.1</version>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${build.outputDirectory}/schema/kube-schema.json</file>
- <type>json</type>
- <classifier>schema</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.5</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <version>1.5</version>
- <configuration>
- <passphrase>${gpg.passphrase}</passphrase>
- <useAgent>true</useAgent>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesBaseConfig.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesBaseConfig.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesBaseConfig.java
deleted file mode 100644
index 4c8a558..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesBaseConfig.java
+++ /dev/null
@@ -1,33 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.config;
-
-import io.sundr.builder.annotations.ExternalBuildables;
-
-@ExternalBuildables(editableEnabled=false, validationEnabled = true, builderPackage = "io.fabric8.common", value = {
- "io.fabric8.kubernetes.api.model.base.ListMeta",
- "io.fabric8.kubernetes.api.model.base.ObjectMeta",
- "io.fabric8.kubernetes.api.model.base.ObjectReference",
- "io.fabric8.kubernetes.api.model.base.Status",
- "io.fabric8.kubernetes.api.model.base.StatusCause",
- "io.fabric8.kubernetes.api.model.base.StatusDetails"
-})
-public class KubernetesBaseConfig {
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesConfig.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesConfig.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesConfig.java
deleted file mode 100644
index 226487a..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/KubernetesConfig.java
+++ /dev/null
@@ -1,100 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.config;
-
-import io.sundr.builder.annotations.ExternalBuildables;
-
-@ExternalBuildables(editableEnabled=false, validationEnabled = true, builderPackage = "io.fabric8.common", value = {
- "io.fabric8.kubernetes.api.model.BaseKubernetesList",
- "io.fabric8.kubernetes.api.model.KubernetesList",
-
- "io.fabric8.kubernetes.api.model.Capabilities",
- "io.fabric8.kubernetes.api.model.Container",
- "io.fabric8.kubernetes.api.model.ContainerPort",
- "io.fabric8.kubernetes.api.model.ContainerState",
- "io.fabric8.kubernetes.api.model.ContainerStateRunning",
- "io.fabric8.kubernetes.api.model.ContainerStateTerminated",
- "io.fabric8.kubernetes.api.model.ContainerStateWaiting",
- "io.fabric8.kubernetes.api.model.ContainerStatus",
- "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource",
- "io.fabric8.kubernetes.api.model.EndpointAddress",
- "io.fabric8.kubernetes.api.model.EndpointPort",
- "io.fabric8.kubernetes.api.model.EndpointSubset",
- "io.fabric8.kubernetes.api.model.Endpoints",
- "io.fabric8.kubernetes.api.model.EndpointsList",
- "io.fabric8.kubernetes.api.model.EnvVar",
- "io.fabric8.kubernetes.api.model.EnvVarSource",
- "io.fabric8.kubernetes.api.model.ExecAction",
- "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource",
- "io.fabric8.kubernetes.api.model.GitRepoVolumeSource",
- "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource",
- "io.fabric8.kubernetes.api.model.HTTPGetAction",
- "io.fabric8.kubernetes.api.model.Handler",
- "io.fabric8.kubernetes.api.model.HostPathVolumeSource",
- "io.fabric8.kubernetes.api.model.ISCSIVolumeSource",
- "io.fabric8.kubernetes.api.model.KubeSchema",
- "io.fabric8.kubernetes.api.model.Lifecycle",
- "io.fabric8.kubernetes.api.model.ListMeta",
- "io.fabric8.kubernetes.api.model.NFSVolumeSource",
- "io.fabric8.kubernetes.api.model.Namespace",
- "io.fabric8.kubernetes.api.model.NamespaceList",
- "io.fabric8.kubernetes.api.model.NamespaceSpec",
- "io.fabric8.kubernetes.api.model.NamespaceStatus",
- "io.fabric8.kubernetes.api.model.Node",
- "io.fabric8.kubernetes.api.model.NodeAddress",
- "io.fabric8.kubernetes.api.model.NodeCondition",
- "io.fabric8.kubernetes.api.model.NodeList",
- "io.fabric8.kubernetes.api.model.NodeSpec",
- "io.fabric8.kubernetes.api.model.NodeStatus",
- "io.fabric8.kubernetes.api.model.NodeSystemInfo",
- "io.fabric8.kubernetes.api.model.ObjectFieldSelector",
- "io.fabric8.kubernetes.api.model.ObjectMeta",
- "io.fabric8.kubernetes.api.model.ObjectReference",
- "io.fabric8.kubernetes.api.model.Pod",
- "io.fabric8.kubernetes.api.model.PodCondition",
- "io.fabric8.kubernetes.api.model.PodList",
- "io.fabric8.kubernetes.api.model.PodSpec",
- "io.fabric8.kubernetes.api.model.PodStatus",
- "io.fabric8.kubernetes.api.model.PodTemplateSpec",
- "io.fabric8.kubernetes.api.model.Probe",
- "io.fabric8.kubernetes.api.model.ReplicationController",
- "io.fabric8.kubernetes.api.model.ReplicationControllerList",
- "io.fabric8.kubernetes.api.model.ReplicationControllerSpec",
- "io.fabric8.kubernetes.api.model.ReplicationControllerStatus",
- "io.fabric8.kubernetes.api.model.ResourceRequirements",
- "io.fabric8.kubernetes.api.model.Secret",
- "io.fabric8.kubernetes.api.model.SecretList",
- "io.fabric8.kubernetes.api.model.SecretVolumeSource",
- "io.fabric8.kubernetes.api.model.Service",
- "io.fabric8.kubernetes.api.model.ServiceAccount",
- "io.fabric8.kubernetes.api.model.ServiceAccountList",
- "io.fabric8.kubernetes.api.model.ServiceList",
- "io.fabric8.kubernetes.api.model.ServicePort",
- "io.fabric8.kubernetes.api.model.ServiceSpec",
- "io.fabric8.kubernetes.api.model.ServiceStatus",
- "io.fabric8.kubernetes.api.model.TCPSocketAction",
- "io.fabric8.kubernetes.api.model.Volume",
- "io.fabric8.kubernetes.api.model.VolumeMount",
-
- "io.fabric8.kubernetes.api.model.util.IntOrString",
- "io.fabric8.kubernetes.api.model.resource.Quantity"
-})
-public class KubernetesConfig {
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/OpenshiftConfig.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/OpenshiftConfig.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/OpenshiftConfig.java
deleted file mode 100644
index 9063761..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/config/OpenshiftConfig.java
+++ /dev/null
@@ -1,86 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.config;
-
-import io.sundr.builder.annotations.ExternalBuildables;
-
-@ExternalBuildables(editableEnabled=false, validationEnabled = true, builderPackage = "io.fabric8.common", value = {
- "io.fabric8.openshift.api.model.Build",
- "io.fabric8.openshift.api.model.BuildConfig",
- "io.fabric8.openshift.api.model.BuildConfigList",
- "io.fabric8.openshift.api.model.BuildConfigSpec",
- "io.fabric8.openshift.api.model.BuildConfigStatus",
- "io.fabric8.openshift.api.model.BuildList",
- "io.fabric8.openshift.api.model.BuildOutput",
- "io.fabric8.openshift.api.model.BuildSource",
- "io.fabric8.openshift.api.model.BuildSpec",
- "io.fabric8.openshift.api.model.BuildStatus",
- "io.fabric8.openshift.api.model.BuildStrategy",
- "io.fabric8.openshift.api.model.BuildTriggerPolicy",
- "io.fabric8.openshift.api.model.CustomBuildStrategy",
- "io.fabric8.openshift.api.model.CustomDeploymentStrategyParams",
- "io.fabric8.openshift.api.model.DeploymentCause",
- "io.fabric8.openshift.api.model.DeploymentCauseImageTrigger",
- "io.fabric8.openshift.api.model.DeploymentConfig",
- "io.fabric8.openshift.api.model.DeploymentConfigList",
- "io.fabric8.openshift.api.model.DeploymentConfigSpec",
- "io.fabric8.openshift.api.model.DeploymentConfigStatus",
- "io.fabric8.openshift.api.model.DeploymentDetails",
- "io.fabric8.openshift.api.model.DeploymentStrategy",
- "io.fabric8.openshift.api.model.DeploymentTriggerImageChangeParams",
- "io.fabric8.openshift.api.model.DeploymentTriggerPolicy",
- "io.fabric8.openshift.api.model.DockerBuildStrategy",
- "io.fabric8.openshift.api.model.ExecNewPodHook",
- "io.fabric8.openshift.api.model.GitBuildSource",
- "io.fabric8.openshift.api.model.GitSourceRevision",
- "io.fabric8.openshift.api.model.Image",
- "io.fabric8.openshift.api.model.ImageChangeTrigger",
- "io.fabric8.openshift.api.model.ImageList",
- "io.fabric8.openshift.api.model.ImageStream",
- "io.fabric8.openshift.api.model.ImageStreamList",
- "io.fabric8.openshift.api.model.ImageStreamSpec",
- "io.fabric8.openshift.api.model.ImageStreamStatus",
- "io.fabric8.openshift.api.model.LifecycleHook",
- "io.fabric8.openshift.api.model.NamedTagEventList",
- "io.fabric8.openshift.api.model.NamedTagReference",
- "io.fabric8.openshift.api.model.OAuthAccessToken",
- "io.fabric8.openshift.api.model.OAuthAccessTokenList",
- "io.fabric8.openshift.api.model.OAuthAuthorizeToken",
- "io.fabric8.openshift.api.model.OAuthAuthorizeTokenList",
- "io.fabric8.openshift.api.model.OAuthClient",
- "io.fabric8.openshift.api.model.OAuthClientAuthorization",
- "io.fabric8.openshift.api.model.OAuthClientAuthorizationList",
- "io.fabric8.openshift.api.model.OAuthClientList",
- "io.fabric8.openshift.api.model.RecreateDeploymentStrategyParams",
- "io.fabric8.openshift.api.model.Route",
- "io.fabric8.openshift.api.model.RouteList",
- "io.fabric8.openshift.api.model.RouteSpec",
- "io.fabric8.openshift.api.model.RouteStatus",
- "io.fabric8.openshift.api.model.SourceBuildStrategy",
- "io.fabric8.openshift.api.model.SourceControlUser",
- "io.fabric8.openshift.api.model.SourceRevision",
- "io.fabric8.openshift.api.model.TLSConfig",
- "io.fabric8.openshift.api.model.TagEvent",
- "io.fabric8.openshift.api.model.WebHookTrigger",
- "io.fabric8.openshift.api.model.template.Template",
- "io.fabric8.openshift.api.model.template.Parameter"
-})
-public class OpenshiftConfig {
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java
deleted file mode 100644
index 81b31b0..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/HasMetadata.java
+++ /dev/null
@@ -1,26 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api.model;
-
-public interface HasMetadata extends KubernetesResource {
-
- ObjectMeta getMetadata();
- void setMetadata(ObjectMeta metadata);
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesKind.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesKind.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesKind.java
deleted file mode 100644
index 932db61..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesKind.java
+++ /dev/null
@@ -1,90 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api.model;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum KubernetesKind {
-
- List(KubernetesList.class),
- ServiceAccount(ServiceAccount.class),
- ServiceAccountList(ServiceAccountList.class),
- Service(Service.class),
- ServiceList(ServiceList.class),
- Pod(Pod.class),
- PodList(PodList.class),
- ReplicationController(ReplicationController.class),
- ReplicationControllerList(ReplicationControllerList.class),
- Namespace(Namespace.class),
- NamespaceList(NamespaceList.class),
- Secret(Secret.class),
- SecretList(SecretList.class),
- Endpoints(Endpoints.class),
- EndpointsList(EndpointsList.class),
- Node(Node.class),
- NodeList(NodeList.class),
- Build(io.fabric8.openshift.api.model.Build.class),
- BuildList(io.fabric8.openshift.api.model.BuildList.class),
- BuildConfig(io.fabric8.openshift.api.model.BuildConfig.class),
- BuildConfigList(io.fabric8.openshift.api.model.BuildConfigList.class),
- DeploymentConfig(io.fabric8.openshift.api.model.DeploymentConfig.class),
- DeploymentConfigList(io.fabric8.openshift.api.model.DeploymentConfigList.class),
- Image(io.fabric8.openshift.api.model.Image.class),
- ImageList(io.fabric8.openshift.api.model.ImageList.class),
- ImageStream(io.fabric8.openshift.api.model.ImageStream.class),
- ImageStreamList(io.fabric8.openshift.api.model.ImageStreamList.class),
- NameTagReference(io.fabric8.openshift.api.model.NamedTagReference.class),
- NameTagEventList(io.fabric8.openshift.api.model.NamedTagEventList.class),
- Route(io.fabric8.openshift.api.model.Route.class),
- RouteList(io.fabric8.openshift.api.model.RouteList.class),
- Template(io.fabric8.openshift.api.model.template.Template.class),
- TemplateList(io.fabric8.openshift.api.model.template.TemplateList.class),
- OAuthClient(io.fabric8.openshift.api.model.OAuthClient.class),
- OAuthClientList(io.fabric8.openshift.api.model.OAuthClientList.class),
- OAuthClientAuthorization(io.fabric8.openshift.api.model.OAuthClientAuthorization.class),
- OAuthClientAuthorizationList(io.fabric8.openshift.api.model.OAuthClientAuthorizationList.class),
- OAuthAuthorizeToken(io.fabric8.openshift.api.model.OAuthAuthorizeToken.class),
- OAuthAuthorizeTokenList(io.fabric8.openshift.api.model.OAuthAuthorizeTokenList.class),
- OAuthAccessToken(io.fabric8.openshift.api.model.OAuthAccessToken.class),
- OAuthAccessTokenList(io.fabric8.openshift.api.model.OAuthAccessTokenList.class);
-
- private static final Map<String, Class<? extends KubernetesResource>> map = new HashMap<String, Class<? extends KubernetesResource>>();
-
- static {
- for (KubernetesKind kind : KubernetesKind.values()) {
- map.put(kind.name(), kind.type);
- }
- }
-
- private final Class<? extends KubernetesResource> type;
-
- KubernetesKind(Class type) {
- this.type = type;
- }
-
- public Class getType() {
- return type;
- }
-
- public static Class<? extends KubernetesResource> getTypeForName(String name) {
- return map.get(name);
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesList.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesList.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesList.java
deleted file mode 100644
index 9f3f246..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesList.java
+++ /dev/null
@@ -1,68 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api.model;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import javax.annotation.Generated;
-import java.util.List;
-
-
-/**
- *
- *
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@Generated("org.jsonschema2pojo")
-@JsonPropertyOrder({
- "annotations",
- "apiVersion",
- "creationTimestamp",
- "deletionTimestamp",
- "generateName",
- "id",
- "items",
- "kind",
- "namespace",
- "resourceVersion",
- "selfLink",
- "uid"
-})
-@JsonDeserialize(using = JsonDeserializer.None.class)
-public class KubernetesList extends BaseKubernetesList implements KubernetesResource {
-
- /**
- * No args constructor for use in serialization
- */
- public KubernetesList() {
- super();
- }
-
- public KubernetesList(KubernetesList.ApiVersion apiVersion,
- List<HasMetadata> items,
- String kind,
- ListMeta metadata) {
- super(apiVersion, items, kind, metadata);
- this.setItems(items);
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesResource.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesResource.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesResource.java
deleted file mode 100644
index 2f669ef..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/KubernetesResource.java
+++ /dev/null
@@ -1,27 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api.model;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import io.fabric8.kubernetes.internal.KubernetesDeserializer;
-
-@JsonDeserialize(using = KubernetesDeserializer.class)
-public interface KubernetesResource {
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/resource/Quantity.java
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/resource/Quantity.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/resource/Quantity.java
deleted file mode 100644
index 7061dff..0000000
--- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/resource/Quantity.java
+++ /dev/null
@@ -1,153 +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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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 io.fabric8.kubernetes.api.model.resource;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.ObjectCodec;
-import com.fasterxml.jackson.databind.*;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import javax.annotation.Generated;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- *
- *
- */
-@JsonDeserialize(using = Quantity.Deserializer.class)
-@JsonSerialize(using = Quantity.Serializer.class)
-@Generated("org.jsonschema2pojo")
-public class Quantity {
-
- private String amount;
- private String format;
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Quantity() {
- }
-
- /**
- *
- * @param Format
- * @param Amount
- */
- public Quantity(String amount) {
- this.amount = amount;
- }
-
- /**
- *
- * @param Format
- * @param Amount
- */
- public Quantity(String amount, String format) {
- this.amount = amount;
- this.format = format;
- }
-
- public String getAmount() {
- return amount;
- }
-
- public void setAmount(String amount) {
- this.amount = amount;
- }
-
- public String getFormat() {
- return format;
- }
-
- public void setFormat(String format) {
- this.format = format;
- }
-
- @Override
- public String toString() {
- return ToStringBuilder.reflectionToString(this);
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(amount).append(format).append(additionalProperties).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Quantity) == false) {
- return false;
- }
- Quantity rhs = ((Quantity) other);
- return new EqualsBuilder().append(amount, rhs.amount).append(format, rhs.format).append(additionalProperties, rhs.additionalProperties).isEquals();
- }
-
- public static class Serializer extends JsonSerializer<Quantity> {
-
- @Override
- public void serialize(Quantity value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
- if (value != null && value.getAmount() != null) {
- jgen.writeNumber(value.getAmount());
- } else {
- jgen.writeNull();
- }
- }
- }
-
- public static class Deserializer extends JsonDeserializer<Quantity> {
-
- @Override
- public Quantity deserialize(JsonParser jsonParser, DeserializationContext ctxt) throws IOException, JsonProcessingException {
- ObjectCodec oc = jsonParser.getCodec();
- JsonNode node = oc.readTree(jsonParser);
- Quantity quantity = new Quantity(node.asText());
- return quantity;
- }
-
- }
-
-}