Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: openshift-model-machineconfiguration generated from OpenAPI schemas #6400

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
////go:build ignore
//// +build ignore
//go:build ignore
// +build ignore

/**
* Copyright (C) 2015 Red Hat, Inc.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>openshift-model-config</artifactId>
</dependency>
</dependencies>

<profiles>
Expand All @@ -56,18 +60,11 @@
<configuration >
<settings combine.self="append">
<schemas>
<schema>${openapi.schema.openshift-latest}</schema>
<schema>${openapi.schema.openshift-generated}</schema>
</schemas>
<packageMappings combine.self="append">
<io.k8s.api>io.fabric8.kubernetes.api.model</io.k8s.api>
<io.openshift.machineconfiguration>io.fabric8.openshift.api.model.machineconfiguration</io.openshift.machineconfiguration>
</packageMappings>
<includeGenerationRegexes>
<includeGenerationRegex>^io\.openshift\.machineconfiguration\..*$</includeGenerationRegex>
</includeGenerationRegexes>
<refToJavaTypeMappings>
<io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement_v2>io.fabric8.kubernetes.api.model.LabelSelectorRequirement</io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement_v2>
</refToJavaTypeMappings>
</settings>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class MachineConfigPoolStatusCertExpirys implements Editable<MachineConfigPoolStatusCertExpirysBuilder> , KubernetesResource
public class CertExpiry implements Editable<CertExpiryBuilder> , KubernetesResource
{

@JsonProperty("bundle")
Expand All @@ -69,10 +69,10 @@ public class MachineConfigPoolStatusCertExpirys implements Editable<MachineConfi
* No args constructor for use in serialization
*
*/
public MachineConfigPoolStatusCertExpirys() {
public CertExpiry() {
}

public MachineConfigPoolStatusCertExpirys(String bundle, String expiry, String subject) {
public CertExpiry(String bundle, String expiry, String subject) {
super();
this.bundle = bundle;
this.expiry = expiry;
Expand Down Expand Up @@ -110,12 +110,12 @@ public void setSubject(String subject) {
}

@JsonIgnore
public MachineConfigPoolStatusCertExpirysBuilder edit() {
return new MachineConfigPoolStatusCertExpirysBuilder(this);
public CertExpiryBuilder edit() {
return new CertExpiryBuilder(this);
}

@JsonIgnore
public MachineConfigPoolStatusCertExpirysBuilder toBuilder() {
public CertExpiryBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class KubeletConfigStatusConditions implements Editable<KubeletConfigStatusConditionsBuilder> , KubernetesResource
public class ContainerRuntimeConfigCondition implements Editable<ContainerRuntimeConfigConditionBuilder> , KubernetesResource
{

@JsonProperty("lastTransitionTime")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
private Object lastTransitionTime;
private String lastTransitionTime;
@JsonProperty("message")
private String message;
@JsonProperty("reason")
Expand All @@ -76,10 +75,10 @@ public class KubeletConfigStatusConditions implements Editable<KubeletConfigStat
* No args constructor for use in serialization
*
*/
public KubeletConfigStatusConditions() {
public ContainerRuntimeConfigCondition() {
}

public KubeletConfigStatusConditions(Object lastTransitionTime, String message, String reason, String status, String type) {
public ContainerRuntimeConfigCondition(String lastTransitionTime, String message, String reason, String status, String type) {
super();
this.lastTransitionTime = lastTransitionTime;
this.message = message;
Expand All @@ -89,13 +88,12 @@ public KubeletConfigStatusConditions(Object lastTransitionTime, String message,
}

@JsonProperty("lastTransitionTime")
public Object getLastTransitionTime() {
public String getLastTransitionTime() {
return lastTransitionTime;
}

@JsonProperty("lastTransitionTime")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
public void setLastTransitionTime(Object lastTransitionTime) {
public void setLastTransitionTime(String lastTransitionTime) {
this.lastTransitionTime = lastTransitionTime;
}

Expand Down Expand Up @@ -140,12 +138,12 @@ public void setType(String type) {
}

@JsonIgnore
public KubeletConfigStatusConditionsBuilder edit() {
return new KubeletConfigStatusConditionsBuilder(this);
public ContainerRuntimeConfigConditionBuilder edit() {
return new ContainerRuntimeConfigConditionBuilder(this);
}

@JsonIgnore
public KubeletConfigStatusConditionsBuilder toBuilder() {
public ContainerRuntimeConfigConditionBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public class ContainerRuntimeConfigSpec implements Editable<ContainerRuntimeConf
{

@JsonProperty("containerRuntimeConfig")
private ContainerRuntimeConfigSpecContainerRuntimeConfig containerRuntimeConfig;
private ContainerRuntimeConfiguration containerRuntimeConfig;
@JsonProperty("machineConfigPoolSelector")
private ContainerRuntimeConfigSpecMachineConfigPoolSelector machineConfigPoolSelector;
private LabelSelector machineConfigPoolSelector;
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

Expand All @@ -69,29 +69,29 @@ public class ContainerRuntimeConfigSpec implements Editable<ContainerRuntimeConf
public ContainerRuntimeConfigSpec() {
}

public ContainerRuntimeConfigSpec(ContainerRuntimeConfigSpecContainerRuntimeConfig containerRuntimeConfig, ContainerRuntimeConfigSpecMachineConfigPoolSelector machineConfigPoolSelector) {
public ContainerRuntimeConfigSpec(ContainerRuntimeConfiguration containerRuntimeConfig, LabelSelector machineConfigPoolSelector) {
super();
this.containerRuntimeConfig = containerRuntimeConfig;
this.machineConfigPoolSelector = machineConfigPoolSelector;
}

@JsonProperty("containerRuntimeConfig")
public ContainerRuntimeConfigSpecContainerRuntimeConfig getContainerRuntimeConfig() {
public ContainerRuntimeConfiguration getContainerRuntimeConfig() {
return containerRuntimeConfig;
}

@JsonProperty("containerRuntimeConfig")
public void setContainerRuntimeConfig(ContainerRuntimeConfigSpecContainerRuntimeConfig containerRuntimeConfig) {
public void setContainerRuntimeConfig(ContainerRuntimeConfiguration containerRuntimeConfig) {
this.containerRuntimeConfig = containerRuntimeConfig;
}

@JsonProperty("machineConfigPoolSelector")
public ContainerRuntimeConfigSpecMachineConfigPoolSelector getMachineConfigPoolSelector() {
public LabelSelector getMachineConfigPoolSelector() {
return machineConfigPoolSelector;
}

@JsonProperty("machineConfigPoolSelector")
public void setMachineConfigPoolSelector(ContainerRuntimeConfigSpecMachineConfigPoolSelector machineConfigPoolSelector) {
public void setMachineConfigPoolSelector(LabelSelector machineConfigPoolSelector) {
this.machineConfigPoolSelector = machineConfigPoolSelector;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class ContainerRuntimeConfigStatus implements Editable<ContainerRuntimeCo

@JsonProperty("conditions")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<ContainerRuntimeConfigStatusConditions> conditions = new ArrayList<>();
private List<ContainerRuntimeConfigCondition> conditions = new ArrayList<>();
@JsonProperty("observedGeneration")
private Long observedGeneration;
@JsonIgnore
Expand All @@ -72,20 +72,20 @@ public class ContainerRuntimeConfigStatus implements Editable<ContainerRuntimeCo
public ContainerRuntimeConfigStatus() {
}

public ContainerRuntimeConfigStatus(List<ContainerRuntimeConfigStatusConditions> conditions, Long observedGeneration) {
public ContainerRuntimeConfigStatus(List<ContainerRuntimeConfigCondition> conditions, Long observedGeneration) {
super();
this.conditions = conditions;
this.observedGeneration = observedGeneration;
}

@JsonProperty("conditions")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<ContainerRuntimeConfigStatusConditions> getConditions() {
public List<ContainerRuntimeConfigCondition> getConditions() {
return conditions;
}

@JsonProperty("conditions")
public void setConditions(List<ContainerRuntimeConfigStatusConditions> conditions) {
public void setConditions(List<ContainerRuntimeConfigCondition> conditions) {
this.conditions = conditions;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.fabric8.kubernetes.api.model.ObjectReference;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.PodTemplateSpec;
import io.fabric8.kubernetes.api.model.Quantity;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.BuildableReference;
Expand Down Expand Up @@ -55,19 +56,17 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class ContainerRuntimeConfigSpecContainerRuntimeConfig implements Editable<ContainerRuntimeConfigSpecContainerRuntimeConfigBuilder> , KubernetesResource
public class ContainerRuntimeConfiguration implements Editable<ContainerRuntimeConfigurationBuilder> , KubernetesResource
{

@JsonProperty("defaultRuntime")
private String defaultRuntime;
@JsonProperty("logLevel")
private String logLevel;
@JsonProperty("logSizeMax")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
private Object logSizeMax;
private Quantity logSizeMax;
@JsonProperty("overlaySize")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
private Object overlaySize;
private Quantity overlaySize;
@JsonProperty("pidsLimit")
private Long pidsLimit;
@JsonIgnore
Expand All @@ -77,10 +76,10 @@ public class ContainerRuntimeConfigSpecContainerRuntimeConfig implements Editabl
* No args constructor for use in serialization
*
*/
public ContainerRuntimeConfigSpecContainerRuntimeConfig() {
public ContainerRuntimeConfiguration() {
}

public ContainerRuntimeConfigSpecContainerRuntimeConfig(String defaultRuntime, String logLevel, Object logSizeMax, Object overlaySize, Long pidsLimit) {
public ContainerRuntimeConfiguration(String defaultRuntime, String logLevel, Quantity logSizeMax, Quantity overlaySize, Long pidsLimit) {
super();
this.defaultRuntime = defaultRuntime;
this.logLevel = logLevel;
Expand Down Expand Up @@ -110,24 +109,22 @@ public void setLogLevel(String logLevel) {
}

@JsonProperty("logSizeMax")
public Object getLogSizeMax() {
public Quantity getLogSizeMax() {
return logSizeMax;
}

@JsonProperty("logSizeMax")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
public void setLogSizeMax(Object logSizeMax) {
public void setLogSizeMax(Quantity logSizeMax) {
this.logSizeMax = logSizeMax;
}

@JsonProperty("overlaySize")
public Object getOverlaySize() {
public Quantity getOverlaySize() {
return overlaySize;
}

@JsonProperty("overlaySize")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
public void setOverlaySize(Object overlaySize) {
public void setOverlaySize(Quantity overlaySize) {
this.overlaySize = overlaySize;
}

Expand All @@ -142,12 +139,12 @@ public void setPidsLimit(Long pidsLimit) {
}

@JsonIgnore
public ContainerRuntimeConfigSpecContainerRuntimeConfigBuilder edit() {
return new ContainerRuntimeConfigSpecContainerRuntimeConfigBuilder(this);
public ContainerRuntimeConfigurationBuilder edit() {
return new ContainerRuntimeConfigurationBuilder(this);
}

@JsonIgnore
public ContainerRuntimeConfigSpecContainerRuntimeConfigBuilder toBuilder() {
public ContainerRuntimeConfigurationBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class ControllerConfigStatusControllerCertificates implements Editable<ControllerConfigStatusControllerCertificatesBuilder> , KubernetesResource
public class ControllerCertificate implements Editable<ControllerCertificateBuilder> , KubernetesResource
{

@JsonProperty("bundleFile")
Expand All @@ -75,10 +75,10 @@ public class ControllerConfigStatusControllerCertificates implements Editable<Co
* No args constructor for use in serialization
*
*/
public ControllerConfigStatusControllerCertificates() {
public ControllerCertificate() {
}

public ControllerConfigStatusControllerCertificates(String bundleFile, String notAfter, String notBefore, String signer, String subject) {
public ControllerCertificate(String bundleFile, String notAfter, String notBefore, String signer, String subject) {
super();
this.bundleFile = bundleFile;
this.notAfter = notAfter;
Expand Down Expand Up @@ -138,12 +138,12 @@ public void setSubject(String subject) {
}

@JsonIgnore
public ControllerConfigStatusControllerCertificatesBuilder edit() {
return new ControllerConfigStatusControllerCertificatesBuilder(this);
public ControllerCertificateBuilder edit() {
return new ControllerCertificateBuilder(this);
}

@JsonIgnore
public ControllerConfigStatusControllerCertificatesBuilder toBuilder() {
public ControllerCertificateBuilder toBuilder() {
return edit();
}

Expand Down
Loading
Loading