This is an automated email from the ASF dual-hosted git repository.
zirui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 64f84becd8 [INLONG-9318][Manager] ManagerClient supports pulling
clusters based on tenant roles (#9319)
64f84becd8 is described below
commit 64f84becd8ed04d754d6b26ee25708ec03b2dd45
Author: fuweng11 <[email protected]>
AuthorDate: Wed Nov 22 17:40:04 2023 +0800
[INLONG-9318][Manager] ManagerClient supports pulling clusters based on
tenant roles (#9319)
---
.../client/api/inner/client/InlongClusterClient.java | 13 +++++++++++++
.../inlong/manager/client/api/service/InlongClusterApi.java | 3 +++
2 files changed, 16 insertions(+)
diff --git
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongClusterClient.java
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongClusterClient.java
index ccae50d6cc..a4558b43ad 100644
---
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongClusterClient.java
+++
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongClusterClient.java
@@ -154,6 +154,19 @@ public class InlongClusterClient {
return response.getData();
}
+ /**
+ * Paging query clusters according to tenant role.
+ *
+ * @param request query conditions
+ * @return cluster list
+ */
+ public PageResult<ClusterInfo> listByTenantRole(ClusterPageRequest
request) {
+ Response<PageResult<ClusterInfo>> response =
+
ClientUtils.executeHttpCall(inlongClusterApi.listByTenantRole(request));
+ ClientUtils.assertRespSuccess(response);
+ return response.getData();
+ }
+
/**
* Update cluster information.
*
diff --git
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongClusterApi.java
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongClusterApi.java
index a83a6a0f2a..5be602cc3b 100644
---
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongClusterApi.java
+++
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongClusterApi.java
@@ -66,6 +66,9 @@ public interface InlongClusterApi {
@POST("cluster/list")
Call<Response<PageResult<ClusterInfo>>> list(@Body ClusterPageRequest
request);
+ @POST("cluster/listByTenantRole")
+ Call<Response<PageResult<ClusterInfo>>> listByTenantRole(@Body
ClusterPageRequest request);
+
@POST("cluster/update")
Call<Response<Boolean>> update(@Body ClusterRequest request);