Skip to content

Commit 1d3bd12

Browse files
fix(kafka-mgmt/v1): update kafka-mgmt/v1 SDK (#378)
Co-authored-by: app-services-ci <app-services-ci@users.noreply.github.com>
1 parent db707c2 commit 1d3bd12

4 files changed

Lines changed: 58 additions & 3 deletions

File tree

.openapi/kas-fleet-manager.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@ components:
16251625
- cluster_id
16261626
- cluster_external_id
16271627
- cluster_ingress_dns_name
1628+
- kafka_machine_pool_node_count
16281629
type: object
16291630
properties:
16301631
cluster_id:
@@ -1636,6 +1637,15 @@ components:
16361637
cluster_ingress_dns_name:
16371638
description: dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters/<cluster_id>/ingresses (dns_name)
16381639
type: string
1640+
kafka_machine_pool_node_count:
1641+
description: |-
1642+
The node count given to the created kafka machine pool.
1643+
The machine pool must be created via /api/clusters_mgmt/v1/clusters/<cluster_id>/machine_pools prior to passing this value.
1644+
The created machine pool must have a `bf2.org/kafkaInstanceProfileType=standard` label and a `bf2.org/kafkaInstanceProfileType=standard:NoExecute` taint.
1645+
The name of the machine pool must be `kafka-standard`
1646+
The node count value has to be a multiple of 3 with a minimum of 3 nodes.
1647+
type: integer
1648+
format: int32
16391649
EnterpriseCluster:
16401650
description: Enterprise cluster registration endpoint response
16411651
allOf:

packages/kafka-management-sdk/api/openapi.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,6 +2199,7 @@ components:
21992199
EnterpriseOsdClusterPayload:
22002200
description: Schema for the request body sent to /clusters POST
22012201
example:
2202+
kafka_machine_pool_node_count: 0
22022203
cluster_id: cluster_id
22032204
cluster_external_id: cluster_external_id
22042205
cluster_ingress_dns_name: cluster_ingress_dns_name
@@ -2214,10 +2215,20 @@ components:
22142215
description: dns name of the cluster. Can be obtained from the response
22152216
JSON of the /api/clusters_mgmt/v1/clusters/<cluster_id>/ingresses (dns_name)
22162217
type: string
2218+
kafka_machine_pool_node_count:
2219+
description: "The node count given to the created kafka machine pool. \n\
2220+
The machine pool must be created via /api/clusters_mgmt/v1/clusters/<cluster_id>/machine_pools\
2221+
\ prior to passing this value.\nThe created machine pool must have a `bf2.org/kafkaInstanceProfileType=standard`\
2222+
\ label and a `bf2.org/kafkaInstanceProfileType=standard:NoExecute` taint.\n\
2223+
The name of the machine pool must be `kafka-standard` \nThe node count\
2224+
\ value has to be a multiple of 3 with a minimum of 3 nodes."
2225+
format: int32
2226+
type: integer
22172227
required:
22182228
- cluster_external_id
22192229
- cluster_id
22202230
- cluster_ingress_dns_name
2231+
- kafka_machine_pool_node_count
22212232
type: object
22222233
EnterpriseCluster:
22232234
allOf:

packages/kafka-management-sdk/docs/EnterpriseOsdClusterPayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
1111
**clusterId** | **String** | OSD cluster ID |
1212
**clusterExternalId** | **String** | external cluster ID. Can be obtained from the response JSON of ocm get /api/clusters_mgmt/v1/clusters/&lt;cluster_id&gt; |
1313
**clusterIngressDnsName** | **String** | dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters/&lt;cluster_id&gt;/ingresses (dns_name) |
14+
**kafkaMachinePoolNodeCount** | **Integer** | The node count given to the created kafka machine pool. The machine pool must be created via /api/clusters_mgmt/v1/clusters/&lt;cluster_id&gt;/machine_pools prior to passing this value. The created machine pool must have a &#x60;bf2.org/kafkaInstanceProfileType&#x3D;standard&#x60; label and a &#x60;bf2.org/kafkaInstanceProfileType&#x3D;standard:NoExecute&#x60; taint. The name of the machine pool must be &#x60;kafka-standard&#x60; The node count value has to be a multiple of 3 with a minimum of 3 nodes. |
1415

1516

1617

packages/kafka-management-sdk/src/main/java/com/openshift/cloud/api/kas/models/EnterpriseOsdClusterPayload.java

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
@JsonPropertyOrder({
3333
EnterpriseOsdClusterPayload.JSON_PROPERTY_CLUSTER_ID,
3434
EnterpriseOsdClusterPayload.JSON_PROPERTY_CLUSTER_EXTERNAL_ID,
35-
EnterpriseOsdClusterPayload.JSON_PROPERTY_CLUSTER_INGRESS_DNS_NAME
35+
EnterpriseOsdClusterPayload.JSON_PROPERTY_CLUSTER_INGRESS_DNS_NAME,
36+
EnterpriseOsdClusterPayload.JSON_PROPERTY_KAFKA_MACHINE_POOL_NODE_COUNT
3637
})
3738
@JsonTypeName("EnterpriseOsdClusterPayload")
3839
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@@ -46,6 +47,9 @@ public class EnterpriseOsdClusterPayload {
4647
public static final String JSON_PROPERTY_CLUSTER_INGRESS_DNS_NAME = "cluster_ingress_dns_name";
4748
private String clusterIngressDnsName;
4849

50+
public static final String JSON_PROPERTY_KAFKA_MACHINE_POOL_NODE_COUNT = "kafka_machine_pool_node_count";
51+
private Integer kafkaMachinePoolNodeCount;
52+
4953
public EnterpriseOsdClusterPayload() {
5054
}
5155

@@ -130,6 +134,33 @@ public void setClusterIngressDnsName(String clusterIngressDnsName) {
130134
}
131135

132136

137+
public EnterpriseOsdClusterPayload kafkaMachinePoolNodeCount(Integer kafkaMachinePoolNodeCount) {
138+
139+
this.kafkaMachinePoolNodeCount = kafkaMachinePoolNodeCount;
140+
return this;
141+
}
142+
143+
/**
144+
* The node count given to the created kafka machine pool. The machine pool must be created via /api/clusters_mgmt/v1/clusters/&lt;cluster_id&gt;/machine_pools prior to passing this value. The created machine pool must have a &#x60;bf2.org/kafkaInstanceProfileType&#x3D;standard&#x60; label and a &#x60;bf2.org/kafkaInstanceProfileType&#x3D;standard:NoExecute&#x60; taint. The name of the machine pool must be &#x60;kafka-standard&#x60; The node count value has to be a multiple of 3 with a minimum of 3 nodes.
145+
* @return kafkaMachinePoolNodeCount
146+
**/
147+
@javax.annotation.Nonnull
148+
@ApiModelProperty(required = true, value = "The node count given to the created kafka machine pool. The machine pool must be created via /api/clusters_mgmt/v1/clusters/<cluster_id>/machine_pools prior to passing this value. The created machine pool must have a `bf2.org/kafkaInstanceProfileType=standard` label and a `bf2.org/kafkaInstanceProfileType=standard:NoExecute` taint. The name of the machine pool must be `kafka-standard` The node count value has to be a multiple of 3 with a minimum of 3 nodes.")
149+
@JsonProperty(JSON_PROPERTY_KAFKA_MACHINE_POOL_NODE_COUNT)
150+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
151+
152+
public Integer getKafkaMachinePoolNodeCount() {
153+
return kafkaMachinePoolNodeCount;
154+
}
155+
156+
157+
@JsonProperty(JSON_PROPERTY_KAFKA_MACHINE_POOL_NODE_COUNT)
158+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
159+
public void setKafkaMachinePoolNodeCount(Integer kafkaMachinePoolNodeCount) {
160+
this.kafkaMachinePoolNodeCount = kafkaMachinePoolNodeCount;
161+
}
162+
163+
133164
@Override
134165
public boolean equals(Object o) {
135166
if (this == o) {
@@ -141,12 +172,13 @@ public boolean equals(Object o) {
141172
EnterpriseOsdClusterPayload enterpriseOsdClusterPayload = (EnterpriseOsdClusterPayload) o;
142173
return Objects.equals(this.clusterId, enterpriseOsdClusterPayload.clusterId) &&
143174
Objects.equals(this.clusterExternalId, enterpriseOsdClusterPayload.clusterExternalId) &&
144-
Objects.equals(this.clusterIngressDnsName, enterpriseOsdClusterPayload.clusterIngressDnsName);
175+
Objects.equals(this.clusterIngressDnsName, enterpriseOsdClusterPayload.clusterIngressDnsName) &&
176+
Objects.equals(this.kafkaMachinePoolNodeCount, enterpriseOsdClusterPayload.kafkaMachinePoolNodeCount);
145177
}
146178

147179
@Override
148180
public int hashCode() {
149-
return Objects.hash(clusterId, clusterExternalId, clusterIngressDnsName);
181+
return Objects.hash(clusterId, clusterExternalId, clusterIngressDnsName, kafkaMachinePoolNodeCount);
150182
}
151183

152184
@Override
@@ -156,6 +188,7 @@ public String toString() {
156188
sb.append(" clusterId: ").append(toIndentedString(clusterId)).append("\n");
157189
sb.append(" clusterExternalId: ").append(toIndentedString(clusterExternalId)).append("\n");
158190
sb.append(" clusterIngressDnsName: ").append(toIndentedString(clusterIngressDnsName)).append("\n");
191+
sb.append(" kafkaMachinePoolNodeCount: ").append(toIndentedString(kafkaMachinePoolNodeCount)).append("\n");
159192
sb.append("}");
160193
return sb.toString();
161194
}

0 commit comments

Comments
 (0)