diff --git a/Makefile b/Makefile index cf2584ae187..3b93c7a721d 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,7 @@ generate-openapi-classes: cd kubernetes-model-generator/openshift-model-miscellaneous && mvn -Pgenerate clean install cd kubernetes-model-generator/openshift-model-operatorhub && mvn -Pgenerate clean install cd kubernetes-model-generator/openshift-model-console && mvn -Pgenerate clean install + cd kubernetes-model-generator/openshift-model-autoscaling && mvn -Pgenerate clean install # Legacy generation of the model: TODO: remove .PHONY: generate-model-legacy diff --git a/doc/MIGRATION-v7.md b/doc/MIGRATION-v7.md index a1c7c8749ee..dc1c6d90231 100644 --- a/doc/MIGRATION-v7.md +++ b/doc/MIGRATION-v7.md @@ -8,6 +8,7 @@ - [Moved packages](#model-changes-moved-packages) - [Service Catalog removed (operator.openshift.io)](#service-catalog-removed) - [Removed deprecated types for network.openshift.io (OpenShift-SDN-only)](#openshift-network-removed) + - [Renamed clusterautoscaling to autoscaling](#openshift-clusterautoscaling-to-autoscaling) - [Deprecations and Removals](#deprecations-and-removals) - [Service Catalog API (extension) removed](#service-catalog-extension) @@ -32,6 +33,11 @@ annotations, you need to switch to [Official OSGi Component annotations](https:/ ## Model Changes +The way we generate the Kubernetes model types/classes has changed. +We've moved from a reflection-based approach from the Go types, to a mixed approach leveraging the OpenAPI schemas that are publicly available. + +This change has had several impacts on the generated classes, including: + ### kubernetes-model artifact removed The Maven artifact `io.fabric8:kubernetes-model` has been removed from the project and is no longer published. @@ -69,6 +75,14 @@ The moved types include: - OperatorPKI (`openshift-model-operator`) - ProjectHelmChartRepository (`openshift-model-miscellaneous`) +### Renamed clusterautoscaling to autoscaling + +The module `openshift-model-clusterautoscaling` has been renamed to `openshift-model-autoscaling` to match the API group name. + +The package has also been renamed from `io.fabric8.openshift.api.model.clusterautoscaling` to `io.fabric8.openshift.api.model.autoscaling`. + +The OpenShiftClient DSL entry-point has also been renamed from `OpenShiftClient.clusterAutoscaling()` to `OpenShiftClient.openShiftAutoscaling()`. + ## Deprecations and Removals ### Service Catalog API (extension) removed diff --git a/kubernetes-model-generator/generateModel.sh b/kubernetes-model-generator/generateModel.sh index 4e3fe531d7f..20c1db12dd4 100755 --- a/kubernetes-model-generator/generateModel.sh +++ b/kubernetes-model-generator/generateModel.sh @@ -22,7 +22,6 @@ ABSOLUTE_BASEDIR=$(realpath "$BASEDIR") # Array for all existing modules declare -a modules=( - "openshift-model-clusterautoscaling" "openshift-model-hive" "openshift-model-machine" "openshift-model-installer" diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/pom.xml b/kubernetes-model-generator/openshift-model-autoscaling/pom.xml similarity index 64% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/pom.xml rename to kubernetes-model-generator/openshift-model-autoscaling/pom.xml index 293fd4ba9ee..b1c40176719 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/pom.xml +++ b/kubernetes-model-generator/openshift-model-autoscaling/pom.xml @@ -26,7 +26,7 @@ 7.0-SNAPSHOT - openshift-model-clusterautoscaling + openshift-model-autoscaling bundle Fabric8 :: OpenShift Cluster Autoscaler Operator Model @@ -34,7 +34,7 @@ true * - io.fabric8.openshift.api.model.clusterautoscaling**, + io.fabric8.openshift.api.model.autoscaling**, @@ -43,41 +43,30 @@ io.fabric8 kubernetes-model-core - - io.fabric8 - kubernetes-model-common - - - io.fabric8 - openshift-model - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - false - - - - - - - generate - org.jsonschema2pojo - jsonschema2pojo-maven-plugin + io.fabric8 + openapi-model-generator-maven-plugin + + + + ${openapi.schema.openshift-latest} + + + io.fabric8.kubernetes.api.model + io.fabric8.openshift.api.model.autoscaling + + + ^io\.openshift\.autoscaling\..*$ + + + diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscaler.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscaler.java similarity index 88% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscaler.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscaler.java index b5eeaed7069..2858922411d 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscaler.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscaler.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.LinkedHashMap; import java.util.Map; @@ -17,6 +17,7 @@ import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -47,7 +48,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -81,11 +82,12 @@ public class ClusterAutoscaler implements Editable , H @JsonProperty("kind") private String kind = "ClusterAutoscaler"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private ClusterAutoscalerSpec spec; @JsonProperty("status") - private ClusterAutoscalerStatus status; + @JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class) + private Object status; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -96,7 +98,7 @@ public class ClusterAutoscaler implements Editable , H public ClusterAutoscaler() { } - public ClusterAutoscaler(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, ClusterAutoscalerSpec spec, ClusterAutoscalerStatus status) { + public ClusterAutoscaler(String apiVersion, String kind, ObjectMeta metadata, ClusterAutoscalerSpec spec, Object status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -146,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } @@ -166,12 +168,13 @@ public void setSpec(ClusterAutoscalerSpec spec) { } @JsonProperty("status") - public ClusterAutoscalerStatus getStatus() { + public Object getStatus() { return status; } @JsonProperty("status") - public void setStatus(ClusterAutoscalerStatus status) { + @JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class) + public void setStatus(Object status) { this.status = status; } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerList.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerList.java similarity index 90% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerList.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerList.java index b74cc2f87ce..b443a4eb8ac 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerList.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerList.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -67,7 +67,7 @@ @Version("v1") @Group("autoscaling.openshift.io") @Generated("jsonschema2pojo") -public class ClusterAutoscalerList implements Editable , KubernetesResource, KubernetesResourceList +public class ClusterAutoscalerList implements Editable , KubernetesResource, KubernetesResourceList { /** @@ -79,7 +79,7 @@ public class ClusterAutoscalerList implements Editable items = new ArrayList<>(); + private List items = new ArrayList<>(); /** * * (Required) @@ -99,7 +99,7 @@ public class ClusterAutoscalerList implements Editable items, String kind, ListMeta metadata) { + public ClusterAutoscalerList(String apiVersion, List items, String kind, ListMeta metadata) { super(); this.apiVersion = apiVersion; this.items = items; @@ -129,12 +129,12 @@ public void setApiVersion(String apiVersion) { @JsonProperty("items") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getItems() { + public List getItems() { return items; } @JsonProperty("items") - public void setItems(List items) { + public void setItems(List items) { this.items = items; } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerSpec.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpec.java similarity index 86% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerSpec.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpec.java index 647e496eaf5..ef06289e13a 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerSpec.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpec.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -35,6 +35,7 @@ @JsonPropertyOrder({ "balanceSimilarNodeGroups", "balancingIgnoredLabels", + "expanders", "ignoreDaemonsetsUtilization", "logVerbosity", "maxNodeProvisionTime", @@ -70,6 +71,9 @@ public class ClusterAutoscalerSpec implements Editable balancingIgnoredLabels = new ArrayList<>(); + @JsonProperty("expanders") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List expanders = new ArrayList<>(); @JsonProperty("ignoreDaemonsetsUtilization") private Boolean ignoreDaemonsetsUtilization; @JsonProperty("logVerbosity") @@ -81,9 +85,9 @@ public class ClusterAutoscalerSpec implements Editable balancingIgnoredLabels, Boolean ignoreDaemonsetsUtilization, Integer logVerbosity, String maxNodeProvisionTime, Integer maxPodGracePeriod, Integer podPriorityThreshold, ResourceLimits resourceLimits, ScaleDownConfig scaleDown, Boolean skipNodesWithLocalStorage) { + public ClusterAutoscalerSpec(Boolean balanceSimilarNodeGroups, List balancingIgnoredLabels, List expanders, Boolean ignoreDaemonsetsUtilization, Integer logVerbosity, String maxNodeProvisionTime, Integer maxPodGracePeriod, Integer podPriorityThreshold, ClusterAutoscalerSpecResourceLimits resourceLimits, ClusterAutoscalerSpecScaleDown scaleDown, Boolean skipNodesWithLocalStorage) { super(); this.balanceSimilarNodeGroups = balanceSimilarNodeGroups; this.balancingIgnoredLabels = balancingIgnoredLabels; + this.expanders = expanders; this.ignoreDaemonsetsUtilization = ignoreDaemonsetsUtilization; this.logVerbosity = logVerbosity; this.maxNodeProvisionTime = maxNodeProvisionTime; @@ -131,6 +136,17 @@ public void setBalancingIgnoredLabels(List balancingIgnoredLabels) { this.balancingIgnoredLabels = balancingIgnoredLabels; } + @JsonProperty("expanders") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getExpanders() { + return expanders; + } + + @JsonProperty("expanders") + public void setExpanders(List expanders) { + this.expanders = expanders; + } + @JsonProperty("ignoreDaemonsetsUtilization") public Boolean getIgnoreDaemonsetsUtilization() { return ignoreDaemonsetsUtilization; @@ -182,22 +198,22 @@ public void setPodPriorityThreshold(Integer podPriorityThreshold) { } @JsonProperty("resourceLimits") - public ResourceLimits getResourceLimits() { + public ClusterAutoscalerSpecResourceLimits getResourceLimits() { return resourceLimits; } @JsonProperty("resourceLimits") - public void setResourceLimits(ResourceLimits resourceLimits) { + public void setResourceLimits(ClusterAutoscalerSpecResourceLimits resourceLimits) { this.resourceLimits = resourceLimits; } @JsonProperty("scaleDown") - public ScaleDownConfig getScaleDown() { + public ClusterAutoscalerSpecScaleDown getScaleDown() { return scaleDown; } @JsonProperty("scaleDown") - public void setScaleDown(ScaleDownConfig scaleDown) { + public void setScaleDown(ClusterAutoscalerSpecScaleDown scaleDown) { this.scaleDown = scaleDown; } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ResourceRange.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLCores.java similarity index 87% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ResourceRange.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLCores.java index 589b97ce8a4..4088ee811de 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ResourceRange.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLCores.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.LinkedHashMap; import java.util.Map; @@ -52,7 +52,7 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class ResourceRange implements Editable , KubernetesResource +public class ClusterAutoscalerSpecRLCores implements Editable , KubernetesResource { @JsonProperty("max") @@ -66,10 +66,10 @@ public class ResourceRange implements Editable , Kubernete * No args constructor for use in serialization * */ - public ResourceRange() { + public ClusterAutoscalerSpecRLCores() { } - public ResourceRange(Integer max, Integer min) { + public ClusterAutoscalerSpecRLCores(Integer max, Integer min) { super(); this.max = max; this.min = min; @@ -96,12 +96,12 @@ public void setMin(Integer min) { } @JsonIgnore - public ResourceRangeBuilder edit() { - return new ResourceRangeBuilder(this); + public ClusterAutoscalerSpecRLCoresBuilder edit() { + return new ClusterAutoscalerSpecRLCoresBuilder(this); } @JsonIgnore - public ResourceRangeBuilder toBuilder() { + public ClusterAutoscalerSpecRLCoresBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/GPULimit.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLGpus.java similarity index 88% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/GPULimit.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLGpus.java index 8983c5a96b0..8b43af1cc68 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/GPULimit.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLGpus.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.LinkedHashMap; import java.util.Map; @@ -53,7 +53,7 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class GPULimit implements Editable , KubernetesResource +public class ClusterAutoscalerSpecRLGpus implements Editable , KubernetesResource { @JsonProperty("max") @@ -69,10 +69,10 @@ public class GPULimit implements Editable , KubernetesResource * No args constructor for use in serialization * */ - public GPULimit() { + public ClusterAutoscalerSpecRLGpus() { } - public GPULimit(Integer max, Integer min, String type) { + public ClusterAutoscalerSpecRLGpus(Integer max, Integer min, String type) { super(); this.max = max; this.min = min; @@ -110,12 +110,12 @@ public void setType(String type) { } @JsonIgnore - public GPULimitBuilder edit() { - return new GPULimitBuilder(this); + public ClusterAutoscalerSpecRLGpusBuilder edit() { + return new ClusterAutoscalerSpecRLGpusBuilder(this); } @JsonIgnore - public GPULimitBuilder toBuilder() { + public ClusterAutoscalerSpecRLGpusBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerStatus.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLMemory.java similarity index 70% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerStatus.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLMemory.java index a7cbc651c0f..7e2095feb7c 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ClusterAutoscalerStatus.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecRLMemory.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.LinkedHashMap; import java.util.Map; @@ -8,6 +8,7 @@ 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.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.builder.Editable; @@ -30,7 +31,8 @@ @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - + "max", + "min" }) @ToString @EqualsAndHashCode @@ -50,19 +52,56 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class ClusterAutoscalerStatus implements Editable , KubernetesResource +public class ClusterAutoscalerSpecRLMemory implements Editable , KubernetesResource { + @JsonProperty("max") + private Integer max; + @JsonProperty("min") + private Integer min; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); + /** + * No args constructor for use in serialization + * + */ + public ClusterAutoscalerSpecRLMemory() { + } + + public ClusterAutoscalerSpecRLMemory(Integer max, Integer min) { + super(); + this.max = max; + this.min = min; + } + + @JsonProperty("max") + public Integer getMax() { + return max; + } + + @JsonProperty("max") + public void setMax(Integer max) { + this.max = max; + } + + @JsonProperty("min") + public Integer getMin() { + return min; + } + + @JsonProperty("min") + public void setMin(Integer min) { + this.min = min; + } + @JsonIgnore - public ClusterAutoscalerStatusBuilder edit() { - return new ClusterAutoscalerStatusBuilder(this); + public ClusterAutoscalerSpecRLMemoryBuilder edit() { + return new ClusterAutoscalerSpecRLMemoryBuilder(this); } @JsonIgnore - public ClusterAutoscalerStatusBuilder toBuilder() { + public ClusterAutoscalerSpecRLMemoryBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ResourceLimits.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecResourceLimits.java similarity index 77% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ResourceLimits.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecResourceLimits.java index a39a2da5ee0..23258739d08 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ResourceLimits.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecResourceLimits.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -56,18 +56,18 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class ResourceLimits implements Editable , KubernetesResource +public class ClusterAutoscalerSpecResourceLimits implements Editable , KubernetesResource { @JsonProperty("cores") - private ResourceRange cores; + private ClusterAutoscalerSpecRLCores cores; @JsonProperty("gpus") @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List gpus = new ArrayList<>(); + private List gpus = new ArrayList<>(); @JsonProperty("maxNodesTotal") private Integer maxNodesTotal; @JsonProperty("memory") - private ResourceRange memory; + private ClusterAutoscalerSpecRLMemory memory; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -75,10 +75,10 @@ public class ResourceLimits implements Editable , Kuberne * No args constructor for use in serialization * */ - public ResourceLimits() { + public ClusterAutoscalerSpecResourceLimits() { } - public ResourceLimits(ResourceRange cores, List gpus, Integer maxNodesTotal, ResourceRange memory) { + public ClusterAutoscalerSpecResourceLimits(ClusterAutoscalerSpecRLCores cores, List gpus, Integer maxNodesTotal, ClusterAutoscalerSpecRLMemory memory) { super(); this.cores = cores; this.gpus = gpus; @@ -87,23 +87,23 @@ public ResourceLimits(ResourceRange cores, List gpus, Integer maxNodes } @JsonProperty("cores") - public ResourceRange getCores() { + public ClusterAutoscalerSpecRLCores getCores() { return cores; } @JsonProperty("cores") - public void setCores(ResourceRange cores) { + public void setCores(ClusterAutoscalerSpecRLCores cores) { this.cores = cores; } @JsonProperty("gpus") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getGpus() { + public List getGpus() { return gpus; } @JsonProperty("gpus") - public void setGpus(List gpus) { + public void setGpus(List gpus) { this.gpus = gpus; } @@ -118,22 +118,22 @@ public void setMaxNodesTotal(Integer maxNodesTotal) { } @JsonProperty("memory") - public ResourceRange getMemory() { + public ClusterAutoscalerSpecRLMemory getMemory() { return memory; } @JsonProperty("memory") - public void setMemory(ResourceRange memory) { + public void setMemory(ClusterAutoscalerSpecRLMemory memory) { this.memory = memory; } @JsonIgnore - public ResourceLimitsBuilder edit() { - return new ResourceLimitsBuilder(this); + public ClusterAutoscalerSpecResourceLimitsBuilder edit() { + return new ClusterAutoscalerSpecResourceLimitsBuilder(this); } @JsonIgnore - public ResourceLimitsBuilder toBuilder() { + public ClusterAutoscalerSpecResourceLimitsBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ScaleDownConfig.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecScaleDown.java similarity index 89% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ScaleDownConfig.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecScaleDown.java index aa93ee29a67..9e0cbae3e87 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1/ScaleDownConfig.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1/ClusterAutoscalerSpecScaleDown.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1; +package io.fabric8.openshift.api.model.autoscaling.v1; import java.util.LinkedHashMap; import java.util.Map; @@ -56,7 +56,7 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class ScaleDownConfig implements Editable , KubernetesResource +public class ClusterAutoscalerSpecScaleDown implements Editable , KubernetesResource { @JsonProperty("delayAfterAdd") @@ -78,10 +78,10 @@ public class ScaleDownConfig implements Editable , Kuber * No args constructor for use in serialization * */ - public ScaleDownConfig() { + public ClusterAutoscalerSpecScaleDown() { } - public ScaleDownConfig(String delayAfterAdd, String delayAfterDelete, String delayAfterFailure, Boolean enabled, String unneededTime, String utilizationThreshold) { + public ClusterAutoscalerSpecScaleDown(String delayAfterAdd, String delayAfterDelete, String delayAfterFailure, Boolean enabled, String unneededTime, String utilizationThreshold) { super(); this.delayAfterAdd = delayAfterAdd; this.delayAfterDelete = delayAfterDelete; @@ -152,12 +152,12 @@ public void setUtilizationThreshold(String utilizationThreshold) { } @JsonIgnore - public ScaleDownConfigBuilder edit() { - return new ScaleDownConfigBuilder(this); + public ClusterAutoscalerSpecScaleDownBuilder edit() { + return new ClusterAutoscalerSpecScaleDownBuilder(this); } @JsonIgnore - public ScaleDownConfigBuilder toBuilder() { + public ClusterAutoscalerSpecScaleDownBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscaler.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscaler.java similarity index 91% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscaler.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscaler.java index acf505b45df..301a680179a 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscaler.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscaler.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1beta1; +package io.fabric8.openshift.api.model.autoscaling.v1beta1; import java.util.LinkedHashMap; import java.util.Map; @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -48,7 +49,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -82,7 +83,7 @@ public class MachineAutoscaler implements Editable , H @JsonProperty("kind") private String kind = "MachineAutoscaler"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private MachineAutoscalerSpec spec; @JsonProperty("status") @@ -97,7 +98,7 @@ public class MachineAutoscaler implements Editable , H public MachineAutoscaler() { } - public MachineAutoscaler(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, MachineAutoscalerSpec spec, MachineAutoscalerStatus status) { + public MachineAutoscaler(String apiVersion, String kind, ObjectMeta metadata, MachineAutoscalerSpec spec, MachineAutoscalerStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -147,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscalerList.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscalerList.java similarity index 90% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscalerList.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscalerList.java index b655d592fe3..41b0054bdab 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscalerList.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscalerList.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1beta1; +package io.fabric8.openshift.api.model.autoscaling.v1beta1; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -67,7 +67,7 @@ @Version("v1beta1") @Group("autoscaling.openshift.io") @Generated("jsonschema2pojo") -public class MachineAutoscalerList implements Editable , KubernetesResource, KubernetesResourceList +public class MachineAutoscalerList implements Editable , KubernetesResource, KubernetesResourceList { /** @@ -79,7 +79,7 @@ public class MachineAutoscalerList implements Editable items = new ArrayList<>(); + private List items = new ArrayList<>(); /** * * (Required) @@ -99,7 +99,7 @@ public class MachineAutoscalerList implements Editable items, String kind, ListMeta metadata) { + public MachineAutoscalerList(String apiVersion, List items, String kind, ListMeta metadata) { super(); this.apiVersion = apiVersion; this.items = items; @@ -129,12 +129,12 @@ public void setApiVersion(String apiVersion) { @JsonProperty("items") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getItems() { + public List getItems() { return items; } @JsonProperty("items") - public void setItems(List items) { + public void setItems(List items) { this.items = items; } diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscalerSpec.java b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscalerSpec.java similarity index 92% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscalerSpec.java rename to kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscalerSpec.java index dd183b4c6a0..272e6fe337f 100644 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/openshift/api/model/clusterautoscaling/v1beta1/MachineAutoscalerSpec.java +++ b/kubernetes-model-generator/openshift-model-autoscaling/src/generated/java/io/fabric8/openshift/api/model/autoscaling/v1beta1/MachineAutoscalerSpec.java @@ -1,5 +1,5 @@ -package io.fabric8.openshift.api.model.clusterautoscaling.v1beta1; +package io.fabric8.openshift.api.model.autoscaling.v1beta1; import java.util.LinkedHashMap; import java.util.Map; @@ -61,7 +61,7 @@ public class MachineAutoscalerSpec implements Editable additionalProperties = new LinkedHashMap(); @@ -72,7 +72,7 @@ public class MachineAutoscalerSpec implements Editable , KubernetesResource +public class MachineAutoscalerSpecScaleTargetRef implements Editable , KubernetesResource { @JsonProperty("apiVersion") @@ -69,10 +69,10 @@ public class CrossVersionObjectReference implements Editable additionalProperties = new LinkedHashMap(); @@ -66,18 +66,18 @@ public class MachineAutoscalerStatus implements Editable , KubernetesResource +{ + + @JsonProperty("apiVersion") + private String apiVersion; + @JsonProperty("kind") + private String kind; + @JsonProperty("name") + private String name; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public MachineAutoscalerStatusLastTargetRef() { + } + + public MachineAutoscalerStatusLastTargetRef(String apiVersion, String kind, String name) { + super(); + this.apiVersion = apiVersion; + this.kind = kind; + this.name = name; + } + + @JsonProperty("apiVersion") + public String getApiVersion() { + return apiVersion; + } + + @JsonProperty("apiVersion") + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + @JsonProperty("kind") + public String getKind() { + return kind; + } + + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonIgnore + public MachineAutoscalerStatusLastTargetRefBuilder edit() { + return new MachineAutoscalerStatusLastTargetRefBuilder(this); + } + + @JsonIgnore + public MachineAutoscalerStatusLastTargetRefBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/main/resources/schema/kube-schema.json b/kubernetes-model-generator/openshift-model-autoscaling/src/main/resources/schema/kube-schema.json similarity index 100% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/main/resources/schema/kube-schema.json rename to kubernetes-model-generator/openshift-model-autoscaling/src/main/resources/schema/kube-schema.json diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/main/resources/schema/validation-schema.json b/kubernetes-model-generator/openshift-model-autoscaling/src/main/resources/schema/validation-schema.json similarity index 100% rename from kubernetes-model-generator/openshift-model-clusterautoscaling/src/main/resources/schema/validation-schema.json rename to kubernetes-model-generator/openshift-model-autoscaling/src/main/resources/schema/validation-schema.json diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/Makefile b/kubernetes-model-generator/openshift-model-clusterautoscaling/Makefile deleted file mode 100644 index c09a7003874..00000000000 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (C) 2015 Red Hat, Inc. -# -# Licensed 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. -# - -SHELL := /bin/bash - -all: build - -build: gobuild - mvn -Pgenerate clean install -DskipTests - -gobuild: - CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 go build -a ./cmd/generate/generate.go - ./generate > src/main/resources/schema/kube-schema.json - ./generate validation > src/main/resources/schema/validation-schema.json diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/cmd/generate/generate.go b/kubernetes-model-generator/openshift-model-clusterautoscaling/cmd/generate/generate.go deleted file mode 100644 index 9b40605c74b..00000000000 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/cmd/generate/generate.go +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (C) 2015 Red Hat, Inc. - * - * Licensed 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 main - -import ( - "bytes" - "encoding/json" - "fmt" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apimachineryversion "k8s.io/apimachinery/pkg/version" - runtime "k8s.io/apimachinery/pkg/runtime" - "log" - "reflect" - "strings" - "time" - clusterautoscalerv1beta1 "github.com/openshift/cluster-autoscaler-operator/pkg/apis/autoscaling/v1beta1" - clusterautoscalerv1 "github.com/openshift/cluster-autoscaler-operator/pkg/apis/autoscaling/v1" - - "os" - - "github.com/fabric8io/kubernetes-client/kubernetes-model-generator/pkg/schemagen" -) - -type Schema struct { - Info apimachineryversion.Info - APIGroup metav1.APIGroup - APIGroupList metav1.APIGroupList - BaseKubernetesList metav1.List - ObjectMeta metav1.ObjectMeta - TypeMeta metav1.TypeMeta - Status metav1.Status - Patch metav1.Patch - Time metav1.Time - ClusterAutoscaler clusterautoscalerv1.ClusterAutoscaler - ClusterAutoscalerList clusterautoscalerv1.ClusterAutoscalerList - V1beta1MachineAutoscaler clusterautoscalerv1beta1.MachineAutoscaler - V1beta1MachineAutoscalerList clusterautoscalerv1beta1.MachineAutoscalerList -} - -func main() { - packages := []schemagen.PackageDescriptor{ - {"k8s.io/api/core/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_core_", false}, - {"k8s.io/apimachinery/pkg/api/resource", "", "io.fabric8.kubernetes.api.model", "kubernetes_resource_", false}, - {"k8s.io/apimachinery/pkg/util/intstr", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_pkg_util_intstr_", false}, - {"k8s.io/apimachinery/pkg/runtime", "", "io.fabric8.openshift.api.model.runtime", "kubernetes_apimachinery_pkg_runtime_", false}, - {"k8s.io/apimachinery/pkg/version", "", "io.fabric8.kubernetes.api.model.version", "kubernetes_apimachinery_pkg_version_", false}, - {"k8s.io/kubernetes/pkg/util", "", "io.fabric8.kubernetes.api.model", "kubernetes_util_", false}, - {"k8s.io/kubernetes/pkg/api/errors", "", "io.fabric8.kubernetes.api.model", "kubernetes_errors_", false}, - {"k8s.io/kubernetes/pkg/api/unversioned", "", "io.fabric8.kubernetes.api.model", "api_", false}, - {"k8s.io/apimachinery/pkg/apis/meta/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_", false}, - {"github.com/openshift/api/config/v1", "", "io.fabric8.openshift.api.model", "os_config_v1_", false}, - {"github.com/openshift/cluster-autoscaler-operator/pkg/apis/autoscaling/v1", "autoscaling", "io.fabric8.openshift.api.model.clusterautoscaling.v1", "os_clusterautoscaling_v1_", true}, - {"github.com/openshift/cluster-autoscaler-operator/pkg/apis/autoscaling/v1beta1", "autoscaling", "io.fabric8.openshift.api.model.clusterautoscaling.v1beta1", "os_clusterautoscaling_v1beta1_", true}, - } - - typeMap := map[reflect.Type]reflect.Type{ - reflect.TypeOf(time.Time{}): reflect.TypeOf(""), - reflect.TypeOf(struct{}{}): reflect.TypeOf(""), - } - manualTypeMap := map[reflect.Type]string { - reflect.TypeOf(runtime.RawExtension{}): "java.util.Map", - } - schema, err := schemagen.GenerateSchema(reflect.TypeOf(Schema{}), packages, typeMap, manualTypeMap,"clusterautoscaling") - if err != nil { - fmt.Fprintf(os.Stderr, "An error occurred: %v", err) - return - } - - args := os.Args[1:] - if len(args) < 1 || args[0] != "validation" { - schema.Resources = nil - } - - b, err := json.Marshal(&schema) - if err != nil { - log.Fatal(err) - } - result := string(b) - result = strings.Replace(result, "\"additionalProperty\":", "\"additionalProperties\":", -1) - - var out bytes.Buffer - err = json.Indent(&out, []byte(result), "", " ") - if err != nil { - log.Fatal(err) - } - - fmt.Println(out.String()) -} diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java deleted file mode 100644 index 4713d49822b..00000000000 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ /dev/null @@ -1,204 +0,0 @@ - -package io.fabric8.kubernetes.api.model; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.fabric8.kubernetes.api.model.version.Info; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscalerList; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscalerList; - -@Generated("jsonschema2pojo") -public class KubeSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private ClusterAutoscaler clusterAutoscaler; - private ClusterAutoscalerList clusterAutoscalerList; - private Info info; - private ObjectMeta objectMeta; - private Patch patch; - private Status status; - private String time; - private TypeMeta typeMeta; - private MachineAutoscaler v1beta1MachineAutoscaler; - private MachineAutoscalerList v1beta1MachineAutoscalerList; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public KubeSchema() { - } - - public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, ClusterAutoscaler clusterAutoscaler, ClusterAutoscalerList clusterAutoscalerList, Info info, ObjectMeta objectMeta, Patch patch, Status status, String time, TypeMeta typeMeta, MachineAutoscaler v1beta1MachineAutoscaler, MachineAutoscalerList v1beta1MachineAutoscalerList) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.clusterAutoscaler = clusterAutoscaler; - this.clusterAutoscalerList = clusterAutoscalerList; - this.info = info; - this.objectMeta = objectMeta; - this.patch = patch; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - this.v1beta1MachineAutoscaler = v1beta1MachineAutoscaler; - this.v1beta1MachineAutoscalerList = v1beta1MachineAutoscalerList; - } - - @JsonProperty("APIGroup") - public APIGroup getAPIGroup() { - return aPIGroup; - } - - @JsonProperty("APIGroup") - public void setAPIGroup(APIGroup aPIGroup) { - this.aPIGroup = aPIGroup; - } - - @JsonProperty("APIGroupList") - public APIGroupList getAPIGroupList() { - return aPIGroupList; - } - - @JsonProperty("APIGroupList") - public void setAPIGroupList(APIGroupList aPIGroupList) { - this.aPIGroupList = aPIGroupList; - } - - @JsonProperty("BaseKubernetesList") - public KubernetesList getBaseKubernetesList() { - return baseKubernetesList; - } - - @JsonProperty("BaseKubernetesList") - public void setBaseKubernetesList(KubernetesList baseKubernetesList) { - this.baseKubernetesList = baseKubernetesList; - } - - @JsonProperty("ClusterAutoscaler") - public ClusterAutoscaler getClusterAutoscaler() { - return clusterAutoscaler; - } - - @JsonProperty("ClusterAutoscaler") - public void setClusterAutoscaler(ClusterAutoscaler clusterAutoscaler) { - this.clusterAutoscaler = clusterAutoscaler; - } - - @JsonProperty("ClusterAutoscalerList") - public ClusterAutoscalerList getClusterAutoscalerList() { - return clusterAutoscalerList; - } - - @JsonProperty("ClusterAutoscalerList") - public void setClusterAutoscalerList(ClusterAutoscalerList clusterAutoscalerList) { - this.clusterAutoscalerList = clusterAutoscalerList; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @JsonProperty("Status") - public Status getStatus() { - return status; - } - - @JsonProperty("Status") - public void setStatus(Status status) { - this.status = status; - } - - @JsonProperty("Time") - public String getTime() { - return time; - } - - @JsonProperty("Time") - public void setTime(String time) { - this.time = time; - } - - @JsonProperty("TypeMeta") - public TypeMeta getTypeMeta() { - return typeMeta; - } - - @JsonProperty("TypeMeta") - public void setTypeMeta(TypeMeta typeMeta) { - this.typeMeta = typeMeta; - } - - @JsonProperty("V1beta1MachineAutoscaler") - public MachineAutoscaler getV1beta1MachineAutoscaler() { - return v1beta1MachineAutoscaler; - } - - @JsonProperty("V1beta1MachineAutoscaler") - public void setV1beta1MachineAutoscaler(MachineAutoscaler v1beta1MachineAutoscaler) { - this.v1beta1MachineAutoscaler = v1beta1MachineAutoscaler; - } - - @JsonProperty("V1beta1MachineAutoscalerList") - public MachineAutoscalerList getV1beta1MachineAutoscalerList() { - return v1beta1MachineAutoscalerList; - } - - @JsonProperty("V1beta1MachineAutoscalerList") - public void setV1beta1MachineAutoscalerList(MachineAutoscalerList v1beta1MachineAutoscalerList) { - this.v1beta1MachineAutoscalerList = v1beta1MachineAutoscalerList; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - -} diff --git a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java b/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java deleted file mode 100644 index 42feec69984..00000000000 --- a/kubernetes-model-generator/openshift-model-clusterautoscaling/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java +++ /dev/null @@ -1,204 +0,0 @@ - -package io.fabric8.kubernetes.api.model; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.fabric8.kubernetes.api.model.version.Info; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscalerList; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscalerList; - -@Generated("jsonschema2pojo") -public class ValidationSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private ClusterAutoscaler clusterAutoscaler; - private ClusterAutoscalerList clusterAutoscalerList; - private Info info; - private ObjectMeta objectMeta; - private Patch patch; - private Status status; - private String time; - private TypeMeta typeMeta; - private MachineAutoscaler v1beta1MachineAutoscaler; - private MachineAutoscalerList v1beta1MachineAutoscalerList; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ValidationSchema() { - } - - public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, ClusterAutoscaler clusterAutoscaler, ClusterAutoscalerList clusterAutoscalerList, Info info, ObjectMeta objectMeta, Patch patch, Status status, String time, TypeMeta typeMeta, MachineAutoscaler v1beta1MachineAutoscaler, MachineAutoscalerList v1beta1MachineAutoscalerList) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.clusterAutoscaler = clusterAutoscaler; - this.clusterAutoscalerList = clusterAutoscalerList; - this.info = info; - this.objectMeta = objectMeta; - this.patch = patch; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - this.v1beta1MachineAutoscaler = v1beta1MachineAutoscaler; - this.v1beta1MachineAutoscalerList = v1beta1MachineAutoscalerList; - } - - @JsonProperty("APIGroup") - public APIGroup getAPIGroup() { - return aPIGroup; - } - - @JsonProperty("APIGroup") - public void setAPIGroup(APIGroup aPIGroup) { - this.aPIGroup = aPIGroup; - } - - @JsonProperty("APIGroupList") - public APIGroupList getAPIGroupList() { - return aPIGroupList; - } - - @JsonProperty("APIGroupList") - public void setAPIGroupList(APIGroupList aPIGroupList) { - this.aPIGroupList = aPIGroupList; - } - - @JsonProperty("BaseKubernetesList") - public KubernetesList getBaseKubernetesList() { - return baseKubernetesList; - } - - @JsonProperty("BaseKubernetesList") - public void setBaseKubernetesList(KubernetesList baseKubernetesList) { - this.baseKubernetesList = baseKubernetesList; - } - - @JsonProperty("ClusterAutoscaler") - public ClusterAutoscaler getClusterAutoscaler() { - return clusterAutoscaler; - } - - @JsonProperty("ClusterAutoscaler") - public void setClusterAutoscaler(ClusterAutoscaler clusterAutoscaler) { - this.clusterAutoscaler = clusterAutoscaler; - } - - @JsonProperty("ClusterAutoscalerList") - public ClusterAutoscalerList getClusterAutoscalerList() { - return clusterAutoscalerList; - } - - @JsonProperty("ClusterAutoscalerList") - public void setClusterAutoscalerList(ClusterAutoscalerList clusterAutoscalerList) { - this.clusterAutoscalerList = clusterAutoscalerList; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @JsonProperty("Status") - public Status getStatus() { - return status; - } - - @JsonProperty("Status") - public void setStatus(Status status) { - this.status = status; - } - - @JsonProperty("Time") - public String getTime() { - return time; - } - - @JsonProperty("Time") - public void setTime(String time) { - this.time = time; - } - - @JsonProperty("TypeMeta") - public TypeMeta getTypeMeta() { - return typeMeta; - } - - @JsonProperty("TypeMeta") - public void setTypeMeta(TypeMeta typeMeta) { - this.typeMeta = typeMeta; - } - - @JsonProperty("V1beta1MachineAutoscaler") - public MachineAutoscaler getV1beta1MachineAutoscaler() { - return v1beta1MachineAutoscaler; - } - - @JsonProperty("V1beta1MachineAutoscaler") - public void setV1beta1MachineAutoscaler(MachineAutoscaler v1beta1MachineAutoscaler) { - this.v1beta1MachineAutoscaler = v1beta1MachineAutoscaler; - } - - @JsonProperty("V1beta1MachineAutoscalerList") - public MachineAutoscalerList getV1beta1MachineAutoscalerList() { - return v1beta1MachineAutoscalerList; - } - - @JsonProperty("V1beta1MachineAutoscalerList") - public void setV1beta1MachineAutoscalerList(MachineAutoscalerList v1beta1MachineAutoscalerList) { - this.v1beta1MachineAutoscalerList = v1beta1MachineAutoscalerList; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - -} diff --git a/kubernetes-model-generator/pom.xml b/kubernetes-model-generator/pom.xml index 371e3cf754f..4a320142f16 100644 --- a/kubernetes-model-generator/pom.xml +++ b/kubernetes-model-generator/pom.xml @@ -57,7 +57,7 @@ kubernetes-model-storageclass kubernetes-model-kustomize openshift-model - openshift-model-clusterautoscaling + openshift-model-autoscaling openshift-model-config openshift-model-hive openshift-model-installer diff --git a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ClusterAutoscalerTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ClusterAutoscalerTest.java index 45d8a914a57..671f2686835 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ClusterAutoscalerTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ClusterAutoscalerTest.java @@ -15,10 +15,10 @@ */ package io.fabric8.openshift.client.server.mock; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscalerBuilder; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscalerList; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscalerListBuilder; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscalerBuilder; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscalerList; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscalerListBuilder; import io.fabric8.openshift.client.OpenShiftClient; import org.junit.jupiter.api.Test; @@ -39,7 +39,7 @@ void get() { .once(); // When - ClusterAutoscaler clusterAutoscaler = client.clusterAutoscaling().v1().clusterAutoscalers().withName("test-get").get(); + ClusterAutoscaler clusterAutoscaler = client.openShiftAutoscaling().v1().clusterAutoscalers().withName("test-get").get(); // Then assertThat(clusterAutoscaler) @@ -57,7 +57,7 @@ void list() { .once(); // When - ClusterAutoscalerList clusterAutoscalerList = client.clusterAutoscaling().v1().clusterAutoscalers().list(); + ClusterAutoscalerList clusterAutoscalerList = client.openShiftAutoscaling().v1().clusterAutoscalers().list(); // Then assertThat(clusterAutoscalerList).isNotNull(); @@ -74,7 +74,7 @@ void delete() { .once(); // When - boolean isDeleted = client.clusterAutoscaling().v1().clusterAutoscalers().withName("cluster").delete().size() == 1; + boolean isDeleted = client.openShiftAutoscaling().v1().clusterAutoscalers().withName("cluster").delete().size() == 1; // Then assertThat(isDeleted).isTrue(); diff --git a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/MachineAutoscalerTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/MachineAutoscalerTest.java index ddc6ccb4ca2..da6c4764a1b 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/MachineAutoscalerTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/MachineAutoscalerTest.java @@ -15,10 +15,10 @@ */ package io.fabric8.openshift.client.server.mock; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscalerBuilder; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscalerList; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscalerListBuilder; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscalerBuilder; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscalerList; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscalerListBuilder; import io.fabric8.openshift.client.OpenShiftClient; import org.junit.jupiter.api.Test; @@ -39,7 +39,7 @@ void get() { .once(); // When - MachineAutoscaler machineAutoscaler = client.clusterAutoscaling().v1beta1().machineAutoscalers() + MachineAutoscaler machineAutoscaler = client.openShiftAutoscaling().v1beta1().machineAutoscalers() .inNamespace("ns1") .withName("test-get").get(); @@ -59,7 +59,7 @@ void list() { .once(); // When - MachineAutoscalerList machineAutoscalerList = client.clusterAutoscaling().v1beta1().machineAutoscalers() + MachineAutoscalerList machineAutoscalerList = client.openShiftAutoscaling().v1beta1().machineAutoscalers() .inNamespace("ns1") .list(); @@ -78,7 +78,7 @@ void delete() { .once(); // When - Boolean isDeleted = client.clusterAutoscaling().v1beta1().machineAutoscalers() + Boolean isDeleted = client.openShiftAutoscaling().v1beta1().machineAutoscalers() .inNamespace("ns1") .withName("ma").delete().size() == 1; diff --git a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java index dc3eb499d2c..bfaf14cb2f9 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java @@ -48,8 +48,8 @@ import io.fabric8.openshift.api.model.TemplateInstance; import io.fabric8.openshift.api.model.User; import io.fabric8.openshift.api.model.UserOAuthAccessToken; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscaler; import io.fabric8.openshift.api.model.config.v1.APIServer; import io.fabric8.openshift.api.model.config.v1.Authentication; import io.fabric8.openshift.api.model.config.v1.Build; diff --git a/openshift-client-api/pom.xml b/openshift-client-api/pom.xml index ff2a647d053..a9032d98c8f 100644 --- a/openshift-client-api/pom.xml +++ b/openshift-client-api/pom.xml @@ -57,7 +57,7 @@ io.fabric8 - openshift-model-clusterautoscaling + openshift-model-autoscaling io.fabric8 @@ -111,7 +111,7 @@ io.fabric8 openshift-model-installer - + io.sundr diff --git a/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java b/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java index 0774ec176c7..d679c499a04 100644 --- a/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java +++ b/openshift-client-api/src/main/java/io/fabric8/openshift/client/NamespacedOpenShiftClientAdapter.java @@ -122,7 +122,7 @@ import io.fabric8.openshift.client.dsl.DeployableScalableResource; import io.fabric8.openshift.client.dsl.MachineConfigurationAPIGroupDSL; import io.fabric8.openshift.client.dsl.NameableCreateOrDeleteable; -import io.fabric8.openshift.client.dsl.OpenShiftClusterAutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.OpenShiftAutoscalingAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConfigAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConsoleAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftHiveAPIGroupDSL; @@ -163,8 +163,8 @@ public OpenShiftConsoleAPIGroupDSL console() { } @Override - public OpenShiftClusterAutoscalingAPIGroupDSL clusterAutoscaling() { - return getClient().clusterAutoscaling(); + public OpenShiftAutoscalingAPIGroupDSL openShiftAutoscaling() { + return getClient().openShiftAutoscaling(); } @Override diff --git a/openshift-client-api/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java b/openshift-client-api/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java index 1818489f795..3334404e2bd 100644 --- a/openshift-client-api/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java +++ b/openshift-client-api/src/main/java/io/fabric8/openshift/client/OpenShiftClient.java @@ -129,7 +129,7 @@ import io.fabric8.openshift.client.dsl.DeployableScalableResource; import io.fabric8.openshift.client.dsl.MachineConfigurationAPIGroupDSL; import io.fabric8.openshift.client.dsl.NameableCreateOrDeleteable; -import io.fabric8.openshift.client.dsl.OpenShiftClusterAutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.OpenShiftAutoscalingAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConfigAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConsoleAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftHiveAPIGroupDSL; @@ -175,9 +175,9 @@ public interface OpenShiftClient extends KubernetesClient, SupportTestingClient /** * API entrypoint for accessing OpenShift Cluster Operator resources (autoscaling.openshift.io) * - * @return {@link OpenShiftClusterAutoscalingAPIGroupDSL} which contains respective resources in this API group + * @return {@link OpenShiftAutoscalingAPIGroupDSL} which contains respective resources in this API group */ - OpenShiftClusterAutoscalingAPIGroupDSL clusterAutoscaling(); + OpenShiftAutoscalingAPIGroupDSL openShiftAutoscaling(); /** * API entrypoint for accessing OpenShift Hive Operator resources (hive.openshift.io) diff --git a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftClusterAutoscalingAPIGroupDSL.java b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftAutoscalingAPIGroupDSL.java similarity index 81% rename from openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftClusterAutoscalingAPIGroupDSL.java rename to openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftAutoscalingAPIGroupDSL.java index af1559235f7..085cc8a0128 100644 --- a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftClusterAutoscalingAPIGroupDSL.java +++ b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftAutoscalingAPIGroupDSL.java @@ -17,8 +17,8 @@ import io.fabric8.kubernetes.client.Client; -public interface OpenShiftClusterAutoscalingAPIGroupDSL extends Client { - V1ClusterAutoscalingAPIGroupDSL v1(); +public interface OpenShiftAutoscalingAPIGroupDSL extends Client { + V1AutoscalingAPIGroupDSL v1(); - V1beta1ClusterAutoscalingAPIGroupDSL v1beta1(); + V1beta1AutoscalingAPIGroupDSL v1beta1(); } diff --git a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1ClusterAutoscalingAPIGroupDSL.java b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1AutoscalingAPIGroupDSL.java similarity index 82% rename from openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1ClusterAutoscalingAPIGroupDSL.java rename to openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1AutoscalingAPIGroupDSL.java index 3299f42fa77..48ee25bb8aa 100644 --- a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1ClusterAutoscalingAPIGroupDSL.java +++ b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1AutoscalingAPIGroupDSL.java @@ -18,10 +18,10 @@ import io.fabric8.kubernetes.client.Client; import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscalerList; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscalerList; -public interface V1ClusterAutoscalingAPIGroupDSL extends Client { +public interface V1AutoscalingAPIGroupDSL extends Client { /** * DSL entrypoint for ClusterAutoscaler (autoscaling.openshift.io/v1) * diff --git a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1beta1ClusterAutoscalingAPIGroupDSL.java b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1beta1AutoscalingAPIGroupDSL.java similarity index 81% rename from openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1beta1ClusterAutoscalingAPIGroupDSL.java rename to openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1beta1AutoscalingAPIGroupDSL.java index dc8ae2ae386..397fb6c24b4 100644 --- a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1beta1ClusterAutoscalingAPIGroupDSL.java +++ b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/V1beta1AutoscalingAPIGroupDSL.java @@ -18,10 +18,10 @@ import io.fabric8.kubernetes.client.Client; import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscalerList; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscalerList; -public interface V1beta1ClusterAutoscalingAPIGroupDSL extends Client { +public interface V1beta1AutoscalingAPIGroupDSL extends Client { /** * DSL entrypoint for MachineAutoscaler (autoscaling.openshift.io/v1beta1) * diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftAutoscalingAPIGroupClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftAutoscalingAPIGroupClient.java new file mode 100644 index 00000000000..2080d8266b3 --- /dev/null +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftAutoscalingAPIGroupClient.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2015 Red Hat, Inc. + * + * Licensed 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.openshift.client.impl; + +import io.fabric8.kubernetes.client.extension.ClientAdapter; +import io.fabric8.openshift.client.dsl.OpenShiftAutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.V1AutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.V1beta1AutoscalingAPIGroupDSL; + +public class OpenShiftAutoscalingAPIGroupClient extends ClientAdapter + implements OpenShiftAutoscalingAPIGroupDSL { + + @Override + public V1AutoscalingAPIGroupDSL v1() { + return adapt(V1OpenShiftAutoscalingAPIGroupClient.class); + } + + @Override + public V1beta1AutoscalingAPIGroupDSL v1beta1() { + return adapt(V1beta1OpenShiftAutoscalingAPIGroupClient.class); + } + + @Override + public OpenShiftAutoscalingAPIGroupClient newInstance() { + return new OpenShiftAutoscalingAPIGroupClient(); + } +} diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftClientImpl.java b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftClientImpl.java index fc3fa142d22..aa9689ecc33 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftClientImpl.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftClientImpl.java @@ -138,7 +138,7 @@ import io.fabric8.openshift.client.dsl.DeployableScalableResource; import io.fabric8.openshift.client.dsl.MachineConfigurationAPIGroupDSL; import io.fabric8.openshift.client.dsl.NameableCreateOrDeleteable; -import io.fabric8.openshift.client.dsl.OpenShiftClusterAutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.OpenShiftAutoscalingAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConfigAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConsoleAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftHiveAPIGroupDSL; @@ -252,8 +252,8 @@ public OpenShiftConsoleAPIGroupDSL console() { } @Override - public OpenShiftClusterAutoscalingAPIGroupDSL clusterAutoscaling() { - return adapt(OpenShiftClusterAutoscalingAPIGroupClient.class); + public OpenShiftAutoscalingAPIGroupDSL openShiftAutoscaling() { + return adapt(OpenShiftAutoscalingAPIGroupClient.class); } @Override diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftClusterAutoscalingAPIGroupClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftClusterAutoscalingAPIGroupClient.java deleted file mode 100644 index 94207bc46d4..00000000000 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftClusterAutoscalingAPIGroupClient.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2015 Red Hat, Inc. - * - * Licensed 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.openshift.client.impl; - -import io.fabric8.kubernetes.client.extension.ClientAdapter; -import io.fabric8.openshift.client.dsl.OpenShiftClusterAutoscalingAPIGroupDSL; -import io.fabric8.openshift.client.dsl.V1ClusterAutoscalingAPIGroupDSL; -import io.fabric8.openshift.client.dsl.V1beta1ClusterAutoscalingAPIGroupDSL; - -public class OpenShiftClusterAutoscalingAPIGroupClient extends ClientAdapter - implements OpenShiftClusterAutoscalingAPIGroupDSL { - - @Override - public V1ClusterAutoscalingAPIGroupDSL v1() { - return adapt(V1OpenShiftClusterAutoscalingAPIGroupClient.class); - } - - @Override - public V1beta1ClusterAutoscalingAPIGroupDSL v1beta1() { - return adapt(V1beta1OpenShiftClusterAutoscalingAPIGroupClient.class); - } - - @Override - public OpenShiftClusterAutoscalingAPIGroupClient newInstance() { - return new OpenShiftClusterAutoscalingAPIGroupClient(); - } -} diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftExtensionAdapter.java b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftExtensionAdapter.java index 68b6f70c773..88b8681b571 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftExtensionAdapter.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftExtensionAdapter.java @@ -27,7 +27,7 @@ import io.fabric8.openshift.api.model.Template; import io.fabric8.openshift.client.OpenShiftClient; import io.fabric8.openshift.client.dsl.MachineConfigurationAPIGroupDSL; -import io.fabric8.openshift.client.dsl.OpenShiftClusterAutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.OpenShiftAutoscalingAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConfigAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftConsoleAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftHiveAPIGroupDSL; @@ -39,8 +39,8 @@ import io.fabric8.openshift.client.dsl.OpenShiftStorageVersionMigratorApiGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftTunedAPIGroupDSL; import io.fabric8.openshift.client.dsl.OpenShiftWhereaboutsAPIGroupDSL; -import io.fabric8.openshift.client.dsl.V1ClusterAutoscalingAPIGroupDSL; -import io.fabric8.openshift.client.dsl.V1beta1ClusterAutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.V1AutoscalingAPIGroupDSL; +import io.fabric8.openshift.client.dsl.V1beta1AutoscalingAPIGroupDSL; import io.fabric8.openshift.client.dsl.internal.apps.DeploymentConfigOperationsImpl; import io.fabric8.openshift.client.dsl.internal.authorization.RoleBindingOperationsImpl; import io.fabric8.openshift.client.dsl.internal.build.BuildConfigOperationsImpl; @@ -75,11 +75,11 @@ public void registerHandlers(Handlers handlers) { @Override public void registerClients(ClientFactory factory) { factory.register(OpenShiftConfigAPIGroupDSL.class, new OpenShiftConfigAPIGroupClient()); - factory.register(OpenShiftClusterAutoscalingAPIGroupDSL.class, new OpenShiftClusterAutoscalingAPIGroupClient()); + factory.register(OpenShiftAutoscalingAPIGroupDSL.class, new OpenShiftAutoscalingAPIGroupClient()); factory.register(OpenShiftHiveAPIGroupDSL.class, new OpenShiftHiveAPIGroupClient()); - factory.register(V1beta1ClusterAutoscalingAPIGroupDSL.class, - new V1beta1OpenShiftClusterAutoscalingAPIGroupClient()); - factory.register(V1ClusterAutoscalingAPIGroupDSL.class, new V1OpenShiftClusterAutoscalingAPIGroupClient()); + factory.register(V1beta1AutoscalingAPIGroupDSL.class, + new V1beta1OpenShiftAutoscalingAPIGroupClient()); + factory.register(V1AutoscalingAPIGroupDSL.class, new V1OpenShiftAutoscalingAPIGroupClient()); factory.register(OpenShiftConsoleAPIGroupDSL.class, new OpenShiftConsoleAPIGroupClient()); factory.register(OpenShiftOperatorAPIGroupDSL.class, new OpenShiftOperatorAPIGroupClient()); factory.register(OpenShiftOperatorHubAPIGroupDSL.class, new OpenShiftOperatorHubAPIGroupClient()); diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1OpenShiftClusterAutoscalingAPIGroupClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1OpenShiftAutoscalingAPIGroupClient.java similarity index 66% rename from openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1OpenShiftClusterAutoscalingAPIGroupClient.java rename to openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1OpenShiftAutoscalingAPIGroupClient.java index a1c4779a5ce..f0005642010 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1OpenShiftClusterAutoscalingAPIGroupClient.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1OpenShiftAutoscalingAPIGroupClient.java @@ -18,16 +18,16 @@ import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.extension.ClientAdapter; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1.ClusterAutoscalerList; -import io.fabric8.openshift.client.dsl.V1ClusterAutoscalingAPIGroupDSL; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscalerList; +import io.fabric8.openshift.client.dsl.V1AutoscalingAPIGroupDSL; -public class V1OpenShiftClusterAutoscalingAPIGroupClient extends ClientAdapter - implements V1ClusterAutoscalingAPIGroupDSL { +public class V1OpenShiftAutoscalingAPIGroupClient extends ClientAdapter + implements V1AutoscalingAPIGroupDSL { @Override - public V1OpenShiftClusterAutoscalingAPIGroupClient newInstance() { - return new V1OpenShiftClusterAutoscalingAPIGroupClient(); + public V1OpenShiftAutoscalingAPIGroupClient newInstance() { + return new V1OpenShiftAutoscalingAPIGroupClient(); } @Override diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1beta1OpenShiftClusterAutoscalingAPIGroupClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1beta1OpenShiftAutoscalingAPIGroupClient.java similarity index 64% rename from openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1beta1OpenShiftClusterAutoscalingAPIGroupClient.java rename to openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1beta1OpenShiftAutoscalingAPIGroupClient.java index 42287a32a12..b6350444251 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1beta1OpenShiftClusterAutoscalingAPIGroupClient.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/V1beta1OpenShiftAutoscalingAPIGroupClient.java @@ -18,12 +18,12 @@ import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.Resource; import io.fabric8.kubernetes.client.extension.ClientAdapter; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscaler; -import io.fabric8.openshift.api.model.clusterautoscaling.v1beta1.MachineAutoscalerList; -import io.fabric8.openshift.client.dsl.V1beta1ClusterAutoscalingAPIGroupDSL; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscaler; +import io.fabric8.openshift.api.model.autoscaling.v1beta1.MachineAutoscalerList; +import io.fabric8.openshift.client.dsl.V1beta1AutoscalingAPIGroupDSL; -public class V1beta1OpenShiftClusterAutoscalingAPIGroupClient - extends ClientAdapter implements V1beta1ClusterAutoscalingAPIGroupDSL { +public class V1beta1OpenShiftAutoscalingAPIGroupClient + extends ClientAdapter implements V1beta1AutoscalingAPIGroupDSL { @Override public MixedOperation> machineAutoscalers() { @@ -31,7 +31,7 @@ public MixedOperation io.fabric8 - openshift-model-clusterautoscaling + openshift-model-autoscaling ${project.version} diff --git a/uberjar/pom.xml b/uberjar/pom.xml index 4755c3806f1..a7110675ff2 100644 --- a/uberjar/pom.xml +++ b/uberjar/pom.xml @@ -140,7 +140,7 @@ io.fabric8 - openshift-model-clusterautoscaling + openshift-model-autoscaling io.fabric8