From 8914f51911b09439164a22c3d9c377109f4ee185 Mon Sep 17 00:00:00 2001 From: zhouqj Date: Tue, 10 May 2022 18:10:28 +0800 Subject: [PATCH] migrate code from github --- .../server/pod => pod/server}/ali/client.go | 6 + .../server}/ali/create_container_group.go | 40 +- .../server}/ali/delete_container_group.go | 93 ++--- .../server}/ali/describe_container_groups.go | 79 +--- .../server}/ali/update_container_group.go | 81 ++-- .../server/pod => pod/server}/pod.go | 62 ++- .../service/poder => pod/service}/ali_eci.go | 0 .../poder => pod/service}/huawei_cci.go | 0 .../service/poder => pod/service}/k8s.go | 0 .../service/poder => pod/service}/poder.go | 1 - .../poder => pod/service}/tencent_eks.go | 0 adaptor/pod_adaptor/server/pod/main_test.go | 33 -- adaptor/pod_adaptor/server/pod/pod_test.go | 83 ---- .../pod_adaptor/service/poder/main_test.go | 33 -- .../pod_adaptor/service/poder/poder_test.go | 70 ---- adaptor/{vm_adaptor => vm}/server/ecs/list.go | 2 +- .../server/ecs/list_test.go | 0 .../server/ecs/main_test.go | 0 .../{vm_adaptor => vm}/service/ecser/ali.go | 0 .../{vm_adaptor => vm}/service/ecser/aws.go | 0 .../{vm_adaptor => vm}/service/ecser/ecser.go | 0 .../service/ecser/ecser_test.go | 0 .../service/ecser/google.go | 0 .../service/ecser/harvester.go | 0 .../service/ecser/harvester_util.go | 0 .../service/ecser/huawei.go | 0 .../service/ecser/main_test.go | 0 .../service/ecser/tencent.go | 0 buf.gen.yaml | 16 +- common/server/server_ecs.go | 2 +- common/server/server_pod.go | 18 +- common/tenanter/region.go | 7 +- common/tenanter/tenanter.go | 18 + examples/ali.go | 56 +++ examples/pcm.go | 53 +++ gen.sh | 0 go.mod | 3 +- idl/demo/demo.proto | 2 +- idl/pbecs/ecs.proto | 20 +- idl/pbpod/pod.proto | 10 +- idl/pbtenant/tenant.proto | 42 +- lan_trans/idl/pbpod/pod.pb.go | 362 ++++++++++-------- .../openapiv2/idl/pbpod/pod.swagger.json | 20 + swagger.sh | 0 unittest.sh | 0 45 files changed, 589 insertions(+), 623 deletions(-) rename adaptor/{pod_adaptor/server/pod => pod/server}/ali/client.go (97%) rename adaptor/{pod_adaptor/server/pod => pod/server}/ali/create_container_group.go (94%) rename adaptor/{pod_adaptor/server/pod => pod/server}/ali/delete_container_group.go (62%) rename adaptor/{pod_adaptor/server/pod => pod/server}/ali/describe_container_groups.go (85%) rename adaptor/{pod_adaptor/server/pod => pod/server}/ali/update_container_group.go (86%) rename adaptor/{pod_adaptor/server/pod => pod/server}/pod.go (79%) rename adaptor/{pod_adaptor/service/poder => pod/service}/ali_eci.go (100%) rename adaptor/{pod_adaptor/service/poder => pod/service}/huawei_cci.go (100%) rename adaptor/{pod_adaptor/service/poder => pod/service}/k8s.go (100%) rename adaptor/{pod_adaptor/service/poder => pod/service}/poder.go (99%) rename adaptor/{pod_adaptor/service/poder => pod/service}/tencent_eks.go (100%) delete mode 100644 adaptor/pod_adaptor/server/pod/main_test.go delete mode 100644 adaptor/pod_adaptor/server/pod/pod_test.go delete mode 100644 adaptor/pod_adaptor/service/poder/main_test.go delete mode 100644 adaptor/pod_adaptor/service/poder/poder_test.go rename adaptor/{vm_adaptor => vm}/server/ecs/list.go (99%) rename adaptor/{vm_adaptor => vm}/server/ecs/list_test.go (100%) rename adaptor/{vm_adaptor => vm}/server/ecs/main_test.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/ali.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/aws.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/ecser.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/ecser_test.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/google.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/harvester.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/harvester_util.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/huawei.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/main_test.go (100%) rename adaptor/{vm_adaptor => vm}/service/ecser/tencent.go (100%) create mode 100644 examples/ali.go create mode 100644 examples/pcm.go mode change 100755 => 100644 gen.sh mode change 100755 => 100644 swagger.sh mode change 100755 => 100644 unittest.sh diff --git a/adaptor/pod_adaptor/server/pod/ali/client.go b/adaptor/pod/server/ali/client.go similarity index 97% rename from adaptor/pod_adaptor/server/pod/ali/client.go rename to adaptor/pod/server/ali/client.go index 2c1328d2..6b5b9658 100644 --- a/adaptor/pod_adaptor/server/pod/ali/client.go +++ b/adaptor/pod/server/ali/client.go @@ -26,6 +26,12 @@ type Client struct { sdk.Client } +//type AliEci struct { +// cli *alieci.Client +// region tenanter.Region +// tenanter tenanter.Tenanter +//} + // NewClient creates a sdk client with environment variables func NewClient() (client *Client, err error) { client = &Client{} diff --git a/adaptor/pod_adaptor/server/pod/ali/create_container_group.go b/adaptor/pod/server/ali/create_container_group.go similarity index 94% rename from adaptor/pod_adaptor/server/pod/ali/create_container_group.go rename to adaptor/pod/server/ali/create_container_group.go index dfff848e..2dd8e90d 100644 --- a/adaptor/pod_adaptor/server/pod/ali/create_container_group.go +++ b/adaptor/pod/server/ali/create_container_group.go @@ -1,12 +1,15 @@ package ali import ( - "github.com/JCCE-nudt/PCM/adaptor/pod_adaptor/server/pod" + "errors" + "flag" + "github.com/JCCE-nudt/PCM/adaptor/pod/server" "github.com/JCCE-nudt/PCM/common/tenanter" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" + "github.com/golang/glog" ) // CreateContainerGroup invokes the eci.CreateContainerGroup API synchronously @@ -14,8 +17,31 @@ import ( func CreateContainerGroup(request *CreateContainerGroupRequest) (response *CreateContainerGroupResponse, err error) { provider := pbtenant.CloudProvider(request.ProviderId) + var configFile string + flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") tenanters, err := tenanter.GetTenanters(provider) - regionId, err := tenanter.GetAliRegionId(request.RegionId) + var regionId int32 + switch request.ProviderId { + case 0: + regionId, _ = tenanter.GetAliRegionId(request.RegionId) + case 1: + regionId, _ = tenanter.GetTencentRegionId(request.RegionId) + case 2: + regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) + case 3: + regionId, _ = tenanter.GetK8SRegionId(request.RegionId) + } container := *request.Container containerImage := container[0].Image containerName := container[0].Name @@ -23,6 +49,7 @@ func CreateContainerGroup(request *CreateContainerGroupRequest) (response *Creat memoryPod := container[0].Memory requestPCM := &pbpod.CreatePodReq{ + RequestSource: "ali", Provider: provider, AccountName: tenanters[0].AccountName(), PodName: request.ContainerGroupName, @@ -37,7 +64,7 @@ func CreateContainerGroup(request *CreateContainerGroupRequest) (response *Creat Namespace: "pcm", } - resp, err := pod.CreatePod(nil, requestPCM) + resp, err := server.CreatePod(nil, requestPCM) response = &CreateContainerGroupResponse{ BaseResponse: nil, @@ -52,9 +79,10 @@ func CreateContainerGroup(request *CreateContainerGroupRequest) (response *Creat type CreateContainerGroupRequest struct { *requests.RpcRequest /*********PCM param************/ - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` + RequestSource string `position:"Query" name:"RequestSource"` + ProviderId int32 `position:"Query" name:"ProviderId"` + AccountName string `position:"Query" name:"AccountName"` + Namespace string `position:"Query" name:"Namespace"` /*********PCM param************/ OwnerId requests.Integer `position:"Query" name:"OwnerId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` diff --git a/adaptor/pod_adaptor/server/pod/ali/delete_container_group.go b/adaptor/pod/server/ali/delete_container_group.go similarity index 62% rename from adaptor/pod_adaptor/server/pod/ali/delete_container_group.go rename to adaptor/pod/server/ali/delete_container_group.go index a3b1a009..9abd3017 100644 --- a/adaptor/pod_adaptor/server/pod/ali/delete_container_group.go +++ b/adaptor/pod/server/ali/delete_container_group.go @@ -16,33 +16,60 @@ package ali import ( - "github.com/JCCE-nudt/PCM/adaptor/pod_adaptor/server/pod" + "errors" + "flag" + "github.com/JCCE-nudt/PCM/adaptor/pod/server" "github.com/JCCE-nudt/PCM/common/tenanter" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" + "github.com/golang/glog" ) // DeleteContainerGroup invokes the eci.DeleteContainerGroup API synchronously // api document: https://help.aliyun.com/api/eci/deletecontainergroup.html -func (client *Client) DeleteContainerGroup(request *DeleteContainerGroupRequest) (response *DeleteContainerGroupResponse, err error) { +func DeleteContainerGroup(request *DeleteContainerGroupRequest) (response *DeleteContainerGroupResponse, err error) { provider := pbtenant.CloudProvider(request.ProviderId) - regionId, err := tenanter.GetAliRegionId(request.RegionId) + var configFile string + flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") + var regionId int32 + switch request.ProviderId { + case 0: + regionId, _ = tenanter.GetAliRegionId(request.RegionId) + case 1: + regionId, _ = tenanter.GetTencentRegionId(request.RegionId) + case 2: + regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) + case 3: + regionId, _ = tenanter.GetK8SRegionId(request.RegionId) + } podId := request.ContainerGroupId podName := request.ContainerGroupName requestPCM := &pbpod.DeletePodReq{ - Provider: provider, - AccountName: request.AccountName, - PodId: podId, - PodName: podName, - Namespace: request.Namespace, - RegionId: regionId, + RequestSource: "ali", + Provider: provider, + AccountName: request.AccountName, + PodId: podId, + PodName: podName, + Namespace: request.Namespace, + RegionId: regionId, } - resp, err := pod.DeletePod(nil, requestPCM) + resp, err := server.DeletePod(nil, requestPCM) response = &DeleteContainerGroupResponse{ BaseResponse: nil, @@ -53,55 +80,11 @@ func (client *Client) DeleteContainerGroup(request *DeleteContainerGroupRequest) } -// DeleteContainerGroupWithChan invokes the eci.DeleteContainerGroup API asynchronously -// api document: https://help.aliyun.com/api/eci/deletecontainergroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DeleteContainerGroupWithChan(request *DeleteContainerGroupRequest) (<-chan *DeleteContainerGroupResponse, <-chan error) { - responseChan := make(chan *DeleteContainerGroupResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DeleteContainerGroup(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// DeleteContainerGroupWithCallback invokes the eci.DeleteContainerGroup API asynchronously -// api document: https://help.aliyun.com/api/eci/deletecontainergroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DeleteContainerGroupWithCallback(request *DeleteContainerGroupRequest, callback func(response *DeleteContainerGroupResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DeleteContainerGroupResponse - var err error - defer close(result) - response, err = client.DeleteContainerGroup(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - // DeleteContainerGroupRequest is the request struct for api DeleteContainerGroup type DeleteContainerGroupRequest struct { *requests.RpcRequest /*********PCM param************/ + RequestSource string `position:"Query" name:"RequestSource"` ProviderId int32 `position:"Query" name:"ProviderId"` AccountName string `position:"Query" name:"AccountName"` Namespace string `position:"Query" name:"Namespace"` diff --git a/adaptor/pod_adaptor/server/pod/ali/describe_container_groups.go b/adaptor/pod/server/ali/describe_container_groups.go similarity index 85% rename from adaptor/pod_adaptor/server/pod/ali/describe_container_groups.go rename to adaptor/pod/server/ali/describe_container_groups.go index c8e448cd..36209d87 100644 --- a/adaptor/pod_adaptor/server/pod/ali/describe_container_groups.go +++ b/adaptor/pod/server/ali/describe_container_groups.go @@ -1,22 +1,7 @@ -//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. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - package ali import ( - "github.com/JCCE-nudt/PCM/adaptor/pod_adaptor/server/pod" + "github.com/JCCE-nudt/PCM/adaptor/pod/server" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" @@ -25,16 +10,18 @@ import ( // DescribeContainerGroups invokes the eci.DescribeContainerGroups API synchronously // api document: https://help.aliyun.com/api/eci/describecontainergroups.html -func (client *Client) DescribeContainerGroups(request *DescribeContainerGroupsRequest) (response *DescribeContainerGroupsResponse, err error) { +func DescribeContainerGroups(request *DescribeContainerGroupsRequest) (response *DescribeContainerGroupsResponse, err error) { provider := pbtenant.CloudProvider(request.ProviderId) containerGroups := make([]DescribeContainerGroupsContainerGroup0, 0) + //trans Ali request to PCM request requestPCM := &pbpod.ListPodReq{ - Provider: provider, - Namespace: "pcm", + RequestSource: "ali", + Provider: provider, + Namespace: "pcm", } - resp, err := pod.ListPod(nil, requestPCM) + resp, err := server.ListPod(nil, requestPCM) //trans PCM response pod set to Ali ContainerGroup set for k := range resp.Pods { @@ -60,58 +47,14 @@ func (client *Client) DescribeContainerGroups(request *DescribeContainerGroupsRe return response, nil } -// DescribeContainerGroupsWithChan invokes the eci.DescribeContainerGroups API asynchronously -// api document: https://help.aliyun.com/api/eci/describecontainergroups.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DescribeContainerGroupsWithChan(request *DescribeContainerGroupsRequest) (<-chan *DescribeContainerGroupsResponse, <-chan error) { - responseChan := make(chan *DescribeContainerGroupsResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DescribeContainerGroups(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// DescribeContainerGroupsWithCallback invokes the eci.DescribeContainerGroups API asynchronously -// api document: https://help.aliyun.com/api/eci/describecontainergroups.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DescribeContainerGroupsWithCallback(request *DescribeContainerGroupsRequest, callback func(response *DescribeContainerGroupsResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DescribeContainerGroupsResponse - var err error - defer close(result) - response, err = client.DescribeContainerGroups(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - // DescribeContainerGroupsRequest is the request struct for api DescribeContainerGroups type DescribeContainerGroupsRequest struct { *requests.RpcRequest /*********PCM param************/ - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` + RequestSource string `position:"Query" name:"RequestSource"` + ProviderId int32 `position:"Query" name:"ProviderId"` + AccountName string `position:"Query" name:"AccountName"` + Namespace string `position:"Query" name:"Namespace"` /*********PCM param************/ OwnerId requests.Integer `position:"Query" name:"OwnerId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` diff --git a/adaptor/pod_adaptor/server/pod/ali/update_container_group.go b/adaptor/pod/server/ali/update_container_group.go similarity index 86% rename from adaptor/pod_adaptor/server/pod/ali/update_container_group.go rename to adaptor/pod/server/ali/update_container_group.go index b955d7aa..137dcaf9 100644 --- a/adaptor/pod_adaptor/server/pod/ali/update_container_group.go +++ b/adaptor/pod/server/ali/update_container_group.go @@ -16,23 +16,50 @@ package ali import ( - "github.com/JCCE-nudt/PCM/adaptor/pod_adaptor/server/pod" + "errors" + "flag" + "github.com/JCCE-nudt/PCM/adaptor/pod/server" "github.com/JCCE-nudt/PCM/common/tenanter" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" + "github.com/golang/glog" ) // UpdateContainerGroup invokes the eci.UpdateContainerGroup API synchronously // api document: https://help.aliyun.com/api/eci/updatecontainergroup.html -func (client *Client) UpdateContainerGroup(request *UpdateContainerGroupRequest) (response *UpdateContainerGroupResponse, err error) { +func UpdateContainerGroup(request *UpdateContainerGroupRequest) (response *UpdateContainerGroupResponse, err error) { provider := pbtenant.CloudProvider(request.ProviderId) - regionId, err := tenanter.GetAliRegionId(request.RegionId) + var configFile string + flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") + var regionId int32 + switch request.ProviderId { + case 0: + regionId, _ = tenanter.GetAliRegionId(request.RegionId) + case 1: + regionId, _ = tenanter.GetTencentRegionId(request.RegionId) + case 2: + regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) + case 3: + regionId, _ = tenanter.GetK8SRegionId(request.RegionId) + } containers := *request.Container requestPCM := &pbpod.UpdatePodReq{ + RequestSource: "ali", Provider: provider, AccountName: request.AccountName, PodId: request.ContainerGroupId, @@ -47,7 +74,7 @@ func (client *Client) UpdateContainerGroup(request *UpdateContainerGroupRequest) Labels: "", } - resp, err := pod.UpdatePod(nil, requestPCM) + resp, err := server.UpdatePod(nil, requestPCM) response = &UpdateContainerGroupResponse{ BaseResponse: nil, @@ -57,55 +84,11 @@ func (client *Client) UpdateContainerGroup(request *UpdateContainerGroupRequest) return response, err } -// UpdateContainerGroupWithChan invokes the eci.UpdateContainerGroup API asynchronously -// api document: https://help.aliyun.com/api/eci/updatecontainergroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UpdateContainerGroupWithChan(request *UpdateContainerGroupRequest) (<-chan *UpdateContainerGroupResponse, <-chan error) { - responseChan := make(chan *UpdateContainerGroupResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.UpdateContainerGroup(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// UpdateContainerGroupWithCallback invokes the eci.UpdateContainerGroup API asynchronously -// api document: https://help.aliyun.com/api/eci/updatecontainergroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UpdateContainerGroupWithCallback(request *UpdateContainerGroupRequest, callback func(response *UpdateContainerGroupResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *UpdateContainerGroupResponse - var err error - defer close(result) - response, err = client.UpdateContainerGroup(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - // UpdateContainerGroupRequest is the request struct for api UpdateContainerGroup type UpdateContainerGroupRequest struct { *requests.RpcRequest /*********PCM param************/ + RequestSource string `position:"Query" name:"RequestSource"` ProviderId int32 `position:"Query" name:"ProviderId"` AccountName string `position:"Query" name:"AccountName"` Namespace string `position:"Query" name:"Namespace"` diff --git a/adaptor/pod_adaptor/server/pod/pod.go b/adaptor/pod/server/pod.go similarity index 79% rename from adaptor/pod_adaptor/server/pod/pod.go rename to adaptor/pod/server/pod.go index 27afcf2f..1f3af979 100644 --- a/adaptor/pod_adaptor/server/pod/pod.go +++ b/adaptor/pod/server/pod.go @@ -1,11 +1,12 @@ -package pod +package server import ( "context" + "flag" "fmt" "sync" - "github.com/JCCE-nudt/PCM/adaptor/pod_adaptor/service/poder" + "github.com/JCCE-nudt/PCM/adaptor/pod/service" "github.com/JCCE-nudt/PCM/common/tenanter" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" @@ -125,7 +126,22 @@ func DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodRe var ( pod poder.Poder ) + //pcm adk过来的请求需要从用户本地读取配置文件 + if len(req.RequestSource) > 0 { + var configFile string + flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") + } tenanters, err := tenanter.GetTenanters(req.Provider) if err != nil { return nil, errors.WithMessage(err, "getTenanters error") @@ -152,7 +168,22 @@ func UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodRe var ( pod poder.Poder ) + //pcm adk过来的请求需要从用户本地读取配置文件 + if len(req.RequestSource) > 0 { + var configFile string + flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") + } tenanters, err := tenanter.GetTenanters(req.Provider) if err != nil { return nil, errors.WithMessage(err, "getTenanters error") @@ -204,15 +235,30 @@ func ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.Lis func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, error) { var ( - wg sync.WaitGroup - mutex sync.Mutex - pods []*pbpod.PodInstance + wg sync.WaitGroup + mutex sync.Mutex + pods []*pbpod.PodInstance + tenanters []tenanter.Tenanter ) + //pcm adk过来的请求需要从用户本地读取配置文件 + if len(req.RequestSource) > 0 { + var configFile string + flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() - tenanters, err := tenanter.GetTenanters(req.Provider) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") } + + tenanters, _ = tenanter.GetTenanters(req.Provider) + //get the available region for product reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()} respPodRegion, err := GetPodRegion(ctx, reqPodRegion) diff --git a/adaptor/pod_adaptor/service/poder/ali_eci.go b/adaptor/pod/service/ali_eci.go similarity index 100% rename from adaptor/pod_adaptor/service/poder/ali_eci.go rename to adaptor/pod/service/ali_eci.go diff --git a/adaptor/pod_adaptor/service/poder/huawei_cci.go b/adaptor/pod/service/huawei_cci.go similarity index 100% rename from adaptor/pod_adaptor/service/poder/huawei_cci.go rename to adaptor/pod/service/huawei_cci.go diff --git a/adaptor/pod_adaptor/service/poder/k8s.go b/adaptor/pod/service/k8s.go similarity index 100% rename from adaptor/pod_adaptor/service/poder/k8s.go rename to adaptor/pod/service/k8s.go diff --git a/adaptor/pod_adaptor/service/poder/poder.go b/adaptor/pod/service/poder.go similarity index 99% rename from adaptor/pod_adaptor/service/poder/poder.go rename to adaptor/pod/service/poder.go index 20ca6663..935fe149 100644 --- a/adaptor/pod_adaptor/service/poder/poder.go +++ b/adaptor/pod/service/poder.go @@ -2,7 +2,6 @@ package poder import ( "context" - "github.com/JCCE-nudt/PCM/common/tenanter" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" diff --git a/adaptor/pod_adaptor/service/poder/tencent_eks.go b/adaptor/pod/service/tencent_eks.go similarity index 100% rename from adaptor/pod_adaptor/service/poder/tencent_eks.go rename to adaptor/pod/service/tencent_eks.go diff --git a/adaptor/pod_adaptor/server/pod/main_test.go b/adaptor/pod_adaptor/server/pod/main_test.go deleted file mode 100644 index c58ed705..00000000 --- a/adaptor/pod_adaptor/server/pod/main_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package pod - -import ( - "os" - "testing" - - "github.com/JCCE-nudt/PCM/common/tenanter" - "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" -) - -var ( - aliTenant, tcTenant, hwTenant, awsTenant []tenanter.Tenanter -) - -func TestMain(m *testing.M) { - err := tenanter.LoadCloudConfigs("../../../../configs/config.yaml") - if err != nil { - panic(err) - } - if aliTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_ali); err != nil { - panic("get aliTenant failed") - } - if tcTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_tencent); err != nil { - panic("get tcTenant failed") - } - if hwTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_huawei); err != nil { - panic("get hwTenant failed") - } - //if awsTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_aws); err != nil { - // panic("get awsTenant failed") - //} - os.Exit(m.Run()) -} diff --git a/adaptor/pod_adaptor/server/pod/pod_test.go b/adaptor/pod_adaptor/server/pod/pod_test.go deleted file mode 100644 index a8c98248..00000000 --- a/adaptor/pod_adaptor/server/pod/pod_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package pod - -import ( - "context" - "testing" - - "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" - "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" -) - -func TestListDetail(t *testing.T) { - type args struct { - req *pbpod.ListPodDetailReq - } - tests := []struct { - name string - args args - wantErr bool - }{ - {name: "ali", args: args{req: &pbpod.ListPodDetailReq{Provider: pbtenant.CloudProvider_ali, RegionId: int32(pbtenant.AliRegionId_ali_cn_hangzhou), PageNumber: 1, PageSize: 10}}, wantErr: false}, - {name: "tencent", args: args{req: &pbpod.ListPodDetailReq{Provider: pbtenant.CloudProvider_tencent, RegionId: int32(pbtenant.TencentRegionId_tc_ap_beijing), PageNumber: 1, PageSize: 10}}, wantErr: false}, - {name: "aws", args: args{req: &pbpod.ListPodDetailReq{Provider: pbtenant.CloudProvider_aws, RegionId: int32(pbtenant.AwsRegionId_aws_us_east_2), PageNumber: 1, PageSize: 10}}, wantErr: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := ListPodDetail(context.Background(), tt.args.req) - if (err != nil) != tt.wantErr { - t.Errorf("ListDetail() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Log(got) - }) - } -} - -func TestList(t *testing.T) { - type args struct { - req *pbpod.ListPodReq - } - tests := []struct { - name string - args args - wantErr bool - }{ - {name: "ali", args: args{req: &pbpod.ListPodReq{Provider: pbtenant.CloudProvider_ali}}, wantErr: false}, - {name: "tencent", args: args{req: &pbpod.ListPodReq{Provider: pbtenant.CloudProvider_tencent}}, wantErr: false}, - {name: "huawei", args: args{req: &pbpod.ListPodReq{Provider: pbtenant.CloudProvider_huawei}}, wantErr: false}, - {name: "aws", args: args{req: &pbpod.ListPodReq{Provider: pbtenant.CloudProvider_aws}}, wantErr: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := ListPod(context.Background(), tt.args.req) - if (err != nil) != tt.wantErr { - t.Errorf("List() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Log(got) - }) - } -} - -func TestListAll(t *testing.T) { - type args struct { - req *pbpod.ListPodReq - } - tests := []struct { - name string - args args - wantErr bool - }{ - {name: "all", args: args{req: &pbpod.ListPodReq{}}, wantErr: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := ListPodAll(context.Background()) - if (err != nil) != tt.wantErr { - t.Errorf("ListAll() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Log(got) - }) - } -} diff --git a/adaptor/pod_adaptor/service/poder/main_test.go b/adaptor/pod_adaptor/service/poder/main_test.go deleted file mode 100644 index d63df86c..00000000 --- a/adaptor/pod_adaptor/service/poder/main_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package poder - -import ( - "os" - "testing" - - "github.com/JCCE-nudt/PCM/common/tenanter" - "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" -) - -var ( - aliTenant, tcTenant, hwTenant, awsTenant []tenanter.Tenanter -) - -func TestMain(m *testing.M) { - err := tenanter.LoadCloudConfigs("../../../config.yaml") - if err != nil { - panic(err) - } - if aliTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_ali); err != nil { - panic("get aliTenant failed") - } - if tcTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_tencent); err != nil { - panic("get tcTenant failed") - } - if hwTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_huawei); err != nil { - panic("get hwTenant failed") - } - if awsTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider_k8s); err != nil { - panic("get awsTenant failed") - } - os.Exit(m.Run()) -} diff --git a/adaptor/pod_adaptor/service/poder/poder_test.go b/adaptor/pod_adaptor/service/poder/poder_test.go deleted file mode 100644 index 415dea49..00000000 --- a/adaptor/pod_adaptor/service/poder/poder_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package poder - -import ( - "context" - "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" - "testing" - - "github.com/JCCE-nudt/PCM/common/tenanter" - "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" -) - -func TestEcser_ListDetail(t *testing.T) { - region, _ := tenanter.NewRegion(pbtenant.CloudProvider_ali, int32(pbtenant.AliRegionId_ali_cn_hangzhou)) - ali, _ := NewPodClient(pbtenant.CloudProvider_ali, region, aliTenant[0]) - aliFailed, _ := NewPodClient(pbtenant.CloudProvider_ali, region, tenanter.NewTenantWithAccessKey("empty", "", "", "", "")) - - region, _ = tenanter.NewRegion(pbtenant.CloudProvider_tencent, int32(pbtenant.TencentRegionId_tc_ap_beijing)) - tc, _ := NewPodClient(pbtenant.CloudProvider_tencent, region, tcTenant[0]) - tcFailed, _ := NewPodClient(pbtenant.CloudProvider_tencent, region, tenanter.NewTenantWithAccessKey("empty", "", "", "", "")) - - region, _ = tenanter.NewRegion(pbtenant.CloudProvider_huawei, int32(pbtenant.HuaweiRegionId_hw_cn_southwest_2)) - hw, _ := NewPodClient(pbtenant.CloudProvider_huawei, region, hwTenant[0]) - // hwFailed, _ := newHuaweiEcsClient(int32(pbtenant.HuaweiRegionId_hw_cn_north_1), tenanter.NewTenantWithAccessKey("empty", "", "", "")) - - region, _ = tenanter.NewRegion(pbtenant.CloudProvider_k8s, int32(pbtenant.AwsRegionId_aws_us_east_2)) - aws, _ := NewPodClient(pbtenant.CloudProvider_k8s, region, awsTenant[0]) - - // google, _ := NewGoogleEcsClient(tenanter.NewTenantWithAccessKey("", "")) - - type args struct { - req *pbpod.ListPodDetailReq - } - tests := []struct { - name string - fields Poder - args args - wantErr bool - }{ - {name: "ali wrong cli", fields: aliFailed, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 1}}, wantErr: true}, - {name: "ali wrong page number", fields: ali, args: args{&pbpod.ListPodDetailReq{PageNumber: 0, PageSize: 1}}, wantErr: true}, - {name: "ali wrong page size", fields: ali, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 0}}, wantErr: true}, - {name: "ali right cli", fields: ali, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - - {name: "tc wrong cli", fields: tcFailed, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 1}}, wantErr: true}, - {name: "tc wrong page number", fields: tc, args: args{&pbpod.ListPodDetailReq{PageNumber: 0, PageSize: 1}}, wantErr: true}, - {name: "tc wrong page size", fields: tc, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 0}}, wantErr: true}, - {name: "tc right cli", fields: tc, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - - // {name: "hw wrong cli", fields: hwFailed, args: args{pageNumber: 1, pageSize: 1}, wantErr: true}, - {name: "hw right cli", fields: hw, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - - {name: "aws right cli", fields: aws, args: args{&pbpod.ListPodDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - - // {name: "right cli", fields: google, args: args{pageNumber: 1, pageSize: 10}, wantErr: false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - resp, err := tt.fields.ListPodDetail(context.Background(), tt.args.req) - if (err != nil) != tt.wantErr { - t.Errorf("ListDetail() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Logf("%+v", err) - if err == nil { - t.Log(resp) - } - }) - } -} diff --git a/adaptor/vm_adaptor/server/ecs/list.go b/adaptor/vm/server/ecs/list.go similarity index 99% rename from adaptor/vm_adaptor/server/ecs/list.go rename to adaptor/vm/server/ecs/list.go index 76035917..171b377b 100644 --- a/adaptor/vm_adaptor/server/ecs/list.go +++ b/adaptor/vm/server/ecs/list.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/JCCE-nudt/PCM/adaptor/vm_adaptor/service/ecser" + "github.com/JCCE-nudt/PCM/adaptor/vm/service/ecser" "github.com/JCCE-nudt/PCM/common/tenanter" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbecs" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" diff --git a/adaptor/vm_adaptor/server/ecs/list_test.go b/adaptor/vm/server/ecs/list_test.go similarity index 100% rename from adaptor/vm_adaptor/server/ecs/list_test.go rename to adaptor/vm/server/ecs/list_test.go diff --git a/adaptor/vm_adaptor/server/ecs/main_test.go b/adaptor/vm/server/ecs/main_test.go similarity index 100% rename from adaptor/vm_adaptor/server/ecs/main_test.go rename to adaptor/vm/server/ecs/main_test.go diff --git a/adaptor/vm_adaptor/service/ecser/ali.go b/adaptor/vm/service/ecser/ali.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/ali.go rename to adaptor/vm/service/ecser/ali.go diff --git a/adaptor/vm_adaptor/service/ecser/aws.go b/adaptor/vm/service/ecser/aws.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/aws.go rename to adaptor/vm/service/ecser/aws.go diff --git a/adaptor/vm_adaptor/service/ecser/ecser.go b/adaptor/vm/service/ecser/ecser.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/ecser.go rename to adaptor/vm/service/ecser/ecser.go diff --git a/adaptor/vm_adaptor/service/ecser/ecser_test.go b/adaptor/vm/service/ecser/ecser_test.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/ecser_test.go rename to adaptor/vm/service/ecser/ecser_test.go diff --git a/adaptor/vm_adaptor/service/ecser/google.go b/adaptor/vm/service/ecser/google.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/google.go rename to adaptor/vm/service/ecser/google.go diff --git a/adaptor/vm_adaptor/service/ecser/harvester.go b/adaptor/vm/service/ecser/harvester.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/harvester.go rename to adaptor/vm/service/ecser/harvester.go diff --git a/adaptor/vm_adaptor/service/ecser/harvester_util.go b/adaptor/vm/service/ecser/harvester_util.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/harvester_util.go rename to adaptor/vm/service/ecser/harvester_util.go diff --git a/adaptor/vm_adaptor/service/ecser/huawei.go b/adaptor/vm/service/ecser/huawei.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/huawei.go rename to adaptor/vm/service/ecser/huawei.go diff --git a/adaptor/vm_adaptor/service/ecser/main_test.go b/adaptor/vm/service/ecser/main_test.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/main_test.go rename to adaptor/vm/service/ecser/main_test.go diff --git a/adaptor/vm_adaptor/service/ecser/tencent.go b/adaptor/vm/service/ecser/tencent.go similarity index 100% rename from adaptor/vm_adaptor/service/ecser/tencent.go rename to adaptor/vm/service/ecser/tencent.go diff --git a/buf.gen.yaml b/buf.gen.yaml index 21c9cb5e..fda95a3c 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -4,18 +4,18 @@ plugins: out: lan_trans opt: - paths=source_relative -# - name: java -# out: lan_trans -# opt: -# - paths=source_relative + # - name: java + # out: lan_trans + # opt: + # - paths=source_relative - name: go-grpc out: lan_trans opt: - paths=source_relative -# - name: java-grpc -# out: gen -# opt: -# - paths=source_relative + # - name: java-grpc + # out: gen + # opt: + # - paths=source_relative - name: grpc-gateway out: lan_trans opt: diff --git a/common/server/server_ecs.go b/common/server/server_ecs.go index 334bb8c7..3da100d0 100644 --- a/common/server/server_ecs.go +++ b/common/server/server_ecs.go @@ -3,7 +3,7 @@ package server import ( "context" - "github.com/JCCE-nudt/PCM/adaptor/vm_adaptor/server/ecs" + "github.com/JCCE-nudt/PCM/adaptor/vm/server/ecs" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbecs" "github.com/golang/glog" diff --git a/common/server/server_pod.go b/common/server/server_pod.go index 0702590b..087912cc 100644 --- a/common/server/server_pod.go +++ b/common/server/server_pod.go @@ -2,8 +2,8 @@ package server import ( "context" + "github.com/JCCE-nudt/PCM/adaptor/pod/server" - "github.com/JCCE-nudt/PCM/adaptor/pod_adaptor/server/pod" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbpod" "github.com/golang/glog" @@ -13,7 +13,7 @@ import ( // GetProdRegions get available region for product func (s *Server) GetProdRegions(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { - resp, err := pod.GetPodRegion(ctx, req) + resp, err := server.GetPodRegion(ctx, req) if err != nil { glog.Errorf("CreatePods error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) @@ -23,7 +23,7 @@ func (s *Server) GetProdRegions(ctx context.Context, req *pbpod.GetPodRegionReq) // CreatePods create multiple pod on multiple clouds func (s *Server) CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbpod.CreatePodsResp, error) { - resp, err := pod.CreatePods(ctx, req) + resp, err := server.CreatePods(ctx, req) if err != nil { glog.Errorf("CreatePods error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) @@ -33,7 +33,7 @@ func (s *Server) CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbp // CreatePod create pod on one cloud func (s *Server) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { - resp, err := pod.CreatePod(ctx, req) + resp, err := server.CreatePod(ctx, req) if err != nil { glog.Errorf("CreatePod error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) @@ -43,7 +43,7 @@ func (s *Server) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod // DeletePod delete specified pod func (s *Server) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - resp, err := pod.DeletePod(ctx, req) + resp, err := server.DeletePod(ctx, req) if err != nil { glog.Errorf("DeletePod error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) @@ -53,7 +53,7 @@ func (s *Server) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod // UpdatePod update specified pod func (s *Server) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - resp, err := pod.UpdatePod(ctx, req) + resp, err := server.UpdatePod(ctx, req) if err != nil { glog.Errorf("UpdatePod error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) @@ -62,7 +62,7 @@ func (s *Server) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod } func (s *Server) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - resp, err := pod.ListPodDetail(ctx, req) + resp, err := server.ListPodDetail(ctx, req) if err != nil { glog.Errorf("ListPodDetail error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) @@ -71,7 +71,7 @@ func (s *Server) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) } func (s *Server) ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, error) { - resp, err := pod.ListPod(ctx, req) + resp, err := server.ListPod(ctx, req) if err != nil { glog.Errorf("ListPod error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) @@ -80,7 +80,7 @@ func (s *Server) ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.Lis } func (s *Server) ListPodAll(ctx context.Context, req *pbpod.ListPodAllReq) (*pbpod.ListPodResp, error) { - resp, err := pod.ListPodAll(ctx) + resp, err := server.ListPodAll(ctx) if err != nil { glog.Errorf("ListPodAll error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) diff --git a/common/tenanter/region.go b/common/tenanter/region.go index ba0b4bd5..30845af9 100644 --- a/common/tenanter/region.go +++ b/common/tenanter/region.go @@ -159,12 +159,7 @@ func GetK8SRegionName(regionId int32) (string, error) { // GetK8SRegionId prefix ali_ func GetK8SRegionId(regionName string) (int32, error) { - regionName = "ali_" + strings.ReplaceAll(regionName, "-", "_") - id, ok := pbtenant.AliRegionId_value[regionName] - if !ok || regionName == "" { - return 0, errors.WithMessagef(ErrNoExistAliRegionId, "input region id is %s", regionName) - } - return id, nil + return 0, nil } // GetAwsRegionName prefix aws_ diff --git a/common/tenanter/tenanter.go b/common/tenanter/tenanter.go index 77dd79f0..33b3a660 100644 --- a/common/tenanter/tenanter.go +++ b/common/tenanter/tenanter.go @@ -2,7 +2,9 @@ package tenanter import ( "encoding/json" + "flag" "github.com/JCCE-nudt/PCM/lan_trans/idl/pbtenant" + "github.com/golang/glog" "io/ioutil" "os" "sync" @@ -99,3 +101,19 @@ func GetTenanters(provider pbtenant.CloudProvider) ([]Tenanter, error) { } return tenanters, nil } + +func GenTenanter(configPath string) { + var configFile string + flag.StringVar(&configFile, "conf", configPath, "config.yaml") + flag.Parse() + defer glog.Flush() + + if err := LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, ErrLoadTenanterFileEmpty) { + glog.Fatalf("LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") +} diff --git a/examples/ali.go b/examples/ali.go new file mode 100644 index 00000000..db1c22ec --- /dev/null +++ b/examples/ali.go @@ -0,0 +1,56 @@ +//// This file is auto-generated, don't edit it. Thanks. +package main + +// +//import ( +// openapi "github.com/alibabacloud-go/darabonba-openapi/client" +// eci20180808 "github.com/alibabacloud-go/eci-20180808/v2/client" +// "github.com/alibabacloud-go/tea/tea" +// "os" +//) +// +///** +// * 使用AK&SK初始化账号Client +// * @param accessKeyId +// * @param accessKeySecret +// * @return Client +// * @throws Exception +// */ +//func CreateClient(accessKeyId *string, accessKeySecret *string) (_result *eci20180808.Client, _err error) { +// config := &openapi.Config{ +// // 您的AccessKey ID +// AccessKeyId: accessKeyId, +// // 您的AccessKey Secret +// AccessKeySecret: accessKeySecret, +// } +// // 访问的域名 +// config.Endpoint = tea.String("eci.aliyuncs.com") +// _result = &eci20180808.Client{} +// _result, _err = eci20180808.NewClient(config) +// return _result, _err +//} +// +//func _main(args []*string) (_err error) { +// client, _err := CreateClient(tea.String(""), tea.String("")) +// if _err != nil { +// return _err +// } +// +// describeContainerGroupsRequest := &eci20180808.DescribeContainerGroupsRequest{ +// RegionId: tea.String("cn-hangzhou"), +// } +// // 复制代码运行请自行打印 API 的返回值 +// resp, _err := client.DescribeContainerGroups(describeContainerGroupsRequest) +// println(*resp.Body.ContainerGroups[0].ContainerGroupId) +// if _err != nil { +// return _err +// } +// return _err +//} +// +//func main() { +// err := _main(tea.StringSlice(os.Args[1:])) +// if err != nil { +// panic(err) +// } +//} diff --git a/examples/pcm.go b/examples/pcm.go new file mode 100644 index 00000000..0d77c705 --- /dev/null +++ b/examples/pcm.go @@ -0,0 +1,53 @@ +package main + +import ( + pcm_pod_ali "github.com/JCCE-nudt/PCM/adaptor/pod/server/ali" + "github.com/alibabacloud-go/tea/tea" + "os" +) + +func _main(args []*string) (_err error) { + + //查询 + //describeContainerGroupsRequest := pcm_pod_ali.DescribeContainerGroupsRequest{ + // RegionId: "cn-hangzhou", + // ProviderId: 1, + //} + // + //// 复制代码运行请自行打印 API 的返回值 + //resp, _err := pcm_pod_ali.DescribeContainerGroups(&describeContainerGroupsRequest) + //println(resp.ContainerGroups[0].ContainerGroupId) + + //创建 + container := pcm_pod_ali.CreateContainerGroupContainer{ + Image: "nginx:latest", + Name: "pcm-sdk-ali", + Cpu: "1", + Memory: "2", + } + containers := make([]pcm_pod_ali.CreateContainerGroupContainer, 0) + containers = append(containers, container) + + createContainerGroupsRequest := pcm_pod_ali.CreateContainerGroupRequest{ + RpcRequest: nil, + //ali:cn-hangzhou tc:ap-shanghai hw: k8s + RegionId: "cn-hangzhou", + ProviderId: 3, + Namespace: "pcm", + ContainerGroupName: "sdk-alitohuawei", + Container: &containers, + } + + // 复制代码运行请自行打印 API 的返回值 + resp, _err := pcm_pod_ali.CreateContainerGroup(&createContainerGroupsRequest) + + println(resp.ContainerGroupId) + return _err +} + +func main() { + err := _main(tea.StringSlice(os.Args[1:])) + if err != nil { + panic(err) + } +} diff --git a/gen.sh b/gen.sh old mode 100755 new mode 100644 diff --git a/go.mod b/go.mod index 52a94093..2f16d153 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.17 require ( github.com/alibabacloud-go/darabonba-openapi v0.1.4 github.com/alibabacloud-go/darabonba-string v1.0.0 + github.com/alibabacloud-go/eci-20180808/v2 v2.0.2 github.com/alibabacloud-go/ecs-20140526/v2 v2.1.0 github.com/alibabacloud-go/tea v1.1.15 github.com/alibabacloud-go/tea-utils v1.3.9 @@ -73,7 +74,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.11 // indirect github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20200331171230-d50e42f2b669 // indirect - github.com/kubernetes-csi/external-snapshotter/v2 v2.1.1 // indirect + github.com/kubernetes-csi/external-snapshotter/v2 v2.1.3 // indirect github.com/longhorn/go-iscsi-helper v0.0.0-20201111045018-ee87992ec536 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect diff --git a/idl/demo/demo.proto b/idl/demo/demo.proto index b975ca1e..96784b9b 100644 --- a/idl/demo/demo.proto +++ b/idl/demo/demo.proto @@ -11,7 +11,7 @@ enum OurTeam { devad = 0; } -message StringMessage { string value = 1; } +message StringMessage {string value = 1;} // 样例服务 service DemoService { diff --git a/idl/pbecs/ecs.proto b/idl/pbecs/ecs.proto index a48bcfea..b060079f 100644 --- a/idl/pbecs/ecs.proto +++ b/idl/pbecs/ecs.proto @@ -46,7 +46,7 @@ message EcsInstance { //虚拟机所在的节点 string node = 18; //namespace - string namespace =20; + string namespace = 20; } //网络计费类型 @@ -108,10 +108,10 @@ message CreateEcsReq { // vpc id 华为云必需 string vpc_id = 18; //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 - string subnet_id =19; + string subnet_id = 19; //-------------harvester--------------- //命名空间 - string namespace =20; + string namespace = 20; //vCpu int32 cpu = 21; //memory @@ -127,25 +127,25 @@ message CreateEcsReq { //bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi. string bus = 27; //网络名称 - string network_name =28; + string network_name = 28; //network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. - string network_model=29; + string network_model = 29; //网络 - string network =30; + string network = 30; //网络连接方法,默认bridge - string network_type =31; + string network_type = 31; //osType //系统类型 string os_type = 32; //machineType //机器类型 none、q35、pc string machine_type = 33; //machineName //主机名称,默认为虚拟机名称 - string machine_name =34; + string machine_name = 34; //userDataTemplate //用户数据模板 string user_data_template = 35; //networkDataTemplate //网络数据模板 string network_data_template = 36; //vmTemplateName //模板名称 - string vm_template_name =37; + string vm_template_name = 37; //vmTemplateVersion //版本号 string vm_template_version = 38; } @@ -240,7 +240,7 @@ message UpdateEcsReq { // 地域,数据中心 int32 region_id = 3; //实例id - string instance_ids = 4; + string instance_ids = 4; // 实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。 string password = 5; //操作系统的主机名 diff --git a/idl/pbpod/pod.proto b/idl/pbpod/pod.proto index 63f15ba9..f4488ad3 100644 --- a/idl/pbpod/pod.proto +++ b/idl/pbpod/pod.proto @@ -81,6 +81,8 @@ message CreatePodReq { string vpc_id = 12; //名空间 string namespace = 13; + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + string requestSource = 14; } message CreatePodResp { @@ -109,6 +111,8 @@ message DeletePodReq { string namespace = 6; // 地域,数据中心 int32 region_id = 7; + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + string requestSource = 8; } message DeletePodResp { @@ -149,6 +153,8 @@ message UpdatePodReq { string restart_policy = 12; // labels string labels = 13; + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + string requestSource = 14; } message UpdatePodResp { @@ -202,8 +208,10 @@ message ListPodDetailResp { message ListPodReq { // cloud name pbtenant.CloudProvider provider = 1; - // + //命名空间 string namespace =2; + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + string requestSource =3; } message ListPodResp { diff --git a/idl/pbtenant/tenant.proto b/idl/pbtenant/tenant.proto index 802393d9..2ad6984e 100644 --- a/idl/pbtenant/tenant.proto +++ b/idl/pbtenant/tenant.proto @@ -96,27 +96,27 @@ enum AliRegionId { // 腾讯云区域,需要将对应的 _ 转化为 - enum TencentRegionId { tc_all = 0; - tc_ap_bangkok =1; //亚太东南(曼谷) - tc_ap_beijing =2; //华北地区(北京) - tc_ap_chengdu =3; //西南地区(成都) - tc_ap_chongqing =4; //西南地区(重庆) - tc_ap_guangzhou =5; //华南地区(广州) - tc_ap_hongkong =6; //港澳台地区(中国香港) - tc_ap_jakarta =7; //亚太东南(雅加达) - tc_ap_mumbai=8; // 亚太南部(孟买) - tc_ap_nanjing =9; //华东地区(南京) - tc_ap_seoul =10; //亚太东北(首尔) - tc_ap_shanghai =11; //华东地区(上海) - tc_ap_shanghai_fsi=12; //华东地区(上海金融) - tc_ap_shenzhen_fsi =13; //华南地区(深圳金融) - tc_ap_singapore =14; //亚太东南(新加坡) - tc_ap_tokyo =15; //亚太东北(东京) - tc_eu_frankfurt=16; //欧洲地区(法兰克福) - tc_eu_moscow =17; //欧洲地区(莫斯科) - tc_na_ashburn =18; //美国东部(弗吉尼亚) - tc_na_siliconvalley=19; //美国西部(硅谷) - tc_na_toronto =20; //北美地区(多伦多) - tc_sa_saopaulo =21; //南美地区(圣保罗) + tc_ap_bangkok = 1; //亚太东南(曼谷) + tc_ap_beijing = 2; //华北地区(北京) + tc_ap_chengdu = 3; //西南地区(成都) + tc_ap_chongqing = 4; //西南地区(重庆) + tc_ap_guangzhou = 5; //华南地区(广州) + tc_ap_hongkong = 6; //港澳台地区(中国香港) + tc_ap_jakarta = 7; //亚太东南(雅加达) + tc_ap_mumbai = 8; // 亚太南部(孟买) + tc_ap_nanjing = 9; //华东地区(南京) + tc_ap_seoul = 10; //亚太东北(首尔) + tc_ap_shanghai = 11; //华东地区(上海) + tc_ap_shanghai_fsi = 12; //华东地区(上海金融) + tc_ap_shenzhen_fsi = 13; //华南地区(深圳金融) + tc_ap_singapore = 14; //亚太东南(新加坡) + tc_ap_tokyo = 15; //亚太东北(东京) + tc_eu_frankfurt = 16; //欧洲地区(法兰克福) + tc_eu_moscow = 17; //欧洲地区(莫斯科) + tc_na_ashburn = 18; //美国东部(弗吉尼亚) + tc_na_siliconvalley = 19; //美国西部(硅谷) + tc_na_toronto = 20; //北美地区(多伦多) + tc_sa_saopaulo = 21; //南美地区(圣保罗) } // 华为云区域,需要将对应的 _ 转化为 - diff --git a/lan_trans/idl/pbpod/pod.pb.go b/lan_trans/idl/pbpod/pod.pb.go index f6c51026..95be324e 100644 --- a/lan_trans/idl/pbpod/pod.pb.go +++ b/lan_trans/idl/pbpod/pod.pb.go @@ -341,6 +341,8 @@ type CreatePodReq struct { VpcId string `protobuf:"bytes,12,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` //名空间 Namespace string `protobuf:"bytes,13,opt,name=namespace,proto3" json:"namespace,omitempty"` + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"` } func (x *CreatePodReq) Reset() { @@ -466,6 +468,13 @@ func (x *CreatePodReq) GetNamespace() string { return "" } +func (x *CreatePodReq) GetRequestSource() string { + if x != nil { + return x.RequestSource + } + return "" +} + type CreatePodResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -560,6 +569,8 @@ type DeletePodReq struct { Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` // 地域,数据中心 RegionId int32 `protobuf:"varint,7,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + RequestSource string `protobuf:"bytes,8,opt,name=requestSource,proto3" json:"requestSource,omitempty"` } func (x *DeletePodReq) Reset() { @@ -643,6 +654,13 @@ func (x *DeletePodReq) GetRegionId() int32 { return 0 } +func (x *DeletePodReq) GetRequestSource() string { + if x != nil { + return x.RequestSource + } + return "" +} + type DeletePodResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -749,6 +767,8 @@ type UpdatePodReq struct { RestartPolicy string `protobuf:"bytes,12,opt,name=restart_policy,json=restartPolicy,proto3" json:"restart_policy,omitempty"` // labels Labels string `protobuf:"bytes,13,opt,name=labels,proto3" json:"labels,omitempty"` + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"` } func (x *UpdatePodReq) Reset() { @@ -874,6 +894,13 @@ func (x *UpdatePodReq) GetLabels() string { return "" } +func (x *UpdatePodReq) GetRequestSource() string { + if x != nil { + return x.RequestSource + } + return "" +} + type UpdatePodResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1169,8 +1196,10 @@ type ListPodReq struct { // cloud name Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` - // + //命名空间 Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 + RequestSource string `protobuf:"bytes,3,opt,name=requestSource,proto3" json:"requestSource,omitempty"` } func (x *ListPodReq) Reset() { @@ -1219,6 +1248,13 @@ func (x *ListPodReq) GetNamespace() string { return "" } +func (x *ListPodReq) GetRequestSource() string { + if x != nil { + return x.RequestSource + } + return "" +} + type ListPodResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1451,7 +1487,7 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{ 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xbb, 0x03, 0x0a, 0x0c, 0x43, 0x72, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xe1, 0x03, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, @@ -1479,166 +1515,176 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{ 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x76, 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x7c, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, - 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x7c, 0x0a, + 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x90, 0x02, 0x0a, 0x0c, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x63, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x63, 0x6d, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, + 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x7c, + 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd7, 0x03, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x63, 0x6d, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x63, 0x6d, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, + 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, + 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x70, 0x75, + 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x70, 0x75, 0x50, + 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x6f, + 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x7c, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, + 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, - 0x0a, 0x06, 0x70, 0x63, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x63, 0x6d, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x22, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, - 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0xb1, 0x03, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, - 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x63, 0x6d, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x63, 0x6d, 0x49, 0x64, - 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, - 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, - 0x07, 0x63, 0x70, 0x75, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x63, 0x70, 0x75, 0x50, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x50, 0x6f, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, - 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x22, 0x7c, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, - 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, - 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, - 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, - 0x6f, 0x64, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, - 0xd3, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, 0x64, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, - 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, - 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x35, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, 0x64, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x22, 0x46, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, - 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x3e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x64, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, - 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x32, 0xda, 0x04, 0x0a, 0x0a, 0x50, 0x6f, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x6f, 0x64, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x70, 0x6f, - 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x3a, - 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x12, - 0x13, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, - 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x50, 0x6f, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x70, 0x6f, - 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, - 0x6f, 0x64, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x70, 0x6f, - 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, - 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x1a, 0x10, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, - 0x2a, 0x12, 0x5c, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, + 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, + 0x35, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, + 0x0a, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, + 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x22, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x64, + 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x3e, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x32, + 0xda, 0x04, 0x0a, 0x0a, 0x50, 0x6f, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, + 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x12, 0x14, 0x2e, 0x70, + 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, + 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, + 0x12, 0x53, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x12, 0x13, 0x2e, + 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, + 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, + 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x6f, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x1a, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, + 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x5c, 0x0a, 0x0d, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, - 0x43, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x70, - 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, - 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x70, 0x6f, 0x64, 0x12, 0x4d, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, - 0x6c, 0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, - 0x61, 0x6c, 0x6c, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2d, 0x6e, 0x75, 0x64, 0x74, 0x2f, 0x50, 0x43, 0x4d, 0x2f, - 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x62, - 0x70, 0x6f, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x18, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, + 0x64, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x43, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x6f, 0x64, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x12, 0x4d, 0x0a, + 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, + 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, + 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x61, 0x6c, 0x6c, 0x42, 0x2e, 0x5a, 0x2c, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2d, + 0x6e, 0x75, 0x64, 0x74, 0x2f, 0x50, 0x43, 0x4d, 0x2f, 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index 712d1a4c..c9ab7792 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -52,6 +52,14 @@ }, { "name": "namespace", + "description": "命名空间", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "requestSource", + "description": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体", "in": "query", "required": false, "type": "string" @@ -375,6 +383,10 @@ "namespace": { "type": "string", "title": "名空间" + }, + "requestSource": { + "type": "string", + "title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体" } } }, @@ -458,6 +470,10 @@ "type": "integer", "format": "int32", "title": "地域,数据中心" + }, + "requestSource": { + "type": "string", + "title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体" } } }, @@ -653,6 +669,10 @@ "labels": { "type": "string", "title": "labels" + }, + "requestSource": { + "type": "string", + "title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体" } } }, diff --git a/swagger.sh b/swagger.sh old mode 100755 new mode 100644 diff --git a/unittest.sh b/unittest.sh old mode 100755 new mode 100644