Skip to content

Commit 654fad3

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

13 files changed

Lines changed: 216 additions & 150 deletions

.openapi/kas-fleet-manager.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ tags:
1515
description: Errors returned by the API.
1616
- name: security
1717
description: Security related endpoints.
18+
- name: enterprise-dataplane-clusters
19+
description: Enterprise data plane clusters registration and management endpoints.
1820
servers:
1921
- url: https://api.openshift.com
2022
description: Main (production) server
@@ -898,17 +900,17 @@ paths:
898900
- $ref: "#/components/parameters/id"
899901
/api/kafkas_mgmt/v1/clusters:
900902
post:
901-
description: Register enterprise OSD cluster
903+
description: Register enterprise data plane cluster
902904
operationId: registerEnterpriseOsdCluster
903905
requestBody:
904-
description: Enterprise OSD cluster details
906+
description: Enterprise data plane cluster details
905907
content:
906908
application/json:
907909
schema:
908910
$ref: '#/components/schemas/EnterpriseOsdClusterPayload'
909911
examples:
910-
USRegion:
911-
$ref: '#/components/examples/USRegionExample'
912+
EnterpriseOsdClusterPayloadExample:
913+
$ref: '#/components/examples/EnterpriseOsdClusterPayloadExample'
912914
required: true
913915
responses:
914916
"200":
@@ -966,6 +968,8 @@ paths:
966968
description: An unexpected error occurred while registering Enterprise cluster
967969
security:
968970
- Bearer: [ ]
971+
tags:
972+
- enterprise-dataplane-clusters
969973

970974
components:
971975
schemas:
@@ -1629,10 +1633,10 @@ components:
16291633
type: object
16301634
properties:
16311635
cluster_id:
1632-
description: OSD cluster ID
1636+
description: The data plane cluster ID. This is the ID of the cluster obtained from OpenShift Cluster Manager (OCM) API
16331637
type: string
16341638
cluster_external_id:
1635-
description: external cluster ID. Can be obtained from the response JSON of ocm get /api/clusters_mgmt/v1/clusters/<cluster_id>
1639+
description: external cluster ID. Can be obtained from the response JSON of OCM get /api/clusters_mgmt/v1/clusters/<cluster_id>
16361640
type: string
16371641
cluster_ingress_dns_name:
16381642
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)
@@ -1652,7 +1656,7 @@ components:
16521656
- type: object
16531657
properties:
16541658
cluster_id:
1655-
description: 'ocm cluster id of the registered Enterprise cluster'
1659+
description: 'OCM cluster id of the registered Enterprise cluster'
16561660
type: string
16571661
status:
16581662
description: 'status of registered Enterprise cluster'
@@ -2164,4 +2168,10 @@ components:
21642168
for cluster id: 1g5d88q0lrcdv4g7alb7slfgnj3dhbsj%!(EXTRA *errors.Error=identifier
21652169
is '404', code is 'CLUSTERS-MGMT-404' and operation identifier is '1g5or50viu07oealuehrkc26dgftj1ac':
21662170
Cluster '1g5d88q0lrcdv4g7alb7slfgnj3dhbsj' not found)"
2167-
operation_id: "1iYTsWry6nsqb2sNmFj5bXpD7Ca"
2171+
operation_id: "1iYTsWry6nsqb2sNmFj5bXpD7Ca"
2172+
EnterpriseOsdClusterPayloadExample:
2173+
value:
2174+
cluster_id: "1234abcd1234abcd1234abcd1234abcd"
2175+
cluster_external_id: "69d631de-9b7f-4bc2-bf4f-4d3295a7b25e"
2176+
cluster_ingress_dns_name: "apps.enterprise-aws.awdk.s1.devshift.org"
2177+
kafka_machine_pool_node_count: 9

packages/kafka-management-sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ Class | Method | HTTP request | Description
129129
*DefaultApi* | [**getMetricsByInstantQuery**](docs/DefaultApi.md#getMetricsByInstantQuery) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query |
130130
*DefaultApi* | [**getMetricsByRangeQuery**](docs/DefaultApi.md#getMetricsByRangeQuery) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query_range |
131131
*DefaultApi* | [**getVersionMetadata**](docs/DefaultApi.md#getVersionMetadata) | **GET** /api/kafkas_mgmt/v1 |
132-
*DefaultApi* | [**registerEnterpriseOsdCluster**](docs/DefaultApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
133132
*DefaultApi* | [**updateKafkaById**](docs/DefaultApi.md#updateKafkaById) | **PATCH** /api/kafkas_mgmt/v1/kafkas/{id} |
133+
*EnterpriseDataplaneClustersApi* | [**registerEnterpriseOsdCluster**](docs/EnterpriseDataplaneClustersApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
134134
*ErrorsApi* | [**getErrorById**](docs/ErrorsApi.md#getErrorById) | **GET** /api/kafkas_mgmt/v1/errors/{id} |
135135
*ErrorsApi* | [**getErrors**](docs/ErrorsApi.md#getErrors) | **GET** /api/kafkas_mgmt/v1/errors |
136136
*SecurityApi* | [**createServiceAccount**](docs/SecurityApi.md#createServiceAccount) | **POST** /api/kafkas_mgmt/v1/service_accounts |

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

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ tags:
2323
name: errors
2424
- description: Security related endpoints.
2525
name: security
26+
- description: Enterprise data plane clusters registration and management endpoints.
27+
name: enterprise-dataplane-clusters
2628
paths:
2729
/api/kafkas_mgmt/v1:
2830
get:
@@ -1201,17 +1203,17 @@ paths:
12011203
x-accepts: application/json
12021204
/api/kafkas_mgmt/v1/clusters:
12031205
post:
1204-
description: Register enterprise OSD cluster
1206+
description: Register enterprise data plane cluster
12051207
operationId: registerEnterpriseOsdCluster
12061208
requestBody:
12071209
content:
12081210
application/json:
12091211
examples:
1210-
USRegion:
1211-
$ref: '#/components/examples/USRegionExample'
1212+
EnterpriseOsdClusterPayloadExample:
1213+
$ref: '#/components/examples/EnterpriseOsdClusterPayloadExample'
12121214
schema:
12131215
$ref: '#/components/schemas/EnterpriseOsdClusterPayload'
1214-
description: Enterprise OSD cluster details
1216+
description: Enterprise data plane cluster details
12151217
required: true
12161218
responses:
12171219
"200":
@@ -1269,6 +1271,8 @@ paths:
12691271
description: An unexpected error occurred while registering Enterprise cluster
12701272
security:
12711273
- Bearer: []
1274+
tags:
1275+
- enterprise-dataplane-clusters
12721276
x-contentType: application/json
12731277
x-accepts: application/json
12741278
components:
@@ -1606,6 +1610,12 @@ components:
16061610
is ''404'', code is ''CLUSTERS-MGMT-404'' and operation identifier is ''1g5or50viu07oealuehrkc26dgftj1ac'':
16071611
Cluster ''1g5d88q0lrcdv4g7alb7slfgnj3dhbsj'' not found)'
16081612
operation_id: 1iYTsWry6nsqb2sNmFj5bXpD7Ca
1613+
EnterpriseOsdClusterPayloadExample:
1614+
value:
1615+
cluster_id: 1234abcd1234abcd1234abcd1234abcd
1616+
cluster_external_id: 69d631de-9b7f-4bc2-bf4f-4d3295a7b25e
1617+
cluster_ingress_dns_name: apps.enterprise-aws.awdk.s1.devshift.org
1618+
kafka_machine_pool_node_count: 9
16091619
parameters:
16101620
id:
16111621
description: The ID of record
@@ -2205,11 +2215,12 @@ components:
22052215
cluster_ingress_dns_name: cluster_ingress_dns_name
22062216
properties:
22072217
cluster_id:
2208-
description: OSD cluster ID
2218+
description: The data plane cluster ID. This is the ID of the cluster obtained
2219+
from OpenShift Cluster Manager (OCM) API
22092220
type: string
22102221
cluster_external_id:
22112222
description: external cluster ID. Can be obtained from the response JSON
2212-
of ocm get /api/clusters_mgmt/v1/clusters/<cluster_id>
2223+
of OCM get /api/clusters_mgmt/v1/clusters/<cluster_id>
22132224
type: string
22142225
cluster_ingress_dns_name:
22152226
description: dns name of the cluster. Can be obtained from the response
@@ -2500,7 +2511,7 @@ components:
25002511
EnterpriseCluster_allOf:
25012512
properties:
25022513
cluster_id:
2503-
description: ocm cluster id of the registered Enterprise cluster
2514+
description: OCM cluster id of the registered Enterprise cluster
25042515
type: string
25052516
status:
25062517
description: status of registered Enterprise cluster

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

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Method | HTTP request | Description
1515
[**getMetricsByInstantQuery**](DefaultApi.md#getMetricsByInstantQuery) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query |
1616
[**getMetricsByRangeQuery**](DefaultApi.md#getMetricsByRangeQuery) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query_range |
1717
[**getVersionMetadata**](DefaultApi.md#getVersionMetadata) | **GET** /api/kafkas_mgmt/v1 |
18-
[**registerEnterpriseOsdCluster**](DefaultApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
1918
[**updateKafkaById**](DefaultApi.md#updateKafkaById) | **PATCH** /api/kafkas_mgmt/v1/kafkas/{id} |
2019

2120

@@ -852,82 +851,6 @@ No authorization required
852851
| **200** | Version metadata | - |
853852

854853

855-
## registerEnterpriseOsdCluster
856-
857-
> EnterpriseCluster registerEnterpriseOsdCluster(enterpriseOsdClusterPayload)
858-
859-
860-
861-
Register enterprise OSD cluster
862-
863-
### Example
864-
865-
```java
866-
// Import classes:
867-
import com.openshift.cloud.api.kas.invoker.ApiClient;
868-
import com.openshift.cloud.api.kas.invoker.ApiException;
869-
import com.openshift.cloud.api.kas.invoker.Configuration;
870-
import com.openshift.cloud.api.kas.invoker.auth.*;
871-
import com.openshift.cloud.api.kas.invoker.models.*;
872-
import com.openshift.cloud.api.kas.DefaultApi;
873-
874-
public class Example {
875-
public static void main(String[] args) {
876-
ApiClient defaultClient = Configuration.getDefaultApiClient();
877-
defaultClient.setBasePath("https://api.openshift.com");
878-
879-
// Configure HTTP bearer authorization: Bearer
880-
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
881-
Bearer.setBearerToken("BEARER TOKEN");
882-
883-
DefaultApi apiInstance = new DefaultApi(defaultClient);
884-
EnterpriseOsdClusterPayload enterpriseOsdClusterPayload = new EnterpriseOsdClusterPayload(); // EnterpriseOsdClusterPayload | Enterprise OSD cluster details
885-
try {
886-
EnterpriseCluster result = apiInstance.registerEnterpriseOsdCluster(enterpriseOsdClusterPayload);
887-
System.out.println(result);
888-
} catch (ApiException e) {
889-
System.err.println("Exception when calling DefaultApi#registerEnterpriseOsdCluster");
890-
System.err.println("Status code: " + e.getCode());
891-
System.err.println("Reason: " + e.getResponseBody());
892-
System.err.println("Response headers: " + e.getResponseHeaders());
893-
e.printStackTrace();
894-
}
895-
}
896-
}
897-
```
898-
899-
### Parameters
900-
901-
902-
Name | Type | Description | Notes
903-
------------- | ------------- | ------------- | -------------
904-
**enterpriseOsdClusterPayload** | [**EnterpriseOsdClusterPayload**](EnterpriseOsdClusterPayload.md)| Enterprise OSD cluster details |
905-
906-
### Return type
907-
908-
[**EnterpriseCluster**](EnterpriseCluster.md)
909-
910-
### Authorization
911-
912-
[Bearer](../README.md#Bearer)
913-
914-
### HTTP request headers
915-
916-
- **Content-Type**: application/json
917-
- **Accept**: application/json
918-
919-
920-
### HTTP response details
921-
| Status code | Description | Response headers |
922-
|-------------|-------------|------------------|
923-
| **200** | Enterprise cluster registered | - |
924-
| **400** | Validation errors occurred | - |
925-
| **401** | Auth token is invalid | - |
926-
| **403** | User is not authorized to access the service | - |
927-
| **409** | A conflict has been detected in the creation of this resource | - |
928-
| **500** | An unexpected error occurred while registering Enterprise cluster | - |
929-
930-
931854
## updateKafkaById
932855

933856
> KafkaRequest updateKafkaById(id, kafkaUpdateRequest)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Enterprise cluster registration endpoint response
88

99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11-
**clusterId** | **String** | ocm cluster id of the registered Enterprise cluster | [optional]
11+
**clusterId** | **String** | OCM cluster id of the registered Enterprise cluster | [optional]
1212
**status** | **String** | status of registered Enterprise cluster | [optional]
1313
**fleetshardParameters** | [**List&lt;FleetshardParameter&gt;**](FleetshardParameter.md) | | [optional]
1414

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Name | Type | Description | Notes
99
------------ | ------------- | ------------- | -------------
10-
**clusterId** | **String** | ocm cluster id of the registered Enterprise cluster | [optional]
10+
**clusterId** | **String** | OCM cluster id of the registered Enterprise cluster | [optional]
1111
**status** | **String** | status of registered Enterprise cluster | [optional]
1212
**fleetshardParameters** | [**List&lt;FleetshardParameter&gt;**](FleetshardParameter.md) | | [optional]
1313

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# EnterpriseDataplaneClustersApi
2+
3+
All URIs are relative to *https://api.openshift.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**registerEnterpriseOsdCluster**](EnterpriseDataplaneClustersApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
8+
9+
10+
11+
## registerEnterpriseOsdCluster
12+
13+
> EnterpriseCluster registerEnterpriseOsdCluster(enterpriseOsdClusterPayload)
14+
15+
16+
17+
Register enterprise data plane cluster
18+
19+
### Example
20+
21+
```java
22+
// Import classes:
23+
import com.openshift.cloud.api.kas.invoker.ApiClient;
24+
import com.openshift.cloud.api.kas.invoker.ApiException;
25+
import com.openshift.cloud.api.kas.invoker.Configuration;
26+
import com.openshift.cloud.api.kas.invoker.auth.*;
27+
import com.openshift.cloud.api.kas.invoker.models.*;
28+
import com.openshift.cloud.api.kas.EnterpriseDataplaneClustersApi;
29+
30+
public class Example {
31+
public static void main(String[] args) {
32+
ApiClient defaultClient = Configuration.getDefaultApiClient();
33+
defaultClient.setBasePath("https://api.openshift.com");
34+
35+
// Configure HTTP bearer authorization: Bearer
36+
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
37+
Bearer.setBearerToken("BEARER TOKEN");
38+
39+
EnterpriseDataplaneClustersApi apiInstance = new EnterpriseDataplaneClustersApi(defaultClient);
40+
EnterpriseOsdClusterPayload enterpriseOsdClusterPayload = new EnterpriseOsdClusterPayload(); // EnterpriseOsdClusterPayload | Enterprise data plane cluster details
41+
try {
42+
EnterpriseCluster result = apiInstance.registerEnterpriseOsdCluster(enterpriseOsdClusterPayload);
43+
System.out.println(result);
44+
} catch (ApiException e) {
45+
System.err.println("Exception when calling EnterpriseDataplaneClustersApi#registerEnterpriseOsdCluster");
46+
System.err.println("Status code: " + e.getCode());
47+
System.err.println("Reason: " + e.getResponseBody());
48+
System.err.println("Response headers: " + e.getResponseHeaders());
49+
e.printStackTrace();
50+
}
51+
}
52+
}
53+
```
54+
55+
### Parameters
56+
57+
58+
Name | Type | Description | Notes
59+
------------- | ------------- | ------------- | -------------
60+
**enterpriseOsdClusterPayload** | [**EnterpriseOsdClusterPayload**](EnterpriseOsdClusterPayload.md)| Enterprise data plane cluster details |
61+
62+
### Return type
63+
64+
[**EnterpriseCluster**](EnterpriseCluster.md)
65+
66+
### Authorization
67+
68+
[Bearer](../README.md#Bearer)
69+
70+
### HTTP request headers
71+
72+
- **Content-Type**: application/json
73+
- **Accept**: application/json
74+
75+
76+
### HTTP response details
77+
| Status code | Description | Response headers |
78+
|-------------|-------------|------------------|
79+
| **200** | Enterprise cluster registered | - |
80+
| **400** | Validation errors occurred | - |
81+
| **401** | Auth token is invalid | - |
82+
| **403** | User is not authorized to access the service | - |
83+
| **409** | A conflict has been detected in the creation of this resource | - |
84+
| **500** | An unexpected error occurred while registering Enterprise cluster | - |
85+

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Schema for the request body sent to /clusters POST
88

99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
11-
**clusterId** | **String** | OSD cluster ID |
12-
**clusterExternalId** | **String** | external cluster ID. Can be obtained from the response JSON of ocm get /api/clusters_mgmt/v1/clusters/&lt;cluster_id&gt; |
11+
**clusterId** | **String** | The data plane cluster ID. This is the ID of the cluster obtained from OpenShift Cluster Manager (OCM) API |
12+
**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) |
1414
**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. |
1515

0 commit comments

Comments
 (0)