Repository: milvus-io/milvus-sdk-go
Pull request #417 (2023-03-07 11:56:46)

Add Resource Group API
See also #415 

/kind enhancement


sre-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/417#" title="Author self-approved">congqixia</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=milvus-io%2Fmilvus-sdk-go).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/milvus-io/milvus-sdk-go/blob/master/OWNERS)~~ [congqixia]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/417?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) Report
> Merging [#417](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/417?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (49e47d5) into [master](https://codecov.io/gh/milvus-io/milvus-sdk-go/commit/69f7d145b04890a1dd640046c467392c8756f9dd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (69f7d14) will **increase** coverage by `0.29%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/417/graphs/tree.svg?width=650&height=150&src=pr&token=WJK43PV390&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/417?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)

```diff
@@            Coverage Diff             @@
##           master     #417      +/-   ##
==========================================
+ Coverage   87.15%   87.44%   +0.29%     
==========================================
  Files          29       30       +1     
  Lines        2740     2804      +64     
==========================================
+ Hits         2388     2452      +64     
  Misses        267      267              
  Partials       85       85              
```


| [Impacted Files](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/417?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) | Coverage Δ | |
|---|---|---|
| [client/client.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/417?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NsaWVudC5nbw==) | `75.80% <ø> (ø)` | |
| [client/client\_grpc\_rg.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/417?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L2NsaWVudF9ncnBjX3JnLmdv) | `100.00% <100.00%> (ø)` | |


Patch:
diff --git a/Makefile b/Makefile
index 96ff5eb..10a05d8 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ PWD 	:= $(shell pwd)
 GOPATH 	:= $(shell $(GO) env GOPATH)
 PROTOC	:= $(shell which protoc)
 PROTOC_VER := $(shell protoc --version)
+INSTALL_PATH := $(PWD)/bin
 
 all: check-protoc-version 
 
@@ -24,6 +25,12 @@ else
 	@echo "using $(shell which protoc)"
 endif
 
+install-tool:
+	@mkdir -p $(INSTALL_PATH)
+	@$(INSTALL_PATH)/golangci-lint --version 2>&1 1>/dev/null || (echo "Installing golangci-lint into ./bin/" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(INSTALL_PATH) v1.46.2)
+	@$(INSTALL_PATH)/mockery --version 2>&1 1>/dev/null || (echo "Installing mockery v2.16.0 to ./bin/" && GOBIN=$(INSTALL_PATH)/ go install github.com/vektra/mockery/v2@v2.16.0)
+
+
 check-protoc-version: check-protoc
 	@(env bash $(PWD)/scripts/check_protoc_version.sh)
 
@@ -31,13 +38,17 @@ generate-proto: check-protoc-version
 	@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && go get github.com/golang/protobuf/protoc-gen-go@v1.5.2)
 	@(env bash $(PWD)/scripts/proto_gen_go.sh)
 
+generate-mockery: install-tool
+	@echo "generating mockery milvus service server"
+	@$(INSTALL_PATH)/mockery --srcpkg=github.com/milvus-io/milvus-proto/go-api/milvuspb --name=MilvusServiceServer --output=mocks --outpkg=mocks --with-expecter
+
 static-check:
 	@echo "Running $@ check:"
 	@golangci-lint cache clean
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./entity/...
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./client/...
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./internal/...
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./tests/...
+	@$(INSTALL_PATH)/golangci-lint run --timeout=30m --config ./.golangci.yml ./entity/...
+	@$(INSTALL_PATH)/golangci-lint run --timeout=30m --config ./.golangci.yml ./client/...
+	@$(INSTALL_PATH)/golangci-lint run --timeout=30m --config ./.golangci.yml ./internal/...
+	@$(INSTALL_PATH)/golangci-lint run --timeout=30m --config ./.golangci.yml ./test/...
 
 test-go:
 	@echo "Running unit tests:"
diff --git a/client/client.go b/client/client.go
index f9c0ff3..3ba4605 100644
--- a/client/client.go
+++ b/client/client.go
@@ -170,6 +170,19 @@ type Client interface {
 	// GetLoadState get the collection or partitions load state
 	GetLoadState(ctx context.Context, collectionName string, partitionNames []string) (entity.LoadState, error)
 
+	// ListResourceGroups returns list of resource group names in current Milvus instance.
+	ListResourceGroups(ctx context.Context) ([]string, error)
+	// CreateResourceGroup creates a resource group with provided name.
+	CreateResourceGroup(ctx context.Context, rgName string) error
+	// DescribeResourceGroup returns resource groups information.
+	DescribeResourceGroup(ctx context.Context, rgName string) (*entity.ResourceGroup, error)
+	// DropResourceGroup drops the resource group with provided name.
+	DropResourceGroup(ctx context.Context, rgName string) error
+	// TransferNode transfers querynodes between resource groups.
+	TransferNode(ctx context.Context, sourceRg, targetRg string, nodesNum int32) error
+	// TransferReplica transfer collection replicas between source,target resource group.
+	TransferReplica(ctx context.Context, sourceRg, targetRg string, collectionName string, replicaNum int64) error
+
 	// GetVersion get milvus version
 	GetVersion(ctx context.Context) (string, error)
 }
diff --git a/client/client_grpc_rg.go b/client/client_grpc_rg.go
new file mode 100644
index 0000000..cb4d99f
--- /dev/null
+++ b/client/client_grpc_rg.go
@@ -0,0 +1,142 @@
+// Copyright (C) 2019-2021 Zilliz. All rights reserved.
+//
+// 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 client
+
+import (
+	"context"
+
+	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	"github.com/milvus-io/milvus-sdk-go/v2/entity"
+)
+
+// ListResourceGroups returns list of resource group names in current Milvus instance.
+func (c *GrpcClient) ListResourceGroups(ctx context.Context) ([]string, error) {
+	if c.Service == nil {
+		return nil, ErrClientNotReady
+	}
+
+	req := &server.ListResourceGroupsRequest{}
+
+	resp, err := c.Service.ListResourceGroups(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	if err = handleRespStatus(resp.GetStatus()); err != nil {
+		return nil, err
+	}
+
+	return resp.GetResourceGroups(), nil
+}
+
+// CreateResourceGroup creates a resource group with provided name.
+func (c *GrpcClient) CreateResourceGroup(ctx context.Context, rgName string) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.CreateResourceGroupRequest{
+		ResourceGroup: rgName,
+	}
+
+	resp, err := c.Service.CreateResourceGroup(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
+
+// DescribeResourceGroup returns resource groups information.
+func (c *GrpcClient) DescribeResourceGroup(ctx context.Context, rgName string) (*entity.ResourceGroup, error) {
+	if c.Service == nil {
+		return nil, ErrClientNotReady
+	}
+
+	req := &server.DescribeResourceGroupRequest{
+		ResourceGroup: rgName,
+	}
+
+	resp, err := c.Service.DescribeResourceGroup(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	if err = handleRespStatus(resp.GetStatus()); err != nil {
+		return nil, err
+	}
+
+	rg := resp.GetResourceGroup()
+	result := &entity.ResourceGroup{
+		Name:                 rg.GetName(),
+		Capacity:             rg.GetCapacity(),
+		AvailableNodesNumber: rg.GetNumAvailableNode(),
+		LoadedReplica:        rg.GetNumLoadedReplica(),
+		OutgoingNodeNum:      rg.GetNumOutgoingNode(),
+		IncomingNodeNum:      rg.GetNumIncomingNode(),
+	}
+
+	return result, nil
+}
+
+// DropResourceGroup drops the resource group with provided name.
+func (c *GrpcClient) DropResourceGroup(ctx context.Context, rgName string) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.DropResourceGroupRequest{
+		ResourceGroup: rgName,
+	}
+
+	resp, err := c.Service.DropResourceGroup(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
+
+// TransferNode transfers querynodes between resource groups.
+func (c *GrpcClient) TransferNode(ctx context.Context, sourceRg, targetRg string, nodesNum int32) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.TransferNodeRequest{
+		SourceResourceGroup: sourceRg,
+		TargetResourceGroup: targetRg,
+		NumNode:             nodesNum,
+	}
+
+	resp, err := c.Service.TransferNode(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
+
+// TransferReplica transfer collection replicas between source,target resource group.
+func (c *GrpcClient) TransferReplica(ctx context.Context, sourceRg, targetRg string, collectionName string, replicaNum int64) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.TransferReplicaRequest{
+		SourceResourceGroup: sourceRg,
+		TargetResourceGroup: targetRg,
+		CollectionName:      collectionName,
+		NumReplica:          replicaNum,
+	}
+
+	resp, err := c.Service.TransferReplica(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
diff --git a/entity/resource_group.go b/entity/resource_group.go
new file mode 100644
index 0000000..f090f2e
--- /dev/null
+++ b/entity/resource_group.go
@@ -0,0 +1,11 @@
+package entity
+
+//ResourceGroup information model struct.
+type ResourceGroup struct {
+	Name                 string
+	Capacity             int32
+	AvailableNodesNumber int32
+	LoadedReplica        map[string]int32
+	OutgoingNodeNum      map[string]int32
+	IncomingNodeNum      map[string]int32
+}
diff --git a/go.mod b/go.mod
index e85e729..d7a2769 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.17
 require (
 	github.com/golang/protobuf v1.5.2
 	github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
-	github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729
+	github.com/milvus-io/milvus-proto/go-api v0.0.0-20230303054144-16f081962572
 	github.com/stretchr/testify v1.8.1
 	google.golang.org/grpc v1.48.0
 	google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f
diff --git a/go.sum b/go.sum
index bfa06d1..a69270c 100644
--- a/go.sum
+++ b/go.sum
@@ -156,6 +156,8 @@ github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i
 github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
 github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729 h1:hsb1ifdNe3qlXi1YY5dWPPzWMNZmnqe5uunYPYK3gd0=
 github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230303054144-16f081962572 h1:QOimLfT1VwjH9jUkq2SN3uT/WGfgcD4pYBoFOGUMwjM=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230303054144-16f081962572/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
 github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
diff --git a/internal/milvus-proto b/internal/milvus-proto
index 505fbe7..7efc6ee 160000
--- a/internal/milvus-proto
+++ b/internal/milvus-proto
@@ -1,1 +1,1 @@
-Subproject commit 505fbe76bf1cf42c5e306491ae941e56fadea89f
+Subproject commit 7efc6eec15fd536e5955019e96e7b62115b882a3
diff --git a/mocks/MilvusServiceServer.go b/mocks/MilvusServiceServer.go
index f47261e..c2f180b 100644
--- a/mocks/MilvusServiceServer.go
+++ b/mocks/MilvusServiceServer.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.15.0. DO NOT EDIT.
+// Code generated by mockery v2.16.0. DO NOT EDIT.
 
 package mocks
 
@@ -54,8 +54,8 @@ type MilvusServiceServer_AlterAlias_Call struct {
 }
 
 // AlterAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.AlterAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.AlterAliasRequest
 func (_e *MilvusServiceServer_Expecter) AlterAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterAlias_Call {
 	return &MilvusServiceServer_AlterAlias_Call{Call: _e.mock.On("AlterAlias", _a0, _a1)}
 }
@@ -101,8 +101,8 @@ type MilvusServiceServer_AlterCollection_Call struct {
 }
 
 // AlterCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.AlterCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.AlterCollectionRequest
 func (_e *MilvusServiceServer_Expecter) AlterCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterCollection_Call {
 	return &MilvusServiceServer_AlterCollection_Call{Call: _e.mock.On("AlterCollection", _a0, _a1)}
 }
@@ -148,8 +148,8 @@ type MilvusServiceServer_CalcDistance_Call struct {
 }
 
 // CalcDistance is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CalcDistanceRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CalcDistanceRequest
 func (_e *MilvusServiceServer_Expecter) CalcDistance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CalcDistance_Call {
 	return &MilvusServiceServer_CalcDistance_Call{Call: _e.mock.On("CalcDistance", _a0, _a1)}
 }
@@ -195,8 +195,8 @@ type MilvusServiceServer_CheckHealth_Call struct {
 }
 
 // CheckHealth is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CheckHealthRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CheckHealthRequest
 func (_e *MilvusServiceServer_Expecter) CheckHealth(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CheckHealth_Call {
 	return &MilvusServiceServer_CheckHealth_Call{Call: _e.mock.On("CheckHealth", _a0, _a1)}
 }
@@ -242,8 +242,8 @@ type MilvusServiceServer_CreateAlias_Call struct {
 }
 
 // CreateAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateAliasRequest
 func (_e *MilvusServiceServer_Expecter) CreateAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateAlias_Call {
 	return &MilvusServiceServer_CreateAlias_Call{Call: _e.mock.On("CreateAlias", _a0, _a1)}
 }
@@ -289,8 +289,8 @@ type MilvusServiceServer_CreateCollection_Call struct {
 }
 
 // CreateCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateCollectionRequest
 func (_e *MilvusServiceServer_Expecter) CreateCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCollection_Call {
 	return &MilvusServiceServer_CreateCollection_Call{Call: _e.mock.On("CreateCollection", _a0, _a1)}
 }
@@ -336,8 +336,8 @@ type MilvusServiceServer_CreateCredential_Call struct {
 }
 
 // CreateCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateCredentialRequest
 func (_e *MilvusServiceServer_Expecter) CreateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCredential_Call {
 	return &MilvusServiceServer_CreateCredential_Call{Call: _e.mock.On("CreateCredential", _a0, _a1)}
 }
@@ -383,8 +383,8 @@ type MilvusServiceServer_CreateIndex_Call struct {
 }
 
 // CreateIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateIndexRequest
 func (_e *MilvusServiceServer_Expecter) CreateIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateIndex_Call {
 	return &MilvusServiceServer_CreateIndex_Call{Call: _e.mock.On("CreateIndex", _a0, _a1)}
 }
@@ -430,8 +430,8 @@ type MilvusServiceServer_CreatePartition_Call struct {
 }
 
 // CreatePartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreatePartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreatePartitionRequest
 func (_e *MilvusServiceServer_Expecter) CreatePartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreatePartition_Call {
 	return &MilvusServiceServer_CreatePartition_Call{Call: _e.mock.On("CreatePartition", _a0, _a1)}
 }
@@ -448,6 +448,53 @@ func (_c *MilvusServiceServer_CreatePartition_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+// CreateResourceGroup provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) CreateResourceGroup(_a0 context.Context, _a1 *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateResourceGroupRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_CreateResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateResourceGroup'
+type MilvusServiceServer_CreateResourceGroup_Call struct {
+	*mock.Call
+}
+
+// CreateResourceGroup is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateResourceGroupRequest
+func (_e *MilvusServiceServer_Expecter) CreateResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateResourceGroup_Call {
+	return &MilvusServiceServer_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_CreateResourceGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateResourceGroupRequest)) *MilvusServiceServer_CreateResourceGroup_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.CreateResourceGroupRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_CreateResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_CreateResourceGroup_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // CreateRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -477,8 +524,8 @@ type MilvusServiceServer_CreateRole_Call struct {
 }
 
 // CreateRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateRoleRequest
 func (_e *MilvusServiceServer_Expecter) CreateRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateRole_Call {
 	return &MilvusServiceServer_CreateRole_Call{Call: _e.mock.On("CreateRole", _a0, _a1)}
 }
@@ -524,8 +571,8 @@ type MilvusServiceServer_Delete_Call struct {
 }
 
 // Delete is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DeleteRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DeleteRequest
 func (_e *MilvusServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Delete_Call {
 	return &MilvusServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)}
 }
@@ -571,8 +618,8 @@ type MilvusServiceServer_DeleteCredential_Call struct {
 }
 
 // DeleteCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DeleteCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DeleteCredentialRequest
 func (_e *MilvusServiceServer_Expecter) DeleteCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DeleteCredential_Call {
 	return &MilvusServiceServer_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", _a0, _a1)}
 }
@@ -618,8 +665,8 @@ type MilvusServiceServer_DescribeCollection_Call struct {
 }
 
 // DescribeCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeCollectionRequest
 func (_e *MilvusServiceServer_Expecter) DescribeCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeCollection_Call {
 	return &MilvusServiceServer_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", _a0, _a1)}
 }
@@ -665,8 +712,8 @@ type MilvusServiceServer_DescribeIndex_Call struct {
 }
 
 // DescribeIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeIndexRequest
 func (_e *MilvusServiceServer_Expecter) DescribeIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeIndex_Call {
 	return &MilvusServiceServer_DescribeIndex_Call{Call: _e.mock.On("DescribeIndex", _a0, _a1)}
 }
@@ -683,6 +730,53 @@ func (_c *MilvusServiceServer_DescribeIndex_Call) Return(_a0 *milvuspb.DescribeI
 	return _c
 }
 
+// DescribeResourceGroup provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) DescribeResourceGroup(_a0 context.Context, _a1 *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *milvuspb.DescribeResourceGroupResponse
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) *milvuspb.DescribeResourceGroupResponse); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*milvuspb.DescribeResourceGroupResponse)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_DescribeResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeResourceGroup'
+type MilvusServiceServer_DescribeResourceGroup_Call struct {
+	*mock.Call
+}
+
+// DescribeResourceGroup is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeResourceGroupRequest
+func (_e *MilvusServiceServer_Expecter) DescribeResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeResourceGroup_Call {
+	return &MilvusServiceServer_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_DescribeResourceGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeResourceGroupRequest)) *MilvusServiceServer_DescribeResourceGroup_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.DescribeResourceGroupRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_DescribeResourceGroup_Call) Return(_a0 *milvuspb.DescribeResourceGroupResponse, _a1 error) *MilvusServiceServer_DescribeResourceGroup_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // DropAlias provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -712,8 +806,8 @@ type MilvusServiceServer_DropAlias_Call struct {
 }
 
 // DropAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropAliasRequest
 func (_e *MilvusServiceServer_Expecter) DropAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropAlias_Call {
 	return &MilvusServiceServer_DropAlias_Call{Call: _e.mock.On("DropAlias", _a0, _a1)}
 }
@@ -759,8 +853,8 @@ type MilvusServiceServer_DropCollection_Call struct {
 }
 
 // DropCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropCollectionRequest
 func (_e *MilvusServiceServer_Expecter) DropCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropCollection_Call {
 	return &MilvusServiceServer_DropCollection_Call{Call: _e.mock.On("DropCollection", _a0, _a1)}
 }
@@ -806,8 +900,8 @@ type MilvusServiceServer_DropIndex_Call struct {
 }
 
 // DropIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropIndexRequest
 func (_e *MilvusServiceServer_Expecter) DropIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropIndex_Call {
 	return &MilvusServiceServer_DropIndex_Call{Call: _e.mock.On("DropIndex", _a0, _a1)}
 }
@@ -853,8 +947,8 @@ type MilvusServiceServer_DropPartition_Call struct {
 }
 
 // DropPartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropPartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropPartitionRequest
 func (_e *MilvusServiceServer_Expecter) DropPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropPartition_Call {
 	return &MilvusServiceServer_DropPartition_Call{Call: _e.mock.On("DropPartition", _a0, _a1)}
 }
@@ -871,6 +965,53 @@ func (_c *MilvusServiceServer_DropPartition_Call) Return(_a0 *commonpb.Status, _
 	return _c
 }
 
+// DropResourceGroup provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) DropResourceGroup(_a0 context.Context, _a1 *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropResourceGroupRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_DropResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropResourceGroup'
+type MilvusServiceServer_DropResourceGroup_Call struct {
+	*mock.Call
+}
+
+// DropResourceGroup is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropResourceGroupRequest
+func (_e *MilvusServiceServer_Expecter) DropResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropResourceGroup_Call {
+	return &MilvusServiceServer_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_DropResourceGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropResourceGroupRequest)) *MilvusServiceServer_DropResourceGroup_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.DropResourceGroupRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_DropResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_DropResourceGroup_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // DropRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -900,8 +1041,8 @@ type MilvusServiceServer_DropRole_Call struct {
 }
 
 // DropRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropRoleRequest
 func (_e *MilvusServiceServer_Expecter) DropRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropRole_Call {
 	return &MilvusServiceServer_DropRole_Call{Call: _e.mock.On("DropRole", _a0, _a1)}
 }
@@ -947,8 +1088,8 @@ type MilvusServiceServer_Dummy_Call struct {
 }
 
 // Dummy is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DummyRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DummyRequest
 func (_e *MilvusServiceServer_Expecter) Dummy(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Dummy_Call {
 	return &MilvusServiceServer_Dummy_Call{Call: _e.mock.On("Dummy", _a0, _a1)}
 }
@@ -994,8 +1135,8 @@ type MilvusServiceServer_Flush_Call struct {
 }
 
 // Flush is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.FlushRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.FlushRequest
 func (_e *MilvusServiceServer_Expecter) Flush(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Flush_Call {
 	return &MilvusServiceServer_Flush_Call{Call: _e.mock.On("Flush", _a0, _a1)}
 }
@@ -1041,8 +1182,8 @@ type MilvusServiceServer_GetCollectionStatistics_Call struct {
 }
 
 // GetCollectionStatistics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCollectionStatisticsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCollectionStatisticsRequest
 func (_e *MilvusServiceServer_Expecter) GetCollectionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCollectionStatistics_Call {
 	return &MilvusServiceServer_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", _a0, _a1)}
 }
@@ -1088,8 +1229,8 @@ type MilvusServiceServer_GetCompactionState_Call struct {
 }
 
 // GetCompactionState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCompactionStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCompactionStateRequest
 func (_e *MilvusServiceServer_Expecter) GetCompactionState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionState_Call {
 	return &MilvusServiceServer_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", _a0, _a1)}
 }
@@ -1135,8 +1276,8 @@ type MilvusServiceServer_GetCompactionStateWithPlans_Call struct {
 }
 
 // GetCompactionStateWithPlans is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCompactionPlansRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCompactionPlansRequest
 func (_e *MilvusServiceServer_Expecter) GetCompactionStateWithPlans(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionStateWithPlans_Call {
 	return &MilvusServiceServer_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", _a0, _a1)}
 }
@@ -1182,8 +1323,8 @@ type MilvusServiceServer_GetComponentStates_Call struct {
 }
 
 // GetComponentStates is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetComponentStatesRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetComponentStatesRequest
 func (_e *MilvusServiceServer_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetComponentStates_Call {
 	return &MilvusServiceServer_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)}
 }
@@ -1229,8 +1370,8 @@ type MilvusServiceServer_GetFlushState_Call struct {
 }
 
 // GetFlushState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetFlushStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetFlushStateRequest
 func (_e *MilvusServiceServer_Expecter) GetFlushState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetFlushState_Call {
 	return &MilvusServiceServer_GetFlushState_Call{Call: _e.mock.On("GetFlushState", _a0, _a1)}
 }
@@ -1276,8 +1417,8 @@ type MilvusServiceServer_GetImportState_Call struct {
 }
 
 // GetImportState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetImportStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetImportStateRequest
 func (_e *MilvusServiceServer_Expecter) GetImportState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetImportState_Call {
 	return &MilvusServiceServer_GetImportState_Call{Call: _e.mock.On("GetImportState", _a0, _a1)}
 }
@@ -1323,8 +1464,8 @@ type MilvusServiceServer_GetIndexBuildProgress_Call struct {
 }
 
 // GetIndexBuildProgress is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetIndexBuildProgressRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetIndexBuildProgressRequest
 func (_e *MilvusServiceServer_Expecter) GetIndexBuildProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexBuildProgress_Call {
 	return &MilvusServiceServer_GetIndexBuildProgress_Call{Call: _e.mock.On("GetIndexBuildProgress", _a0, _a1)}
 }
@@ -1370,8 +1511,8 @@ type MilvusServiceServer_GetIndexState_Call struct {
 }
 
 // GetIndexState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetIndexStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetIndexStateRequest
 func (_e *MilvusServiceServer_Expecter) GetIndexState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexState_Call {
 	return &MilvusServiceServer_GetIndexState_Call{Call: _e.mock.On("GetIndexState", _a0, _a1)}
 }
@@ -1417,8 +1558,8 @@ type MilvusServiceServer_GetLoadState_Call struct {
 }
 
 // GetLoadState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetLoadStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetLoadStateRequest
 func (_e *MilvusServiceServer_Expecter) GetLoadState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadState_Call {
 	return &MilvusServiceServer_GetLoadState_Call{Call: _e.mock.On("GetLoadState", _a0, _a1)}
 }
@@ -1464,8 +1605,8 @@ type MilvusServiceServer_GetLoadingProgress_Call struct {
 }
 
 // GetLoadingProgress is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetLoadingProgressRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetLoadingProgressRequest
 func (_e *MilvusServiceServer_Expecter) GetLoadingProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadingProgress_Call {
 	return &MilvusServiceServer_GetLoadingProgress_Call{Call: _e.mock.On("GetLoadingProgress", _a0, _a1)}
 }
@@ -1511,8 +1652,8 @@ type MilvusServiceServer_GetMetrics_Call struct {
 }
 
 // GetMetrics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetMetricsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetMetricsRequest
 func (_e *MilvusServiceServer_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetMetrics_Call {
 	return &MilvusServiceServer_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)}
 }
@@ -1558,8 +1699,8 @@ type MilvusServiceServer_GetPartitionStatistics_Call struct {
 }
 
 // GetPartitionStatistics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetPartitionStatisticsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetPartitionStatisticsRequest
 func (_e *MilvusServiceServer_Expecter) GetPartitionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPartitionStatistics_Call {
 	return &MilvusServiceServer_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", _a0, _a1)}
 }
@@ -1605,8 +1746,8 @@ type MilvusServiceServer_GetPersistentSegmentInfo_Call struct {
 }
 
 // GetPersistentSegmentInfo is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetPersistentSegmentInfoRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetPersistentSegmentInfoRequest
 func (_e *MilvusServiceServer_Expecter) GetPersistentSegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPersistentSegmentInfo_Call {
 	return &MilvusServiceServer_GetPersistentSegmentInfo_Call{Call: _e.mock.On("GetPersistentSegmentInfo", _a0, _a1)}
 }
@@ -1652,8 +1793,8 @@ type MilvusServiceServer_GetQuerySegmentInfo_Call struct {
 }
 
 // GetQuerySegmentInfo is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetQuerySegmentInfoRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetQuerySegmentInfoRequest
 func (_e *MilvusServiceServer_Expecter) GetQuerySegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetQuerySegmentInfo_Call {
 	return &MilvusServiceServer_GetQuerySegmentInfo_Call{Call: _e.mock.On("GetQuerySegmentInfo", _a0, _a1)}
 }
@@ -1699,8 +1840,8 @@ type MilvusServiceServer_GetReplicas_Call struct {
 }
 
 // GetReplicas is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetReplicasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetReplicasRequest
 func (_e *MilvusServiceServer_Expecter) GetReplicas(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetReplicas_Call {
 	return &MilvusServiceServer_GetReplicas_Call{Call: _e.mock.On("GetReplicas", _a0, _a1)}
 }
@@ -1746,8 +1887,8 @@ type MilvusServiceServer_GetVersion_Call struct {
 }
 
 // GetVersion is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetVersionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetVersionRequest
 func (_e *MilvusServiceServer_Expecter) GetVersion(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetVersion_Call {
 	return &MilvusServiceServer_GetVersion_Call{Call: _e.mock.On("GetVersion", _a0, _a1)}
 }
@@ -1793,8 +1934,8 @@ type MilvusServiceServer_HasCollection_Call struct {
 }
 
 // HasCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.HasCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.HasCollectionRequest
 func (_e *MilvusServiceServer_Expecter) HasCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasCollection_Call {
 	return &MilvusServiceServer_HasCollection_Call{Call: _e.mock.On("HasCollection", _a0, _a1)}
 }
@@ -1840,8 +1981,8 @@ type MilvusServiceServer_HasPartition_Call struct {
 }
 
 // HasPartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.HasPartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.HasPartitionRequest
 func (_e *MilvusServiceServer_Expecter) HasPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasPartition_Call {
 	return &MilvusServiceServer_HasPartition_Call{Call: _e.mock.On("HasPartition", _a0, _a1)}
 }
@@ -1887,8 +2028,8 @@ type MilvusServiceServer_Import_Call struct {
 }
 
 // Import is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ImportRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ImportRequest
 func (_e *MilvusServiceServer_Expecter) Import(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Import_Call {
 	return &MilvusServiceServer_Import_Call{Call: _e.mock.On("Import", _a0, _a1)}
 }
@@ -1934,8 +2075,8 @@ type MilvusServiceServer_Insert_Call struct {
 }
 
 // Insert is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.InsertRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.InsertRequest
 func (_e *MilvusServiceServer_Expecter) Insert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Insert_Call {
 	return &MilvusServiceServer_Insert_Call{Call: _e.mock.On("Insert", _a0, _a1)}
 }
@@ -1981,8 +2122,8 @@ type MilvusServiceServer_ListCredUsers_Call struct {
 }
 
 // ListCredUsers is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListCredUsersRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListCredUsersRequest
 func (_e *MilvusServiceServer_Expecter) ListCredUsers(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListCredUsers_Call {
 	return &MilvusServiceServer_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", _a0, _a1)}
 }
@@ -2028,8 +2169,8 @@ type MilvusServiceServer_ListImportTasks_Call struct {
 }
 
 // ListImportTasks is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListImportTasksRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListImportTasksRequest
 func (_e *MilvusServiceServer_Expecter) ListImportTasks(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListImportTasks_Call {
 	return &MilvusServiceServer_ListImportTasks_Call{Call: _e.mock.On("ListImportTasks", _a0, _a1)}
 }
@@ -2046,6 +2187,53 @@ func (_c *MilvusServiceServer_ListImportTasks_Call) Return(_a0 *milvuspb.ListImp
 	return _c
 }
 
+// ListResourceGroups provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) ListResourceGroups(_a0 context.Context, _a1 *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *milvuspb.ListResourceGroupsResponse
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest) *milvuspb.ListResourceGroupsResponse); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*milvuspb.ListResourceGroupsResponse)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListResourceGroupsRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_ListResourceGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListResourceGroups'
+type MilvusServiceServer_ListResourceGroups_Call struct {
+	*mock.Call
+}
+
+// ListResourceGroups is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListResourceGroupsRequest
+func (_e *MilvusServiceServer_Expecter) ListResourceGroups(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListResourceGroups_Call {
+	return &MilvusServiceServer_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_ListResourceGroups_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListResourceGroupsRequest)) *MilvusServiceServer_ListResourceGroups_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.ListResourceGroupsRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_ListResourceGroups_Call) Return(_a0 *milvuspb.ListResourceGroupsResponse, _a1 error) *MilvusServiceServer_ListResourceGroups_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // LoadBalance provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) LoadBalance(_a0 context.Context, _a1 *milvuspb.LoadBalanceRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -2075,8 +2263,8 @@ type MilvusServiceServer_LoadBalance_Call struct {
 }
 
 // LoadBalance is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadBalanceRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadBalanceRequest
 func (_e *MilvusServiceServer_Expecter) LoadBalance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadBalance_Call {
 	return &MilvusServiceServer_LoadBalance_Call{Call: _e.mock.On("LoadBalance", _a0, _a1)}
 }
@@ -2122,8 +2310,8 @@ type MilvusServiceServer_LoadCollection_Call struct {
 }
 
 // LoadCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadCollectionRequest
 func (_e *MilvusServiceServer_Expecter) LoadCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadCollection_Call {
 	return &MilvusServiceServer_LoadCollection_Call{Call: _e.mock.On("LoadCollection", _a0, _a1)}
 }
@@ -2169,8 +2357,8 @@ type MilvusServiceServer_LoadPartitions_Call struct {
 }
 
 // LoadPartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadPartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadPartitionsRequest
 func (_e *MilvusServiceServer_Expecter) LoadPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadPartitions_Call {
 	return &MilvusServiceServer_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", _a0, _a1)}
 }
@@ -2216,8 +2404,8 @@ type MilvusServiceServer_ManualCompaction_Call struct {
 }
 
 // ManualCompaction is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ManualCompactionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ManualCompactionRequest
 func (_e *MilvusServiceServer_Expecter) ManualCompaction(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ManualCompaction_Call {
 	return &MilvusServiceServer_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", _a0, _a1)}
 }
@@ -2263,8 +2451,8 @@ type MilvusServiceServer_OperatePrivilege_Call struct {
 }
 
 // OperatePrivilege is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.OperatePrivilegeRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.OperatePrivilegeRequest
 func (_e *MilvusServiceServer_Expecter) OperatePrivilege(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperatePrivilege_Call {
 	return &MilvusServiceServer_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", _a0, _a1)}
 }
@@ -2310,8 +2498,8 @@ type MilvusServiceServer_OperateUserRole_Call struct {
 }
 
 // OperateUserRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.OperateUserRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.OperateUserRoleRequest
 func (_e *MilvusServiceServer_Expecter) OperateUserRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperateUserRole_Call {
 	return &MilvusServiceServer_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", _a0, _a1)}
 }
@@ -2357,8 +2545,8 @@ type MilvusServiceServer_Query_Call struct {
 }
 
 // Query is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.QueryRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.QueryRequest
 func (_e *MilvusServiceServer_Expecter) Query(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Query_Call {
 	return &MilvusServiceServer_Query_Call{Call: _e.mock.On("Query", _a0, _a1)}
 }
@@ -2404,8 +2592,8 @@ type MilvusServiceServer_RegisterLink_Call struct {
 }
 
 // RegisterLink is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.RegisterLinkRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.RegisterLinkRequest
 func (_e *MilvusServiceServer_Expecter) RegisterLink(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RegisterLink_Call {
 	return &MilvusServiceServer_RegisterLink_Call{Call: _e.mock.On("RegisterLink", _a0, _a1)}
 }
@@ -2451,8 +2639,8 @@ type MilvusServiceServer_ReleaseCollection_Call struct {
 }
 
 // ReleaseCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ReleaseCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ReleaseCollectionRequest
 func (_e *MilvusServiceServer_Expecter) ReleaseCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleaseCollection_Call {
 	return &MilvusServiceServer_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", _a0, _a1)}
 }
@@ -2498,8 +2686,8 @@ type MilvusServiceServer_ReleasePartitions_Call struct {
 }
 
 // ReleasePartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ReleasePartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ReleasePartitionsRequest
 func (_e *MilvusServiceServer_Expecter) ReleasePartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleasePartitions_Call {
 	return &MilvusServiceServer_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", _a0, _a1)}
 }
@@ -2516,6 +2704,53 @@ func (_c *MilvusServiceServer_ReleasePartitions_Call) Return(_a0 *commonpb.Statu
 	return _c
 }
 
+// RenameCollection provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RenameCollectionRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.RenameCollectionRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_RenameCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenameCollection'
+type MilvusServiceServer_RenameCollection_Call struct {
+	*mock.Call
+}
+
+// RenameCollection is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.RenameCollectionRequest
+func (_e *MilvusServiceServer_Expecter) RenameCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RenameCollection_Call {
+	return &MilvusServiceServer_RenameCollection_Call{Call: _e.mock.On("RenameCollection", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_RenameCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest)) *MilvusServiceServer_RenameCollection_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.RenameCollectionRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_RenameCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_RenameCollection_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // Search provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Search(_a0 context.Context, _a1 *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) {
 	ret := _m.Called(_a0, _a1)
@@ -2545,8 +2780,8 @@ type MilvusServiceServer_Search_Call struct {
 }
 
 // Search is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SearchRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SearchRequest
 func (_e *MilvusServiceServer_Expecter) Search(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Search_Call {
 	return &MilvusServiceServer_Search_Call{Call: _e.mock.On("Search", _a0, _a1)}
 }
@@ -2592,8 +2827,8 @@ type MilvusServiceServer_SelectGrant_Call struct {
 }
 
 // SelectGrant is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectGrantRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectGrantRequest
 func (_e *MilvusServiceServer_Expecter) SelectGrant(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectGrant_Call {
 	return &MilvusServiceServer_SelectGrant_Call{Call: _e.mock.On("SelectGrant", _a0, _a1)}
 }
@@ -2639,8 +2874,8 @@ type MilvusServiceServer_SelectRole_Call struct {
 }
 
 // SelectRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectRoleRequest
 func (_e *MilvusServiceServer_Expecter) SelectRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectRole_Call {
 	return &MilvusServiceServer_SelectRole_Call{Call: _e.mock.On("SelectRole", _a0, _a1)}
 }
@@ -2686,8 +2921,8 @@ type MilvusServiceServer_SelectUser_Call struct {
 }
 
 // SelectUser is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectUserRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectUserRequest
 func (_e *MilvusServiceServer_Expecter) SelectUser(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectUser_Call {
 	return &MilvusServiceServer_SelectUser_Call{Call: _e.mock.On("SelectUser", _a0, _a1)}
 }
@@ -2733,8 +2968,8 @@ type MilvusServiceServer_ShowCollections_Call struct {
 }
 
 // ShowCollections is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ShowCollectionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ShowCollectionsRequest
 func (_e *MilvusServiceServer_Expecter) ShowCollections(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowCollections_Call {
 	return &MilvusServiceServer_ShowCollections_Call{Call: _e.mock.On("ShowCollections", _a0, _a1)}
 }
@@ -2780,8 +3015,8 @@ type MilvusServiceServer_ShowPartitions_Call struct {
 }
 
 // ShowPartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ShowPartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ShowPartitionsRequest
 func (_e *MilvusServiceServer_Expecter) ShowPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowPartitions_Call {
 	return &MilvusServiceServer_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", _a0, _a1)}
 }
@@ -2798,6 +3033,100 @@ func (_c *MilvusServiceServer_ShowPartitions_Call) Return(_a0 *milvuspb.ShowPart
 	return _c
 }
 
+// TransferNode provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) TransferNode(_a0 context.Context, _a1 *milvuspb.TransferNodeRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferNodeRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_TransferNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferNode'
+type MilvusServiceServer_TransferNode_Call struct {
+	*mock.Call
+}
+
+// TransferNode is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.TransferNodeRequest
+func (_e *MilvusServiceServer_Expecter) TransferNode(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferNode_Call {
+	return &MilvusServiceServer_TransferNode_Call{Call: _e.mock.On("TransferNode", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_TransferNode_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.TransferNodeRequest)) *MilvusServiceServer_TransferNode_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.TransferNodeRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_TransferNode_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_TransferNode_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
+// TransferReplica provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) TransferReplica(_a0 context.Context, _a1 *milvuspb.TransferReplicaRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferReplicaRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferReplicaRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_TransferReplica_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferReplica'
+type MilvusServiceServer_TransferReplica_Call struct {
+	*mock.Call
+}
+
+// TransferReplica is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.TransferReplicaRequest
+func (_e *MilvusServiceServer_Expecter) TransferReplica(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferReplica_Call {
+	return &MilvusServiceServer_TransferReplica_Call{Call: _e.mock.On("TransferReplica", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_TransferReplica_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.TransferReplicaRequest)) *MilvusServiceServer_TransferReplica_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.TransferReplicaRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_TransferReplica_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_TransferReplica_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // UpdateCredential provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -2827,8 +3156,8 @@ type MilvusServiceServer_UpdateCredential_Call struct {
 }
 
 // UpdateCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.UpdateCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.UpdateCredentialRequest
 func (_e *MilvusServiceServer_Expecter) UpdateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_UpdateCredential_Call {
 	return &MilvusServiceServer_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", _a0, _a1)}
 }
@@ -2874,8 +3203,8 @@ type MilvusServiceServer_Upsert_Call struct {
 }
 
 // Upsert is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.UpsertRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.UpsertRequest
 func (_e *MilvusServiceServer_Expecter) Upsert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Upsert_Call {
 	return &MilvusServiceServer_Upsert_Call{Call: _e.mock.On("Upsert", _a0, _a1)}
 }


Test patch:
diff --git a/client/client_grpc_rg_test.go b/client/client_grpc_rg_test.go
new file mode 100644
index 0000000..bf2ac01
--- /dev/null
+++ b/client/client_grpc_rg_test.go
@@ -0,0 +1,423 @@
+// Copyright (C) 2019-2021 Zilliz. All rights reserved.
+//
+// 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 client
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	"math/rand"
+	"testing"
+
+	"github.com/stretchr/testify/mock"
+	"github.com/stretchr/testify/suite"
+
+	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+)
+
+type ResourceGroupSuite struct {
+	MockSuiteBase
+}
+
+func (s *ResourceGroupSuite) TestListResourceGroups() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().ListResourceGroups(mock.Anything, mock.AnythingOfType("*milvuspb.ListResourceGroupsRequest")).
+			Return(&server.ListResourceGroupsResponse{Status: &common.Status{}, ResourceGroups: rgs}, nil)
+
+		result, err := c.ListResourceGroups(ctx)
+		s.NoError(err)
+		s.ElementsMatch(rgs, result)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().ListResourceGroups(mock.Anything, mock.AnythingOfType("*milvuspb.ListResourceGroupsRequest")).
+			Return(nil, errors.New("mocked grpc error"))
+
+		_, err := c.ListResourceGroups(ctx)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().ListResourceGroups(mock.Anything, mock.AnythingOfType("*milvuspb.ListResourceGroupsRequest")).
+			Return(&server.ListResourceGroupsResponse{Status: &common.Status{ErrorCode: common.ErrorCode_UnexpectedError}}, nil)
+
+		_, err := c.ListResourceGroups(ctx)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestCreateResourceGroup() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		rgName := randStr(10)
+
+		s.mock.EXPECT().CreateResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.CreateResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.CreateResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.CreateResourceGroup(ctx, rgName)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().CreateResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.CreateResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.CreateResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.CreateResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().CreateResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.CreateResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.CreateResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.CreateResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestDescribeResourceGroup() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		rgName := randStr(10)
+		capacity := rand.Int31n(5) + 1
+		available := rand.Int31n(capacity)
+
+		loadedReplica := make(map[string]int32)
+		l := rand.Intn(3) + 1
+		for i := 0; i < l; i++ {
+			loadedReplica[fmt.Sprintf("coll_%s", randStr(6))] = rand.Int31n(5) + 1
+		}
+		incomingNum := make(map[string]int32)
+		l = rand.Intn(3) + 1
+		for i := 0; i < l; i++ {
+			incomingNum[fmt.Sprintf("coll_%s", randStr(6))] = rand.Int31n(5) + 1
+		}
+		outgoingNum := make(map[string]int32)
+		l = rand.Intn(3) + 1
+		for i := 0; i < l; i++ {
+			outgoingNum[fmt.Sprintf("coll_%s", randStr(6))] = rand.Int31n(5) + 1
+		}
+
+		type testColl struct {
+			Name      string
+			Capacity  int32
+			Available int32
+		}
+		s.mock.EXPECT().DescribeResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DescribeResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Call.Return(func(_ context.Context, req *server.DescribeResourceGroupRequest) *server.DescribeResourceGroupResponse {
+
+			return &server.DescribeResourceGroupResponse{
+				Status: &common.Status{},
+				ResourceGroup: &server.ResourceGroup{
+					Name:             rgName,
+					Capacity:         capacity,
+					NumAvailableNode: available,
+					NumLoadedReplica: loadedReplica,
+					NumOutgoingNode:  outgoingNum,
+					NumIncomingNode:  incomingNum,
+				},
+			}
+		}, nil)
+
+		result, err := c.DescribeResourceGroup(ctx, rgName)
+		s.NoError(err)
+		s.Equal(rgName, result.Name)
+		s.Equal(capacity, result.Capacity)
+		s.Equal(available, result.AvailableNodesNumber)
+		s.InDeltaMapValues(loadedReplica, result.LoadedReplica, 0)
+		s.InDeltaMapValues(incomingNum, result.IncomingNodeNum, 0)
+		s.InDeltaMapValues(outgoingNum, result.OutgoingNodeNum, 0)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().DescribeResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DescribeResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		_, err := c.DescribeResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().DescribeResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DescribeResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&server.DescribeResourceGroupResponse{Status: &common.Status{ErrorCode: common.ErrorCode_UnexpectedError}}, nil)
+
+		_, err := c.DescribeResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestDropResourceGroup() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		rgName := randStr(10)
+
+		s.mock.EXPECT().DropResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DropResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DropResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.DropResourceGroup(ctx, rgName)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().DropResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DropResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DropResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.DropResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().DropResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DropResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DropResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.DropResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestTransferNodes() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		nodeNum := rand.Int31n(5) + 1
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().TransferNode(mock.Anything, mock.AnythingOfType("*milvuspb.TransferNodeRequest")).
+			Run(func(_ context.Context, req *server.TransferNodeRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(nodeNum, req.GetNumNode())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.TransferNode(ctx, sourceRg, targetRg, nodeNum)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		nodeNum := rand.Int31n(5) + 1
+
+		s.mock.EXPECT().TransferNode(mock.Anything, mock.AnythingOfType("*milvuspb.TransferNodeRequest")).
+			Run(func(_ context.Context, req *server.TransferNodeRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(nodeNum, req.GetNumNode())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.TransferNode(ctx, sourceRg, targetRg, nodeNum)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		nodeNum := rand.Int31n(5) + 1
+
+		s.mock.EXPECT().TransferNode(mock.Anything, mock.AnythingOfType("*milvuspb.TransferNodeRequest")).
+			Run(func(_ context.Context, req *server.TransferNodeRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(nodeNum, req.GetNumNode())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.TransferNode(ctx, sourceRg, targetRg, nodeNum)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestTransferReplica() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		collName := fmt.Sprintf("coll_%s", randStr(6))
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		replicaNum := rand.Int63n(5) + 1
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().TransferReplica(mock.Anything, mock.AnythingOfType("*milvuspb.TransferReplicaRequest")).
+			Run(func(_ context.Context, req *server.TransferReplicaRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(replicaNum, req.GetNumReplica())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.TransferReplica(ctx, sourceRg, targetRg, collName, replicaNum)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		collName := fmt.Sprintf("coll_%s", randStr(6))
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		replicaNum := rand.Int63n(5) + 1
+
+		s.mock.EXPECT().TransferReplica(mock.Anything, mock.AnythingOfType("*milvuspb.TransferReplicaRequest")).
+			Run(func(_ context.Context, req *server.TransferReplicaRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(replicaNum, req.GetNumReplica())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.TransferReplica(ctx, sourceRg, targetRg, collName, replicaNum)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		collName := fmt.Sprintf("coll_%s", randStr(6))
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		replicaNum := rand.Int63n(5) + 1
+
+		s.mock.EXPECT().TransferReplica(mock.Anything, mock.AnythingOfType("*milvuspb.TransferReplicaRequest")).
+			Run(func(_ context.Context, req *server.TransferReplicaRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(replicaNum, req.GetNumReplica())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.TransferReplica(ctx, sourceRg, targetRg, collName, replicaNum)
+		s.Error(err)
+	})
+}
+
+func TestResourceGroupSuite(t *testing.T) {
+	suite.Run(t, new(ResourceGroupSuite))
+}
diff --git a/client/client_mock_test.go b/client/client_mock_test.go
index e9e3a01..c0058e4 100644
--- a/client/client_mock_test.go
+++ b/client/client_mock_test.go
@@ -672,6 +672,34 @@ func (m *MockServer) SelectGrant(_ context.Context, _ *server.SelectGrantRequest
 	panic("not implemented") // TODO: Implement
 }
 
+func (m *MockServer) CreateResourceGroup(_ context.Context, _ *server.CreateResourceGroupRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) DropResourceGroup(_ context.Context, _ *server.DropResourceGroupRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) TransferNode(_ context.Context, _ *server.TransferNodeRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) TransferReplica(_ context.Context, _ *server.TransferReplicaRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) ListResourceGroups(_ context.Context, _ *server.ListResourceGroupsRequest) (*server.ListResourceGroupsResponse, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) DescribeResourceGroup(_ context.Context, _ *server.DescribeResourceGroupRequest) (*server.DescribeResourceGroupResponse, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) RenameCollection(_ context.Context, _ *server.RenameCollectionRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
 //func (m *MockServer) DescribePartition(ctx context.Context, req *server.DescribePartitionRequest) (*server.DescribePartitionResponse, error) {
 //	panic("not implemented") // TODO: Implement
 //}
diff --git a/client/client_test.go b/client/client_test.go
index 6778e18..42c547d 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -395,3 +395,16 @@ func TestClient_parseURI(t *testing.T) {
 		assert.Nil(t, err)
 	})
 }
+
+var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
+
+func randStr(n int) string {
+	sb := strings.Builder{}
+	sb.Grow(n)
+
+	for i := 0; i < n; i++ {
+		sb.WriteRune(letters[rand.Intn(len(letters))])
+	}
+
+	return sb.String()
+}