diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b35f3ed90..53dab7ddde6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,13 @@ * Fix #5357: adding additional Quantity methods * Fix #5635: refined LeaderElector lifecycle and logging + #### Dependency Upgrade #### New Features * Fix #5636: Add new extension `open-virtual-networking` to manage resources in `k8s.ovn.org/v1` API group. * Fix #5711: Kube API Test - Kubernetes API Server JUnit Test Support +* Fix #5772: Add openshift model `io.fabric8.openshift.api.model.DeploymentConfigRollback` #### _**Note**_: Breaking changes * KubeSchema and Validation Schema generated classes are no longer annotated with Jackson, Lombok, and Sundrio annotations. diff --git a/kubernetes-model-generator/openshift-model/cmd/generate/generate.go b/kubernetes-model-generator/openshift-model/cmd/generate/generate.go index a39f0f22e3b..29d54ba0fa8 100644 --- a/kubernetes-model-generator/openshift-model/cmd/generate/generate.go +++ b/kubernetes-model-generator/openshift-model/cmd/generate/generate.go @@ -87,6 +87,7 @@ type Schema struct { ImageSignature imageapi.ImageSignature DeploymentConfig appsapi.DeploymentConfig DeploymentConfigList appsapi.DeploymentConfigList + DeploymentConfigRollback appsapi.DeploymentConfigRollback Route routeapi.Route RouteList routeapi.RouteList Template templateapi.Template diff --git a/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java index adbeecd0a45..8fabfbaa4d1 100644 --- a/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java @@ -29,6 +29,7 @@ import io.fabric8.openshift.api.model.ClusterRoleScopeRestriction; import io.fabric8.openshift.api.model.DeploymentConfig; import io.fabric8.openshift.api.model.DeploymentConfigList; +import io.fabric8.openshift.api.model.DeploymentConfigRollback; import io.fabric8.openshift.api.model.EgressNetworkPolicy; import io.fabric8.openshift.api.model.EgressNetworkPolicyList; import io.fabric8.openshift.api.model.Group; @@ -121,6 +122,7 @@ public class KubeSchema { private DeleteOptions deleteOptions; private DeploymentConfig deploymentConfig; private DeploymentConfigList deploymentConfigList; + private DeploymentConfigRollback deploymentConfigRollback; private EgressNetworkPolicy egressNetworkPolicy; private EgressNetworkPolicyList egressNetworkPolicyList; private GetOptions getOptions; @@ -217,7 +219,7 @@ public class KubeSchema { public KubeSchema() { } - public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, AggregationRule aggregationRule, AppliedClusterResourceQuota appliedClusterResourceQuota, AppliedClusterResourceQuotaList appliedClusterResourceQuotaList, KubernetesList baseKubernetesList, BrokerTemplateInstance brokerTemplateInstance, BrokerTemplateInstanceList brokerTemplateInstanceList, BuildConfigList buildConfigList, BuildList buildList, BuildRequest buildRequest, ClusterNetwork clusterNetwork, ClusterNetworkList clusterNetworkList, ClusterResourceQuota clusterResourceQuota, ClusterResourceQuotaList clusterResourceQuotaList, Config config, CreateOptions createOptions, DeleteOptions deleteOptions, DeploymentConfig deploymentConfig, DeploymentConfigList deploymentConfigList, EgressNetworkPolicy egressNetworkPolicy, EgressNetworkPolicyList egressNetworkPolicyList, GetOptions getOptions, Group group, GroupList groupList, HelmChartRepository helmChartRepository, HelmChartRepositoryList helmChartRepositoryList, HostSubnet hostSubnet, HostSubnetList hostSubnetList, Identity identity, IdentityList identityList, ImageList imageList, ImageSignature imageSignature, ImageStreamImage imageStreamImage, ImageStreamImport imageStreamImport, ImageStreamList imageStreamList, ImageStreamMapping imageStreamMapping, ImageStreamTagList imageStreamTagList, ImageTag imageTag, ImageTagList imageTagList, Info info, ListOptions listOptions, LocalResourceAccessReview localResourceAccessReview, LocalSubjectAccessReview localSubjectAccessReview, NetNamespace netNamespace, NetNamespaceList netNamespaceList, OAuthAccessToken oAuthAccessToken, OAuthAccessTokenList oAuthAccessTokenList, OAuthAuthorizeToken oAuthAuthorizeToken, OAuthAuthorizeTokenList oAuthAuthorizeTokenList, OAuthClient oAuthClient, OAuthClientAuthorization oAuthClientAuthorization, OAuthClientAuthorizationList oAuthClientAuthorizationList, OAuthClientList oAuthClientList, ObjectMeta objectMeta, RoleBindingRestrictionList openShiftRoleBindingRestrictionList, ClusterRole openshiftClusterRole, ClusterRoleBinding openshiftClusterRoleBinding, ClusterRoleBindingList openshiftClusterRoleBindingList, ClusterRoleList openshiftClusterRoleList, ClusterRoleScopeRestriction openshiftClusterRoleScopeRestriction, Role openshiftRole, RoleBinding openshiftRoleBinding, RoleBindingList openshiftRoleBindingList, RoleBindingRestriction openshiftRoleBindingRestriction, RoleBindingRestrictionSpec openshiftRoleBindingRestrictionSpec, RoleList openshiftRoleList, Patch patch, PatchOptions patchOptions, PodSecurityPolicyReview podSecurityPolicyReview, PodSecurityPolicySelfSubjectReview podSecurityPolicySelfSubjectReview, PodSecurityPolicySubjectReview podSecurityPolicySubjectReview, Project project, ProjectHelmChartRepository projectHelmChartRepository, ProjectHelmChartRepositoryList projectHelmChartRepositoryList, ProjectList projectList, ProjectRequest projectRequest, Quantity quantity, RangeAllocation rangeAllocation, RangeAllocationList rangeAllocationList, ResourceAccessReview resourceAccessReview, ResourceAccessReviewResponse resourceAccessReviewResponse, RootPaths rootPaths, Route route, RouteList routeList, SecurityContextConstraints securityContextConstraints, SecurityContextConstraintsList securityContextConstraintsList, SelfSubjectRulesReview selfSubjectRulesReview, Status status, SubjectAccessReview subjectAccessReview, SubjectAccessReviewResponse subjectAccessReviewResponse, SubjectRulesReview subjectRulesReview, TagEvent tagEvent, Template template, TemplateInstance templateInstance, TemplateInstanceList templateInstanceList, TemplateList templateList, String time, TokenReview tokenReview, TypeMeta typeMeta, UpdateOptions updateOptions, User user, UserIdentityMapping userIdentityMapping, UserList userList, UserOAuthAccessToken userOAuthAccessToken, UserOAuthAccessTokenList userOAuthAccessTokenList) { + public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, AggregationRule aggregationRule, AppliedClusterResourceQuota appliedClusterResourceQuota, AppliedClusterResourceQuotaList appliedClusterResourceQuotaList, KubernetesList baseKubernetesList, BrokerTemplateInstance brokerTemplateInstance, BrokerTemplateInstanceList brokerTemplateInstanceList, BuildConfigList buildConfigList, BuildList buildList, BuildRequest buildRequest, ClusterNetwork clusterNetwork, ClusterNetworkList clusterNetworkList, ClusterResourceQuota clusterResourceQuota, ClusterResourceQuotaList clusterResourceQuotaList, Config config, CreateOptions createOptions, DeleteOptions deleteOptions, DeploymentConfig deploymentConfig, DeploymentConfigList deploymentConfigList, DeploymentConfigRollback deploymentConfigRollback, EgressNetworkPolicy egressNetworkPolicy, EgressNetworkPolicyList egressNetworkPolicyList, GetOptions getOptions, Group group, GroupList groupList, HelmChartRepository helmChartRepository, HelmChartRepositoryList helmChartRepositoryList, HostSubnet hostSubnet, HostSubnetList hostSubnetList, Identity identity, IdentityList identityList, ImageList imageList, ImageSignature imageSignature, ImageStreamImage imageStreamImage, ImageStreamImport imageStreamImport, ImageStreamList imageStreamList, ImageStreamMapping imageStreamMapping, ImageStreamTagList imageStreamTagList, ImageTag imageTag, ImageTagList imageTagList, Info info, ListOptions listOptions, LocalResourceAccessReview localResourceAccessReview, LocalSubjectAccessReview localSubjectAccessReview, NetNamespace netNamespace, NetNamespaceList netNamespaceList, OAuthAccessToken oAuthAccessToken, OAuthAccessTokenList oAuthAccessTokenList, OAuthAuthorizeToken oAuthAuthorizeToken, OAuthAuthorizeTokenList oAuthAuthorizeTokenList, OAuthClient oAuthClient, OAuthClientAuthorization oAuthClientAuthorization, OAuthClientAuthorizationList oAuthClientAuthorizationList, OAuthClientList oAuthClientList, ObjectMeta objectMeta, RoleBindingRestrictionList openShiftRoleBindingRestrictionList, ClusterRole openshiftClusterRole, ClusterRoleBinding openshiftClusterRoleBinding, ClusterRoleBindingList openshiftClusterRoleBindingList, ClusterRoleList openshiftClusterRoleList, ClusterRoleScopeRestriction openshiftClusterRoleScopeRestriction, Role openshiftRole, RoleBinding openshiftRoleBinding, RoleBindingList openshiftRoleBindingList, RoleBindingRestriction openshiftRoleBindingRestriction, RoleBindingRestrictionSpec openshiftRoleBindingRestrictionSpec, RoleList openshiftRoleList, Patch patch, PatchOptions patchOptions, PodSecurityPolicyReview podSecurityPolicyReview, PodSecurityPolicySelfSubjectReview podSecurityPolicySelfSubjectReview, PodSecurityPolicySubjectReview podSecurityPolicySubjectReview, Project project, ProjectHelmChartRepository projectHelmChartRepository, ProjectHelmChartRepositoryList projectHelmChartRepositoryList, ProjectList projectList, ProjectRequest projectRequest, Quantity quantity, RangeAllocation rangeAllocation, RangeAllocationList rangeAllocationList, ResourceAccessReview resourceAccessReview, ResourceAccessReviewResponse resourceAccessReviewResponse, RootPaths rootPaths, Route route, RouteList routeList, SecurityContextConstraints securityContextConstraints, SecurityContextConstraintsList securityContextConstraintsList, SelfSubjectRulesReview selfSubjectRulesReview, Status status, SubjectAccessReview subjectAccessReview, SubjectAccessReviewResponse subjectAccessReviewResponse, SubjectRulesReview subjectRulesReview, TagEvent tagEvent, Template template, TemplateInstance templateInstance, TemplateInstanceList templateInstanceList, TemplateList templateList, String time, TokenReview tokenReview, TypeMeta typeMeta, UpdateOptions updateOptions, User user, UserIdentityMapping userIdentityMapping, UserList userList, UserOAuthAccessToken userOAuthAccessToken, UserOAuthAccessTokenList userOAuthAccessTokenList) { super(); this.aPIGroup = aPIGroup; this.aPIGroupList = aPIGroupList; @@ -239,6 +241,7 @@ public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, AggregationRule this.deleteOptions = deleteOptions; this.deploymentConfig = deploymentConfig; this.deploymentConfigList = deploymentConfigList; + this.deploymentConfigRollback = deploymentConfigRollback; this.egressNetworkPolicy = egressNetworkPolicy; this.egressNetworkPolicyList = egressNetworkPolicyList; this.getOptions = getOptions; @@ -527,6 +530,16 @@ public void setDeploymentConfigList(DeploymentConfigList deploymentConfigList) { this.deploymentConfigList = deploymentConfigList; } + @JsonProperty("DeploymentConfigRollback") + public DeploymentConfigRollback getDeploymentConfigRollback() { + return deploymentConfigRollback; + } + + @JsonProperty("DeploymentConfigRollback") + public void setDeploymentConfigRollback(DeploymentConfigRollback deploymentConfigRollback) { + this.deploymentConfigRollback = deploymentConfigRollback; + } + @JsonProperty("EgressNetworkPolicy") public EgressNetworkPolicy getEgressNetworkPolicy() { return egressNetworkPolicy; diff --git a/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java index b658820b172..2d7945ca824 100644 --- a/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java +++ b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java @@ -29,6 +29,7 @@ import io.fabric8.openshift.api.model.ClusterRoleScopeRestriction; import io.fabric8.openshift.api.model.DeploymentConfig; import io.fabric8.openshift.api.model.DeploymentConfigList; +import io.fabric8.openshift.api.model.DeploymentConfigRollback; import io.fabric8.openshift.api.model.EgressNetworkPolicy; import io.fabric8.openshift.api.model.EgressNetworkPolicyList; import io.fabric8.openshift.api.model.Group; @@ -121,6 +122,7 @@ public class ValidationSchema { private DeleteOptions deleteOptions; private DeploymentConfig deploymentConfig; private DeploymentConfigList deploymentConfigList; + private DeploymentConfigRollback deploymentConfigRollback; private EgressNetworkPolicy egressNetworkPolicy; private EgressNetworkPolicyList egressNetworkPolicyList; private GetOptions getOptions; @@ -217,7 +219,7 @@ public class ValidationSchema { public ValidationSchema() { } - public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, AggregationRule aggregationRule, AppliedClusterResourceQuota appliedClusterResourceQuota, AppliedClusterResourceQuotaList appliedClusterResourceQuotaList, KubernetesList baseKubernetesList, BrokerTemplateInstance brokerTemplateInstance, BrokerTemplateInstanceList brokerTemplateInstanceList, BuildConfigList buildConfigList, BuildList buildList, BuildRequest buildRequest, ClusterNetwork clusterNetwork, ClusterNetworkList clusterNetworkList, ClusterResourceQuota clusterResourceQuota, ClusterResourceQuotaList clusterResourceQuotaList, Config config, CreateOptions createOptions, DeleteOptions deleteOptions, DeploymentConfig deploymentConfig, DeploymentConfigList deploymentConfigList, EgressNetworkPolicy egressNetworkPolicy, EgressNetworkPolicyList egressNetworkPolicyList, GetOptions getOptions, Group group, GroupList groupList, HelmChartRepository helmChartRepository, HelmChartRepositoryList helmChartRepositoryList, HostSubnet hostSubnet, HostSubnetList hostSubnetList, Identity identity, IdentityList identityList, ImageList imageList, ImageSignature imageSignature, ImageStreamImage imageStreamImage, ImageStreamImport imageStreamImport, ImageStreamList imageStreamList, ImageStreamMapping imageStreamMapping, ImageStreamTagList imageStreamTagList, ImageTag imageTag, ImageTagList imageTagList, Info info, ListOptions listOptions, LocalResourceAccessReview localResourceAccessReview, LocalSubjectAccessReview localSubjectAccessReview, NetNamespace netNamespace, NetNamespaceList netNamespaceList, OAuthAccessToken oAuthAccessToken, OAuthAccessTokenList oAuthAccessTokenList, OAuthAuthorizeToken oAuthAuthorizeToken, OAuthAuthorizeTokenList oAuthAuthorizeTokenList, OAuthClient oAuthClient, OAuthClientAuthorization oAuthClientAuthorization, OAuthClientAuthorizationList oAuthClientAuthorizationList, OAuthClientList oAuthClientList, ObjectMeta objectMeta, RoleBindingRestrictionList openShiftRoleBindingRestrictionList, ClusterRole openshiftClusterRole, ClusterRoleBinding openshiftClusterRoleBinding, ClusterRoleBindingList openshiftClusterRoleBindingList, ClusterRoleList openshiftClusterRoleList, ClusterRoleScopeRestriction openshiftClusterRoleScopeRestriction, Role openshiftRole, RoleBinding openshiftRoleBinding, RoleBindingList openshiftRoleBindingList, RoleBindingRestriction openshiftRoleBindingRestriction, RoleBindingRestrictionSpec openshiftRoleBindingRestrictionSpec, RoleList openshiftRoleList, Patch patch, PatchOptions patchOptions, PodSecurityPolicyReview podSecurityPolicyReview, PodSecurityPolicySelfSubjectReview podSecurityPolicySelfSubjectReview, PodSecurityPolicySubjectReview podSecurityPolicySubjectReview, Project project, ProjectHelmChartRepository projectHelmChartRepository, ProjectHelmChartRepositoryList projectHelmChartRepositoryList, ProjectList projectList, ProjectRequest projectRequest, Quantity quantity, RangeAllocation rangeAllocation, RangeAllocationList rangeAllocationList, ResourceAccessReview resourceAccessReview, ResourceAccessReviewResponse resourceAccessReviewResponse, RootPaths rootPaths, Route route, RouteList routeList, SecurityContextConstraints securityContextConstraints, SecurityContextConstraintsList securityContextConstraintsList, SelfSubjectRulesReview selfSubjectRulesReview, Status status, SubjectAccessReview subjectAccessReview, SubjectAccessReviewResponse subjectAccessReviewResponse, SubjectRulesReview subjectRulesReview, TagEvent tagEvent, Template template, TemplateInstance templateInstance, TemplateInstanceList templateInstanceList, TemplateList templateList, String time, TokenReview tokenReview, TypeMeta typeMeta, UpdateOptions updateOptions, User user, UserIdentityMapping userIdentityMapping, UserList userList, UserOAuthAccessToken userOAuthAccessToken, UserOAuthAccessTokenList userOAuthAccessTokenList) { + public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, AggregationRule aggregationRule, AppliedClusterResourceQuota appliedClusterResourceQuota, AppliedClusterResourceQuotaList appliedClusterResourceQuotaList, KubernetesList baseKubernetesList, BrokerTemplateInstance brokerTemplateInstance, BrokerTemplateInstanceList brokerTemplateInstanceList, BuildConfigList buildConfigList, BuildList buildList, BuildRequest buildRequest, ClusterNetwork clusterNetwork, ClusterNetworkList clusterNetworkList, ClusterResourceQuota clusterResourceQuota, ClusterResourceQuotaList clusterResourceQuotaList, Config config, CreateOptions createOptions, DeleteOptions deleteOptions, DeploymentConfig deploymentConfig, DeploymentConfigList deploymentConfigList, DeploymentConfigRollback deploymentConfigRollback, EgressNetworkPolicy egressNetworkPolicy, EgressNetworkPolicyList egressNetworkPolicyList, GetOptions getOptions, Group group, GroupList groupList, HelmChartRepository helmChartRepository, HelmChartRepositoryList helmChartRepositoryList, HostSubnet hostSubnet, HostSubnetList hostSubnetList, Identity identity, IdentityList identityList, ImageList imageList, ImageSignature imageSignature, ImageStreamImage imageStreamImage, ImageStreamImport imageStreamImport, ImageStreamList imageStreamList, ImageStreamMapping imageStreamMapping, ImageStreamTagList imageStreamTagList, ImageTag imageTag, ImageTagList imageTagList, Info info, ListOptions listOptions, LocalResourceAccessReview localResourceAccessReview, LocalSubjectAccessReview localSubjectAccessReview, NetNamespace netNamespace, NetNamespaceList netNamespaceList, OAuthAccessToken oAuthAccessToken, OAuthAccessTokenList oAuthAccessTokenList, OAuthAuthorizeToken oAuthAuthorizeToken, OAuthAuthorizeTokenList oAuthAuthorizeTokenList, OAuthClient oAuthClient, OAuthClientAuthorization oAuthClientAuthorization, OAuthClientAuthorizationList oAuthClientAuthorizationList, OAuthClientList oAuthClientList, ObjectMeta objectMeta, RoleBindingRestrictionList openShiftRoleBindingRestrictionList, ClusterRole openshiftClusterRole, ClusterRoleBinding openshiftClusterRoleBinding, ClusterRoleBindingList openshiftClusterRoleBindingList, ClusterRoleList openshiftClusterRoleList, ClusterRoleScopeRestriction openshiftClusterRoleScopeRestriction, Role openshiftRole, RoleBinding openshiftRoleBinding, RoleBindingList openshiftRoleBindingList, RoleBindingRestriction openshiftRoleBindingRestriction, RoleBindingRestrictionSpec openshiftRoleBindingRestrictionSpec, RoleList openshiftRoleList, Patch patch, PatchOptions patchOptions, PodSecurityPolicyReview podSecurityPolicyReview, PodSecurityPolicySelfSubjectReview podSecurityPolicySelfSubjectReview, PodSecurityPolicySubjectReview podSecurityPolicySubjectReview, Project project, ProjectHelmChartRepository projectHelmChartRepository, ProjectHelmChartRepositoryList projectHelmChartRepositoryList, ProjectList projectList, ProjectRequest projectRequest, Quantity quantity, RangeAllocation rangeAllocation, RangeAllocationList rangeAllocationList, ResourceAccessReview resourceAccessReview, ResourceAccessReviewResponse resourceAccessReviewResponse, RootPaths rootPaths, Route route, RouteList routeList, SecurityContextConstraints securityContextConstraints, SecurityContextConstraintsList securityContextConstraintsList, SelfSubjectRulesReview selfSubjectRulesReview, Status status, SubjectAccessReview subjectAccessReview, SubjectAccessReviewResponse subjectAccessReviewResponse, SubjectRulesReview subjectRulesReview, TagEvent tagEvent, Template template, TemplateInstance templateInstance, TemplateInstanceList templateInstanceList, TemplateList templateList, String time, TokenReview tokenReview, TypeMeta typeMeta, UpdateOptions updateOptions, User user, UserIdentityMapping userIdentityMapping, UserList userList, UserOAuthAccessToken userOAuthAccessToken, UserOAuthAccessTokenList userOAuthAccessTokenList) { super(); this.aPIGroup = aPIGroup; this.aPIGroupList = aPIGroupList; @@ -239,6 +241,7 @@ public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, Aggregatio this.deleteOptions = deleteOptions; this.deploymentConfig = deploymentConfig; this.deploymentConfigList = deploymentConfigList; + this.deploymentConfigRollback = deploymentConfigRollback; this.egressNetworkPolicy = egressNetworkPolicy; this.egressNetworkPolicyList = egressNetworkPolicyList; this.getOptions = getOptions; @@ -527,6 +530,16 @@ public void setDeploymentConfigList(DeploymentConfigList deploymentConfigList) { this.deploymentConfigList = deploymentConfigList; } + @JsonProperty("DeploymentConfigRollback") + public DeploymentConfigRollback getDeploymentConfigRollback() { + return deploymentConfigRollback; + } + + @JsonProperty("DeploymentConfigRollback") + public void setDeploymentConfigRollback(DeploymentConfigRollback deploymentConfigRollback) { + this.deploymentConfigRollback = deploymentConfigRollback; + } + @JsonProperty("EgressNetworkPolicy") public EgressNetworkPolicy getEgressNetworkPolicy() { return egressNetworkPolicy; diff --git a/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/DeploymentConfigRollback.java b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/DeploymentConfigRollback.java new file mode 100644 index 00000000000..71c853164df --- /dev/null +++ b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/DeploymentConfigRollback.java @@ -0,0 +1,203 @@ + +package io.fabric8.openshift.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.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; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +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; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.model.annotation.Group; +import io.fabric8.kubernetes.model.annotation.Version; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import io.sundr.transform.annotations.TemplateTransformation; +import io.sundr.transform.annotations.TemplateTransformations; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "name", + "spec", + "updatedAnnotations" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@TemplateTransformations({ + @TemplateTransformation(value = "/manifest.vm", outputPath = "META-INF/services/io.fabric8.kubernetes.api.model.KubernetesResource", gather = true) +}) +@Version("v1") +@Group("apps.openshift.io") +@Generated("jsonschema2pojo") +public class DeploymentConfigRollback implements Editable , KubernetesResource +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private java.lang.String apiVersion = "apps.openshift.io/v1"; + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private java.lang.String kind = "DeploymentConfigRollback"; + @JsonProperty("name") + private java.lang.String name; + @JsonProperty("spec") + private DeploymentConfigRollbackSpec spec; + @JsonProperty("updatedAnnotations") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Map updatedAnnotations = new LinkedHashMap(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public DeploymentConfigRollback() { + } + + public DeploymentConfigRollback(java.lang.String apiVersion, java.lang.String kind, java.lang.String name, DeploymentConfigRollbackSpec spec, Map updatedAnnotations) { + super(); + this.apiVersion = apiVersion; + this.kind = kind; + this.name = name; + this.spec = spec; + this.updatedAnnotations = updatedAnnotations; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public java.lang.String getApiVersion() { + return apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public void setApiVersion(java.lang.String apiVersion) { + this.apiVersion = apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public java.lang.String getKind() { + return kind; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public void setKind(java.lang.String kind) { + this.kind = kind; + } + + @JsonProperty("name") + public java.lang.String getName() { + return name; + } + + @JsonProperty("name") + public void setName(java.lang.String name) { + this.name = name; + } + + @JsonProperty("spec") + public DeploymentConfigRollbackSpec getSpec() { + return spec; + } + + @JsonProperty("spec") + public void setSpec(DeploymentConfigRollbackSpec spec) { + this.spec = spec; + } + + @JsonProperty("updatedAnnotations") + public Map getUpdatedAnnotations() { + return updatedAnnotations; + } + + @JsonProperty("updatedAnnotations") + public void setUpdatedAnnotations(Map updatedAnnotations) { + this.updatedAnnotations = updatedAnnotations; + } + + @JsonIgnore + public DeploymentConfigRollbackBuilder edit() { + return new DeploymentConfigRollbackBuilder(this); + } + + @JsonIgnore + public DeploymentConfigRollbackBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/DeploymentConfigRollbackSpec.java b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/DeploymentConfigRollbackSpec.java new file mode 100644 index 00000000000..c9d03b51b22 --- /dev/null +++ b/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/DeploymentConfigRollbackSpec.java @@ -0,0 +1,178 @@ + +package io.fabric8.openshift.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.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; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +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.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "from", + "includeReplicationMeta", + "includeStrategy", + "includeTemplate", + "includeTriggers", + "revision" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(io.fabric8.kubernetes.api.model.ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class DeploymentConfigRollbackSpec implements Editable , KubernetesResource +{ + + @JsonProperty("from") + private io.fabric8.kubernetes.api.model.ObjectReference from; + @JsonProperty("includeReplicationMeta") + private Boolean includeReplicationMeta; + @JsonProperty("includeStrategy") + private Boolean includeStrategy; + @JsonProperty("includeTemplate") + private Boolean includeTemplate; + @JsonProperty("includeTriggers") + private Boolean includeTriggers; + @JsonProperty("revision") + private Long revision; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public DeploymentConfigRollbackSpec() { + } + + public DeploymentConfigRollbackSpec(io.fabric8.kubernetes.api.model.ObjectReference from, Boolean includeReplicationMeta, Boolean includeStrategy, Boolean includeTemplate, Boolean includeTriggers, Long revision) { + super(); + this.from = from; + this.includeReplicationMeta = includeReplicationMeta; + this.includeStrategy = includeStrategy; + this.includeTemplate = includeTemplate; + this.includeTriggers = includeTriggers; + this.revision = revision; + } + + @JsonProperty("from") + public io.fabric8.kubernetes.api.model.ObjectReference getFrom() { + return from; + } + + @JsonProperty("from") + public void setFrom(io.fabric8.kubernetes.api.model.ObjectReference from) { + this.from = from; + } + + @JsonProperty("includeReplicationMeta") + public Boolean getIncludeReplicationMeta() { + return includeReplicationMeta; + } + + @JsonProperty("includeReplicationMeta") + public void setIncludeReplicationMeta(Boolean includeReplicationMeta) { + this.includeReplicationMeta = includeReplicationMeta; + } + + @JsonProperty("includeStrategy") + public Boolean getIncludeStrategy() { + return includeStrategy; + } + + @JsonProperty("includeStrategy") + public void setIncludeStrategy(Boolean includeStrategy) { + this.includeStrategy = includeStrategy; + } + + @JsonProperty("includeTemplate") + public Boolean getIncludeTemplate() { + return includeTemplate; + } + + @JsonProperty("includeTemplate") + public void setIncludeTemplate(Boolean includeTemplate) { + this.includeTemplate = includeTemplate; + } + + @JsonProperty("includeTriggers") + public Boolean getIncludeTriggers() { + return includeTriggers; + } + + @JsonProperty("includeTriggers") + public void setIncludeTriggers(Boolean includeTriggers) { + this.includeTriggers = includeTriggers; + } + + @JsonProperty("revision") + public Long getRevision() { + return revision; + } + + @JsonProperty("revision") + public void setRevision(Long revision) { + this.revision = revision; + } + + @JsonIgnore + public DeploymentConfigRollbackSpecBuilder edit() { + return new DeploymentConfigRollbackSpecBuilder(this); + } + + @JsonIgnore + public DeploymentConfigRollbackSpecBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/openshift-model/src/main/resources/schema/kube-schema.json b/kubernetes-model-generator/openshift-model/src/main/resources/schema/kube-schema.json index 45c09b53660..b05c49fe747 100644 --- a/kubernetes-model-generator/openshift-model/src/main/resources/schema/kube-schema.json +++ b/kubernetes-model-generator/openshift-model/src/main/resources/schema/kube-schema.json @@ -7152,6 +7152,70 @@ "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.DeploymentConfig\u003e" ] }, + "os_deploy_DeploymentConfigRollback": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "apps.openshift.io/v1", + "required": true + }, + "kind": { + "type": "string", + "default": "DeploymentConfigRollback", + "required": true + }, + "name": { + "type": "string" + }, + "spec": { + "$ref": "#/definitions/os_deploy_DeploymentConfigRollbackSpec", + "existingJavaType": "io.fabric8.openshift.api.model.DeploymentConfigRollbackSpec" + }, + "updatedAnnotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "existingJavaType": "java.util.Map\u003cString, String\u003e" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.openshift.api.model.DeploymentConfigRollback", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "os_deploy_DeploymentConfigRollbackSpec": { + "type": "object", + "properties": { + "from": { + "$ref": "#/definitions/kubernetes_core_ObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.ObjectReference" + }, + "includeReplicationMeta": { + "type": "boolean" + }, + "includeStrategy": { + "type": "boolean" + }, + "includeTemplate": { + "type": "boolean" + }, + "includeTriggers": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "existingJavaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.openshift.api.model.DeploymentConfigRollbackSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, "os_deploy_DeploymentConfigSpec": { "type": "object", "properties": { @@ -11382,6 +11446,10 @@ "$ref": "#/definitions/os_deploy_DeploymentConfigList", "existingJavaType": "io.fabric8.openshift.api.model.DeploymentConfigList" }, + "DeploymentConfigRollback": { + "$ref": "#/definitions/os_deploy_DeploymentConfigRollback", + "existingJavaType": "io.fabric8.openshift.api.model.DeploymentConfigRollback" + }, "EgressNetworkPolicy": { "$ref": "#/definitions/os_network_EgressNetworkPolicy", "existingJavaType": "io.fabric8.openshift.api.model.EgressNetworkPolicy" diff --git a/kubernetes-model-generator/openshift-model/src/main/resources/schema/validation-schema.json b/kubernetes-model-generator/openshift-model/src/main/resources/schema/validation-schema.json index 56d8b403078..f891217cf17 100644 --- a/kubernetes-model-generator/openshift-model/src/main/resources/schema/validation-schema.json +++ b/kubernetes-model-generator/openshift-model/src/main/resources/schema/validation-schema.json @@ -7152,6 +7152,70 @@ "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.openshift.api.model.DeploymentConfig\u003e" ] }, + "os_deploy_DeploymentConfigRollback": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "apps.openshift.io/v1", + "required": true + }, + "kind": { + "type": "string", + "default": "DeploymentConfigRollback", + "required": true + }, + "name": { + "type": "string" + }, + "spec": { + "$ref": "#/definitions/os_deploy_DeploymentConfigRollbackSpec", + "existingJavaType": "io.fabric8.openshift.api.model.DeploymentConfigRollbackSpec" + }, + "updatedAnnotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "existingJavaType": "java.util.Map\u003cString, String\u003e" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.openshift.api.model.DeploymentConfigRollback", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "os_deploy_DeploymentConfigRollbackSpec": { + "type": "object", + "properties": { + "from": { + "$ref": "#/definitions/kubernetes_core_ObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.ObjectReference" + }, + "includeReplicationMeta": { + "type": "boolean" + }, + "includeStrategy": { + "type": "boolean" + }, + "includeTemplate": { + "type": "boolean" + }, + "includeTriggers": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "existingJavaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.openshift.api.model.DeploymentConfigRollbackSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, "os_deploy_DeploymentConfigSpec": { "type": "object", "properties": { @@ -11382,6 +11446,10 @@ "$ref": "#/definitions/os_deploy_DeploymentConfigList", "existingJavaType": "io.fabric8.openshift.api.model.DeploymentConfigList" }, + "DeploymentConfigRollback": { + "$ref": "#/definitions/os_deploy_DeploymentConfigRollback", + "existingJavaType": "io.fabric8.openshift.api.model.DeploymentConfigRollback" + }, "EgressNetworkPolicy": { "$ref": "#/definitions/os_network_EgressNetworkPolicy", "existingJavaType": "io.fabric8.openshift.api.model.EgressNetworkPolicy" @@ -13894,6 +13962,60 @@ }, "additionalProperties": true }, + "deploymentconfigrollback": { + "properties": { + "apiVersion": { + "type": "string", + "default": "apps.openshift.io/v1", + "required": true + }, + "kind": { + "type": "string", + "default": "DeploymentConfigRollback", + "required": true + }, + "name": { + "type": "string" + }, + "spec": { + "$ref": "#/definitions/os_deploy_DeploymentConfigRollbackSpec", + "existingJavaType": "io.fabric8.openshift.api.model.DeploymentConfigRollbackSpec" + }, + "updatedAnnotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "existingJavaType": "java.util.Map\u003cString, String\u003e" + } + }, + "additionalProperties": true + }, + "deploymentconfigrollbackspec": { + "properties": { + "from": { + "$ref": "#/definitions/kubernetes_core_ObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.ObjectReference" + }, + "includeReplicationMeta": { + "type": "boolean" + }, + "includeStrategy": { + "type": "boolean" + }, + "includeTemplate": { + "type": "boolean" + }, + "includeTriggers": { + "type": "boolean" + }, + "revision": { + "type": "integer", + "existingJavaType": "Long" + } + }, + "additionalProperties": true + }, "deploymentconfigspec": { "properties": { "minReadySeconds": { diff --git a/kubernetes-model-generator/openshift-model/src/test/java/io/fabric8/openshift/api/model/DeploymentConfigRollbackTest.java b/kubernetes-model-generator/openshift-model/src/test/java/io/fabric8/openshift/api/model/DeploymentConfigRollbackTest.java new file mode 100644 index 00000000000..1bd6fca2d20 --- /dev/null +++ b/kubernetes-model-generator/openshift-model/src/test/java/io/fabric8/openshift/api/model/DeploymentConfigRollbackTest.java @@ -0,0 +1,87 @@ +/* + * 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.api.model; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.fabric8.kubernetes.api.model.Helper; +import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.util.Collections; + +import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER; +import static net.javacrumbs.jsonunit.core.Option.IGNORING_EXTRA_FIELDS; +import static net.javacrumbs.jsonunit.core.Option.TREATING_NULL_AS_ABSENT; +import static net.javacrumbs.jsonunit.fluent.JsonFluentAssert.assertThatJson; + +class DeploymentConfigRollbackTest { + + private final ObjectMapper mapper = new ObjectMapper(); + + @Test + void deploymentConfigRollbackTest() throws Exception { + // given + final String originalJson = Helper.loadJson("/valid-deploymentConfigRollback.json"); + + // when + final DeploymentConfigRollback deploymentConfigRollback = mapper.readValue(originalJson, + DeploymentConfigRollback.class); + final String serializedJson = mapper.writeValueAsString(deploymentConfigRollback); + + // then + assertThatJson(serializedJson).when(IGNORING_ARRAY_ORDER, TREATING_NULL_AS_ABSENT, + IGNORING_EXTRA_FIELDS) + .isEqualTo(originalJson); + } + + @Test + void deploymentConfigRollbackBuilderTest() throws Exception { + //given + final DeploymentConfigRollback expected = mapper.readValue( + Helper.loadJson("/valid-deploymentConfigRollback.json"), + DeploymentConfigRollback.class); + + //when + DeploymentConfigRollback actual = new DeploymentConfigRollbackBuilder() + .withName("app-to-rollback") + .withNewSpec() + .withFrom( + new ObjectReferenceBuilder() + .withApiVersion("version-1") + .withFieldPath("fieldPath") + .withKind("ObjectReference") + .withName("ObjectReferenceName") + .withNamespace("ObjectReferenceNamespace") + .withResourceVersion("version 1") + .withUid("1234") + .build()) + .withIncludeReplicationMeta(Boolean.FALSE) + .withIncludeStrategy(Boolean.FALSE) + .withIncludeTemplate(Boolean.FALSE) + .withIncludeTriggers(Boolean.FALSE) + .withRevision(1L) + .endSpec() + .withUpdatedAnnotations( + Collections.singletonMap("APPLICATION_VERSION", "2.7.18")) + .withAdditionalProperties( + Collections.singletonMap("additionalProperty", "additionalValue")) + .build(); + + //then + Assertions.assertEquals(expected, actual); + } +} diff --git a/kubernetes-model-generator/openshift-model/src/test/resources/valid-deploymentConfigRollback.json b/kubernetes-model-generator/openshift-model/src/test/resources/valid-deploymentConfigRollback.json new file mode 100644 index 00000000000..53bc14c78bf --- /dev/null +++ b/kubernetes-model-generator/openshift-model/src/test/resources/valid-deploymentConfigRollback.json @@ -0,0 +1,25 @@ +{ + "apiVersion": "apps.openshift.io/v1", + "kind": "DeploymentConfigRollback", + "name": "app-to-rollback", + "spec": { + "from": { + "apiVersion": "version-1", + "fieldPath": "fieldPath", + "kind": "ObjectReference", + "name": "ObjectReferenceName", + "namespace": "ObjectReferenceNamespace", + "resourceVersion": "version 1", + "uid": "1234" + }, + "includeReplicationMeta": false, + "includeStrategy": false, + "includeTemplate": false, + "includeTriggers": false, + "revision": 1 + }, + "updatedAnnotations": { + "APPLICATION_VERSION": "2.7.18" + }, + "additionalProperty": "additionalValue" +}