http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/util/IntOrString.java ---------------------------------------------------------------------- diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/util/IntOrString.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/util/IntOrString.java deleted file mode 100644 index 11f7e80..0000000 --- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/api/model/util/IntOrString.java +++ /dev/null @@ -1,213 +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.util; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -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.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -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.util.HashMap; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonDeserialize(using = IntOrString.Deserializer.class) -@JsonSerialize(using = IntOrString.Serializer.class) -@JsonPropertyOrder({ - "IntVal", - "Kind", - "StrVal" -}) -public class IntOrString { - - @JsonProperty("IntVal") - private Integer IntVal; - @JsonProperty("Kind") - private Integer Kind; - @JsonProperty("StrVal") - private String StrVal; - @JsonIgnore - private Map<String, Object> additionalProperties = new HashMap<String, Object>(); - - public IntOrString() { - } - - //Builders are generated for the first non-empty constructor found. - public IntOrString(Integer intVal, Integer kind, String strVal, Map<String, Object> additionalProperties) { - IntVal = intVal; - Kind = kind; - StrVal = strVal; - this.additionalProperties = additionalProperties; - } - - public IntOrString(Integer intVal) { - this(intVal, 0, null, new HashMap<String, Object>()); - } - - public IntOrString(String strVal) { - this(null, 1, strVal, new HashMap<String, Object>()); - } - - - /** - * - * @return - * The IntVal - */ - @JsonProperty("IntVal") - public Integer getIntVal() { - return IntVal; - } - - /** - * - * @param IntVal - * The IntVal - */ - @JsonProperty("IntVal") - public void setIntVal(Integer IntVal) { - this.IntVal = IntVal; - } - - /** - * - * @return - * The Kind - */ - @JsonProperty("Kind") - public Integer getKind() { - return Kind; - } - - /** - * - * @param Kind - * The Kind - */ - @JsonProperty("Kind") - public void setKind(Integer Kind) { - this.Kind = Kind; - } - - /** - * - * @return - * The StrVal - */ - @JsonProperty("StrVal") - public String getStrVal() { - return StrVal; - } - - /** - * - * @param StrVal - * The StrVal - */ - @JsonProperty("StrVal") - public void setStrVal(String StrVal) { - this.StrVal = StrVal; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } - - @Override - public boolean equals(Object other) { - return EqualsBuilder.reflectionEquals(this, other); - } - - @JsonAnyGetter - public Map<String, Object> getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - public static class Serializer extends JsonSerializer<IntOrString> { - - @Override - public void serialize(IntOrString value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - if (value != null) { - Integer intValue = value.getIntVal(); - if (intValue != null) { - jgen.writeNumber(intValue); - } else { - String stringValue = value.getStrVal(); - if (stringValue != null) { - jgen.writeString(stringValue); - } else { - jgen.writeNull(); - } - } - } else { - jgen.writeNull(); - } - } - - } - - public static class Deserializer extends JsonDeserializer<IntOrString> { - - @Override - public IntOrString deserialize(JsonParser jsonParser, DeserializationContext ctxt) throws IOException, JsonProcessingException { - ObjectCodec oc = jsonParser.getCodec(); - JsonNode node = oc.readTree(jsonParser); - IntOrString intOrString = new IntOrString(); - int asInt = node.asInt(); - if (asInt != 0) { - intOrString.setIntVal(asInt); - } else { - intOrString.setStrVal(node.asText()); - } - return intOrString; - } - - } -}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataComparator.java ---------------------------------------------------------------------- diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataComparator.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataComparator.java deleted file mode 100644 index 2763e8a..0000000 --- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataComparator.java +++ /dev/null @@ -1,49 +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.internal; - -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.kubernetes.api.model.Service; - -import java.util.Comparator; - -public class HasMetadataComparator implements Comparator<HasMetadata> { - @Override - public int compare(HasMetadata a, HasMetadata b) { - if (a == null || b == null) { - throw new NullPointerException("Cannot compare null HasMetadata objects"); - } - if (a == b) { - return 0; - } - - if (a instanceof Service && !(b instanceof Service)) { - return -1; - } - if (b instanceof Service && !(a instanceof Service)) { - return 1; - } - int classCompare = a.getClass().getSimpleName().compareTo(b.getClass().getSimpleName()); - if (classCompare != 0) { - return classCompare; - } - return a.getMetadata().getName().compareTo(b.getMetadata().getName()); - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataSet.java ---------------------------------------------------------------------- diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataSet.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataSet.java deleted file mode 100644 index 2ce40a4..0000000 --- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/HasMetadataSet.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * <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.internal; - -import io.fabric8.kubernetes.api.model.HasMetadata; - -import java.util.Collection; -import java.util.SortedSet; -import java.util.TreeSet; - -public class HasMetadataSet extends TreeSet<HasMetadata> { - - public HasMetadataSet() { - super(new HasMetadataComparator()); - } - - public HasMetadataSet(Collection<? extends HasMetadata> c) { - super(new HasMetadataComparator()); - addAll(c); - } - - public HasMetadataSet(SortedSet<HasMetadata> s) { - super(new HasMetadataComparator()); - addAll(s); - } - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java ---------------------------------------------------------------------- diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java deleted file mode 100644 index cd63f08..0000000 --- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java +++ /dev/null @@ -1,52 +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.internal; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import io.fabric8.kubernetes.api.model.KubernetesKind; -import io.fabric8.kubernetes.api.model.KubernetesResource; - -import java.io.IOException; - -public class KubernetesDeserializer extends JsonDeserializer<KubernetesResource> { - - private static final String KIND = "kind"; - - @Override - public KubernetesResource deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - ObjectNode node = jp.readValueAsTree(); - JsonNode kind = node.get(KIND); - if (kind != null) { - String value = kind.textValue(); - Class<? extends KubernetesResource> resourceType = KubernetesKind.getTypeForName(value); - if (resourceType == null) { - throw ctxt.mappingException("No resource type found for kind:" + value); - } else { - return jp.getCodec().treeToValue(node, resourceType); - } - } - return null; - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/openshift/api/model/template/Template.java ---------------------------------------------------------------------- diff --git a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/openshift/api/model/template/Template.java b/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/openshift/api/model/template/Template.java deleted file mode 100644 index b790e7e..0000000 --- a/dependencies/fabric8/kubernetes-model/src/main/java/io/fabric8/openshift/api/model/template/Template.java +++ /dev/null @@ -1,324 +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.openshift.api.model.template; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import io.fabric8.kubernetes.api.model.*; -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 javax.validation.Valid; -import javax.validation.constraints.NotNull; -import java.util.*; - - -/** - * - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonPropertyOrder({ - "apiVersion", - "kind", - "labels", - "metadata", - "objects", - "parameters" -}) -@JsonDeserialize(using = JsonDeserializer.None.class) -public class Template implements HasMetadata { - - /** - * - * (Required) - * - */ - @JsonProperty("apiVersion") - @NotNull - private Template.ApiVersion apiVersion = Template.ApiVersion.fromValue("v1beta3"); - /** - * - * (Required) - * - */ - @JsonProperty("kind") - @NotNull - private java.lang.String kind = "Template"; - /** - * - * - */ - @JsonProperty("labels") - @Valid - private Map<String, String> labels; - /** - * - * - */ - @JsonProperty("metadata") - @Valid - private ObjectMeta metadata; - /** - * - * - */ - @JsonProperty("objects") - @Valid - private List<HasMetadata> objects = new ArrayList<HasMetadata>(); - /** - * - * - */ - @JsonProperty("parameters") - @Valid - private List<Parameter> parameters = new ArrayList<Parameter>(); - @JsonIgnore - private Map<java.lang.String, java.lang.Object> additionalProperties = new HashMap<java.lang.String, java.lang.Object>(); - - - /** - * No args constructor for use in serialization - * - */ - public Template() { - } - - /** - * - * @param apiVersion - * @param labels - * @param parameters - * @param objects - * @param kind - * @param metadata - */ - public Template(Template.ApiVersion apiVersion, java.lang.String kind, Map<String, String> labels, ObjectMeta metadata, List<HasMetadata> objects, List<Parameter> parameters) { - this.apiVersion = apiVersion; - this.kind = kind; - this.labels = labels; - this.metadata = metadata; - this.objects = objects; - this.parameters = parameters; - - this.setObjects(objects); - } - - /** - * - * (Required) - * - * @return - * The apiVersion - */ - @JsonProperty("apiVersion") - public Template.ApiVersion getApiVersion() { - return apiVersion; - } - - /** - * - * (Required) - * - * @param apiVersion - * The apiVersion - */ - @JsonProperty("apiVersion") - public void setApiVersion(Template.ApiVersion apiVersion) { - this.apiVersion = apiVersion; - } - - /** - * - * (Required) - * - * @return - * The kind - */ - @JsonProperty("kind") - public java.lang.String getKind() { - return kind; - } - - /** - * - * (Required) - * - * @param kind - * The kind - */ - @JsonProperty("kind") - public void setKind(java.lang.String kind) { - this.kind = kind; - } - - /** - * - * - * @return - * The labels - */ - @JsonProperty("labels") - public Map<String, String> getLabels() { - return labels; - } - - /** - * - * - * @param labels - * The labels - */ - @JsonProperty("labels") - public void setLabels(Map<String, String> labels) { - this.labels = labels; - } - - /** - * - * - * @return - * The metadata - */ - @JsonProperty("metadata") - public ObjectMeta getMetadata() { - return metadata; - } - - /** - * - * - * @param metadata - * The metadata - */ - @JsonProperty("metadata") - public void setMetadata(ObjectMeta metadata) { - this.metadata = metadata; - } - - /** - * - * - * @return - * The objects - */ - @JsonProperty("objects") - public List<HasMetadata> getObjects() { - return objects; - } - - public void setObjects(List<HasMetadata> objects) { - this.objects = objects; - } - - /** - * - * - * @return - * The parameters - */ - @JsonProperty("parameters") - public List<Parameter> getParameters() { - return parameters; - } - - /** - * - * - * @param parameters - * The parameters - */ - @JsonProperty("parameters") - public void setParameters(List<Parameter> parameters) { - this.parameters = parameters; - } - - @Override - public java.lang.String toString() { - return ToStringBuilder.reflectionToString(this); - } - - @JsonAnyGetter - public Map<java.lang.String, java.lang.Object> getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(java.lang.String name, java.lang.Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public int hashCode() { - return new HashCodeBuilder().append(apiVersion).append(kind).append(labels).append(metadata).append(objects).append(parameters).append(additionalProperties).toHashCode(); - } - - @Override - public boolean equals(java.lang.Object other) { - if (other == this) { - return true; - } - if ((other instanceof Template) == false) { - return false; - } - Template rhs = ((Template) other); - return new EqualsBuilder().append(apiVersion, rhs.apiVersion).append(kind, rhs.kind).append(labels, rhs.labels).append(metadata, rhs.metadata).append(objects, rhs.objects).append(parameters, rhs.parameters).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - - @Generated("org.jsonschema2pojo") - public static enum ApiVersion { - - V_1_BETA_3("v1beta3"), - V_1("v1"); - private final java.lang.String value; - private static Map<java.lang.String, Template.ApiVersion> constants = new HashMap<java.lang.String, Template.ApiVersion>(); - - static { - for (Template.ApiVersion c: values()) { - constants.put(c.value, c); - } - } - - private ApiVersion(java.lang.String value) { - this.value = value; - } - - @JsonValue - @Override - public java.lang.String toString() { - return this.value; - } - - @JsonCreator - public static Template.ApiVersion fromValue(java.lang.String value) { - Template.ApiVersion constant = constants.get(value); - if (constant == null) { - throw new IllegalArgumentException(value); - } else { - return constant; - } - } - - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/de610a67/dependencies/fabric8/kubernetes-model/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/dependencies/fabric8/kubernetes-model/src/main/resources/log4j.properties b/dependencies/fabric8/kubernetes-model/src/main/resources/log4j.properties deleted file mode 100644 index 73b9512..0000000 --- a/dependencies/fabric8/kubernetes-model/src/main/resources/log4j.properties +++ /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 -# -# 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. -# - -# Root logger option -log4j.rootLogger=INFO, stdout - -# Direct log messages to stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n \ No newline at end of file
