diff --git a/adaptor/pod_adaptor/server/pod/list.go b/adaptor/pod_adaptor/server/pod/list.go index 145648be..dd9b4414 100644 --- a/adaptor/pod_adaptor/server/pod/list.go +++ b/adaptor/pod_adaptor/server/pod/list.go @@ -2,11 +2,12 @@ package pod import ( "context" + "sync" + "gitlink.org.cn/JCCE/PCM/adaptor/pod_adaptor/service/poder" "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbpod" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" - "sync" "github.com/golang/glog" "github.com/pkg/errors" @@ -39,6 +40,60 @@ func CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodRe return pod.CreatePod(ctx, req) } +func DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { + var ( + pod poder.Poder + ) + + tenanters, err := tenanter.GetTenanters(req.Provider) + if err != nil { + return nil, errors.WithMessage(err, "getTenanters error") + } + + region, err := tenanter.NewRegion(req.Provider, req.RegionId) + if err != nil { + return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId) + } + + for _, tenanter := range tenanters { + if req.AccountName == "" || tenanter.AccountName() == req.AccountName { + if pod, err = poder.NewPodClient(req.Provider, region, tenanter); err != nil { + return nil, errors.WithMessage(err, "NewPodClient error") + } + break + } + } + + return pod.DeletePod(ctx, req) +} + +func UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { + var ( + pod poder.Poder + ) + + tenanters, err := tenanter.GetTenanters(req.Provider) + if err != nil { + return nil, errors.WithMessage(err, "getTenanters error") + } + + region, err := tenanter.NewRegion(req.Provider, req.RegionId) + if err != nil { + return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId) + } + + for _, tenanter := range tenanters { + if req.AccountName == "" || tenanter.AccountName() == req.AccountName { + if pod, err = poder.NewPodClient(req.Provider, region, tenanter); err != nil { + return nil, errors.WithMessage(err, "NewPodClient error") + } + break + } + } + + return pod.UpdatePod(ctx, req) +} + func ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { var ( pod poder.Poder diff --git a/adaptor/pod_adaptor/service/poder/ali_eci.go b/adaptor/pod_adaptor/service/poder/ali_eci.go index 729e4156..85a256df 100644 --- a/adaptor/pod_adaptor/service/poder/ali_eci.go +++ b/adaptor/pod_adaptor/service/poder/ali_eci.go @@ -2,11 +2,12 @@ package poder import ( "context" + "strconv" + "sync" + "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbpod" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" - "strconv" - "sync" alieci "github.com/aliyun/alibaba-cloud-sdk-go/services/eci" "github.com/pkg/errors" @@ -72,6 +73,16 @@ func (eci *AliEci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbp }, nil } +func (eci *AliEci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { + //TODO implement ali eci delete pod + return nil, nil +} + +func (eci *AliEci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { + //TODO implement ali eci update pod + return nil, nil +} + func (eci *AliEci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { request := alieci.CreateDescribeContainerGroupsRequest() request.NextToken = req.NextToken diff --git a/adaptor/pod_adaptor/service/poder/huawei_cci.go b/adaptor/pod_adaptor/service/poder/huawei_cci.go index 56859e95..047ee63a 100644 --- a/adaptor/pod_adaptor/service/poder/huawei_cci.go +++ b/adaptor/pod_adaptor/service/poder/huawei_cci.go @@ -5,6 +5,8 @@ import ( "fmt" "sync" + "k8s.io/apimachinery/pkg/api/resource" + "github.com/golang/glog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -12,11 +14,11 @@ import ( "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbpod" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" + corev1 "k8s.io/api/core/v1" + huaweicci "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd/api" - huaweicci "k8s.io/client-go/kubernetes" - "github.com/pkg/errors" "gitlink.org.cn/JCCE/PCM/common/tenanter" ) @@ -76,8 +78,105 @@ func newHuaweiCciClient(region tenanter.Region, tenant tenanter.Tenanter) (Poder }, nil } -func (pod *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - resp, err := pod.cli.CoreV1().Pods(req.GetNamespace()).List(metav1.ListOptions{}) +func (cci *HuaweiCci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { + pod := corev1.Pod{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "core/V1", + Kind: "Pod", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: req.PodName, + Namespace: req.Namespace, + Labels: map[string]string{"name": "testapi"}, + }, + Spec: corev1.PodSpec{ + RestartPolicy: corev1.RestartPolicyAlways, + Containers: []corev1.Container{ + { + Name: req.ContainerName, + Image: req.ContainerImage, + Resources: corev1.ResourceRequirements{ + Limits: map[corev1.ResourceName]resource.Quantity{ + corev1.ResourceCPU: resource.MustParse(req.CpuPod), + corev1.ResourceMemory: resource.MustParse(req.MemoryPod), + }, + }, + }, + }, + }, + Status: corev1.PodStatus{}, + } + + resp, err := cci.cli.CoreV1().Pods(req.Namespace).Create(&pod) + glog.Info("Huawei create pod resp", resp) + if err != nil { + return nil, errors.Wrap(err, "Huaweiyun CreatePod error") + } + + isFinished := false + if len(resp.UID) > 0 { + isFinished = true + } + + return &pbpod.CreatePodResp{ + Pods: nil, + Finished: isFinished, + //RequestId: resp.RequestId, + }, nil +} + +func (cci *HuaweiCci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { + podName := req.PodName + fmt.Println("Huawei ContainerGroup:", podName, " Deleted") + err := cci.cli.CoreV1().Pods(req.Namespace).Delete(podName, &metav1.DeleteOptions{}) + + glog.Info("Huawei delete pod resp", err) + isFinished := true + if err != nil { + isFinished = false + return nil, errors.Wrap(err, "Huaweiyun DeletePod error") + } + + return &pbpod.DeletePodResp{ + //Pods: err, + Finished: isFinished, + //RequestId: resp.RequestId, + }, nil +} + +func (cci *HuaweiCci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { + qresp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).Get(req.PodName, metav1.GetOptions{}) + pod := corev1.Pod{ + TypeMeta: qresp.TypeMeta, + ObjectMeta: metav1.ObjectMeta{ + Name: req.PodName, + Namespace: req.Namespace, + Labels: map[string]string{"name": req.Labels}, + }, + Spec: qresp.Spec, + Status: qresp.Status, + } + pod.Spec.Containers[0].Image = req.ContainerImage + resp, err := cci.cli.CoreV1().Pods(req.Namespace).Update(&pod) + glog.Info("Huawei update pod resp", resp) + if err != nil { + return nil, errors.Wrap(err, "Huaweiyun UpdatePod error") + } + + isFinished := false + if len(resp.UID) > 0 { + isFinished = true + } + + return &pbpod.UpdatePodResp{ + Pod: nil, + Finished: isFinished, + //RequestId: resp.RequestId, + }, nil +} + +func (cci *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { + resp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).List(metav1.ListOptions{}) if err != nil { return nil, errors.Wrap(err, "Huaweiyun ListDetail pod error") } @@ -86,10 +185,10 @@ func (pod *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetai for k, v := range resp.Items { podes[k] = &pbpod.PodInstance{ Provider: pbtenant.CloudProvider_huawei, - AccountName: pod.tenanter.AccountName(), + AccountName: cci.tenanter.AccountName(), PodId: string(v.GetUID()), PodName: v.Name, - RegionId: pod.region.GetId(), + RegionId: cci.region.GetId(), ContainerImage: v.Spec.Containers[0].Image, ContainerName: v.Spec.Containers[0].Name, CpuPod: v.Spec.Containers[0].Resources.Requests.Cpu().String(), @@ -112,44 +211,3 @@ func (pod *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetai //RequestId: resp.RequestId, }, nil } - -func (pod *HuaweiCci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { - //resp, err := pod.cli.CoreV1().Pods(req.GetNamespace()).List(metav1.ListOptions{}) - //if err != nil { - // return nil, errors.Wrap(err, "Huaweiyun ListDetail pod error") - //} - //glog.Info("Huaweiyun ListDetail pod success", resp.Items) - //var podes = make([]*pbpod.PodInstance, len(resp.Items)) - //for k, v := range resp.Items { - // podes[k] = &pbpod.PodInstance{ - // Provider: pbtenant.CloudProvider_huawei, - // AccountName: pod.tenanter.AccountName(), - // InstanceId: string(v.GetUID()), - // InstanceName: v.Name, - // RegionName: pod.region.GetName(), - // PublicIps: v.Status.PodIP, - // //InstanceType: v.InstanceType, - // //Cpu: v.Spec.Containers[0].Resources.Requests.Cpu(), - // //Memory: v.Spec.Containers[0].Resources.Requests.Memory(), - // //Description: v.Description, - // Status: string(v.Status.Phase), - // CreationTime: v.CreationTimestamp.String(), - // //ExpireTime: v.ExpiredTime, - // //InnerIps: v.IntranetIp, - // //VpcId: v.VpcId, - // //SecurityGroupId: v.SecurityGroupId - // } - //} - // - //isFinished := false - //if len(podes) < int(req.PageSize) { - // isFinished = true - //} - // - return &pbpod.CreatePodResp{ - Pods: nil, - //Finished: isFinished, - //RequestId: resp.RequestId, - }, nil - -} diff --git a/adaptor/pod_adaptor/service/poder/poder.go b/adaptor/pod_adaptor/service/poder/poder.go index 482cb65c..de49d0eb 100644 --- a/adaptor/pod_adaptor/service/poder/poder.go +++ b/adaptor/pod_adaptor/service/poder/poder.go @@ -19,6 +19,8 @@ var ( type Poder interface { ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (resp *pbpod.ListPodDetailResp, err error) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (resp *pbpod.CreatePodResp, err error) + DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) + UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) } func NewPodClient(provider pbtenant.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (poder Poder, err error) { diff --git a/adaptor/pod_adaptor/service/poder/tencent_eks.go b/adaptor/pod_adaptor/service/poder/tencent_eks.go index a485f66c..4f93dc9b 100644 --- a/adaptor/pod_adaptor/service/poder/tencent_eks.go +++ b/adaptor/pod_adaptor/service/poder/tencent_eks.go @@ -2,14 +2,15 @@ package poder import ( "context" + "strconv" + "sync" + "github.com/pkg/errors" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" tencenteks "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525" "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbpod" - "strconv" - "sync" ) var tencentClientMutex sync.Mutex @@ -102,6 +103,16 @@ func (eks TencentEks) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (* } +func (eks *TencentEks) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { + //TODO implement ali eci delete pod + return nil, nil +} + +func (eks *TencentEks) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { + //TODO implement ali eci update pod + return nil, nil +} + func (eks TencentEks) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (resp *pbpod.ListPodDetailResp, err error) { //TODO implement me panic("implement me") diff --git a/common/server/server_pod.go b/common/server/server_pod.go index 8f4ed672..dcb19966 100644 --- a/common/server/server_pod.go +++ b/common/server/server_pod.go @@ -2,6 +2,7 @@ package server import ( "context" + "gitlink.org.cn/JCCE/PCM/adaptor/pod_adaptor/server/pod" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbpod" @@ -19,6 +20,24 @@ func (s *Server) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod return resp, nil } +func (s *Server) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { + resp, err := pod.DeletePod(ctx, req) + if err != nil { + glog.Errorf("DeletePod error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +func (s *Server) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { + resp, err := pod.UpdatePod(ctx, req) + if err != nil { + glog.Errorf("UpdatePod error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + func (s *Server) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { resp, err := pod.ListPodDetail(ctx, req) if err != nil { diff --git a/go.mod b/go.mod index 7c55f05c..b6b6c261 100644 --- a/go.mod +++ b/go.mod @@ -11,9 +11,12 @@ require ( github.com/pkg/errors v0.9.1 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.377 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.377 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.377 google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 + k8s.io/api v0.0.0-20190620084959-7cf5895f2711 + k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719 k8s.io/client-go v0.0.0-20190620085101-78d2af792bab ) @@ -42,8 +45,6 @@ require ( gopkg.in/inf.v0 v0.9.0 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/api v0.0.0-20190620084959-7cf5895f2711 // indirect - k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719 // indirect k8s.io/klog v0.3.1 // indirect k8s.io/utils v0.0.0-20190221042446-c2654d5206da // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/idl/pbpod/pod.proto b/idl/pbpod/pod.proto index 84af7d83..e061f6f1 100644 --- a/idl/pbpod/pod.proto +++ b/idl/pbpod/pod.proto @@ -75,6 +75,61 @@ message CreatePodResp { string request_id = 3; } +message DeletePodReq { + // 云类型 + pbtenant.CloudProvider provider = 1; + // 账号名称 + string account_name = 2; + // 实例名称 + string pod_name = 3; + //namespace + string namespace = 4; + // 地域,数据中心 + int32 region_id = 5; +} + +message DeletePodResp { + // Pod集合 + repeated PodInstance pods = 1; + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + bool finished = 2; + // 请求id,出现问题后提供给云厂商,排查问题 + string request_id = 3; +} + +message UpdatePodReq { + // 云类型 + pbtenant.CloudProvider provider = 1; + // 账号名称 + string account_name = 2; + // 实例名称 + string pod_name = 3; + //namespace + string namespace = 4; + // 地域,数据中心 + int32 region_id = 5; + // 镜像 + string container_image = 6; + // 容器名称 + string container_name = 7; + // v cpu数 + string cpu_pod = 8; + // 内存MB + string memory_pod = 9; + // 重启策略 + string restart_policy = 10; + // labels + string labels = 11; +} + +message UpdatePodResp { + // Pod集合 + PodInstance pod = 1; + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + bool finished = 2; + // 请求id,出现问题后提供给云厂商,排查问题 + string request_id = 3; +} message ListPodDetailReq { // 云名称 @@ -138,6 +193,21 @@ service PodService { }; } + // 删除Pod + rpc DeletePod(DeletePodReq) returns (DeletePodResp) { + option (google.api.http) = { + post : "/apis/pod/delete/{namespace}/{pod_name}" + body : "*" + }; + } + + // 更新Pod + rpc UpdatePod(UpdatePodReq) returns (UpdatePodResp) { + option (google.api.http) = { + put : "/apis/pod/{namespace}/{pod_name}" + body : "*" + }; + } // 查询Pod明细 rpc ListPodDetail(ListPodDetailReq) returns (ListPodDetailResp) { diff --git a/idl/pbtenant/tenant.proto b/idl/pbtenant/tenant.proto index 2087cef8..5160e3ff 100644 --- a/idl/pbtenant/tenant.proto +++ b/idl/pbtenant/tenant.proto @@ -106,24 +106,24 @@ enum TencentRegionId { // 华为云区域,需要将对应的 _ 转化为 - enum HuaweiRegionId { hw_all = 0; - hw_cn_north_1 = 1; - hw_cn_north_4 = 2; - hw_cn_south_1 = 3; - hw_cn_east_2 = 4; - hw_cn_east_3 = 5; - hw_cn_southwest_2 = 6; - hw_ap_southeast_1 = 7; - hw_ap_southeast_2 = 8; - hw_ap_southeast_3 = 9; - hw_af_south_1 = 10; - hw_cn_south_2 = 11; + hw_cn_north_1 = 1; // 华北-北京一 + hw_cn_north_4 = 2; // 华北-北京四 + hw_cn_south_1 = 3; // 华南-广州 + hw_cn_east_2 = 4; // 华东-上海二 + hw_cn_east_3 = 5; // 华东-上海一 + hw_cn_southwest_2 = 6; // 西南-贵阳一 + hw_ap_southeast_1 = 7; // 中国-香港 + hw_ap_southeast_2 = 8; // 亚太-曼谷 + hw_ap_southeast_3 = 9; // 亚太-新加坡 + hw_af_south_1 = 10; //非洲-约翰内斯堡 + hw_cn_south_2 = 11; // 华南-深圳 } // 亚马逊云区域,需要将对应的 _ 转化为 - enum AwsRegionId { aws_all = 0; aws_us_east_2 = 1; // US East (Ohio) - aws_us_east_1 = 2; // US East (N. Virginia) + aws_us_east_1 = 2; // US East (N. Virginia) aws_us_west_1 = 3; // US West (N. California) aws_us_west_2 = 4; // US West (Oregon) aws_af_south_1 = 5; // Africa (Cape Town) diff --git a/lan_trans/idl/pbpod/pod.pb.go b/lan_trans/idl/pbpod/pod.pb.go index fd7e4f29..4d67715d 100644 --- a/lan_trans/idl/pbpod/pod.pb.go +++ b/lan_trans/idl/pbpod/pod.pb.go @@ -400,6 +400,360 @@ func (x *CreatePodResp) GetRequestId() string { return "" } +type DeletePodReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云类型 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账号名称 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 实例名称 + PodName string `protobuf:"bytes,3,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` + //namespace + Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` + // 地域,数据中心 + RegionId int32 `protobuf:"varint,5,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` +} + +func (x *DeletePodReq) Reset() { + *x = DeletePodReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletePodReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePodReq) ProtoMessage() {} + +func (x *DeletePodReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePodReq.ProtoReflect.Descriptor instead. +func (*DeletePodReq) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{3} +} + +func (x *DeletePodReq) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *DeletePodReq) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *DeletePodReq) GetPodName() string { + if x != nil { + return x.PodName + } + return "" +} + +func (x *DeletePodReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeletePodReq) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +type DeletePodResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pod集合 + Pods []*PodInstance `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"` + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` + // 请求id,出现问题后提供给云厂商,排查问题 + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeletePodResp) Reset() { + *x = DeletePodResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletePodResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePodResp) ProtoMessage() {} + +func (x *DeletePodResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePodResp.ProtoReflect.Descriptor instead. +func (*DeletePodResp) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{4} +} + +func (x *DeletePodResp) GetPods() []*PodInstance { + if x != nil { + return x.Pods + } + return nil +} + +func (x *DeletePodResp) GetFinished() bool { + if x != nil { + return x.Finished + } + return false +} + +func (x *DeletePodResp) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type UpdatePodReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云类型 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账号名称 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 实例名称 + PodName string `protobuf:"bytes,3,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` + //namespace + Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` + // 地域,数据中心 + RegionId int32 `protobuf:"varint,5,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + // 镜像 + ContainerImage string `protobuf:"bytes,6,opt,name=container_image,json=containerImage,proto3" json:"container_image,omitempty"` + // 容器名称 + ContainerName string `protobuf:"bytes,7,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"` + // v cpu数 + CpuPod string `protobuf:"bytes,8,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"` + // 内存MB + MemoryPod string `protobuf:"bytes,9,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"` + // 重启策略 + RestartPolicy string `protobuf:"bytes,10,opt,name=restart_policy,json=restartPolicy,proto3" json:"restart_policy,omitempty"` + // labels + Labels string `protobuf:"bytes,11,opt,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *UpdatePodReq) Reset() { + *x = UpdatePodReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePodReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePodReq) ProtoMessage() {} + +func (x *UpdatePodReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePodReq.ProtoReflect.Descriptor instead. +func (*UpdatePodReq) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdatePodReq) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *UpdatePodReq) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *UpdatePodReq) GetPodName() string { + if x != nil { + return x.PodName + } + return "" +} + +func (x *UpdatePodReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdatePodReq) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *UpdatePodReq) GetContainerImage() string { + if x != nil { + return x.ContainerImage + } + return "" +} + +func (x *UpdatePodReq) GetContainerName() string { + if x != nil { + return x.ContainerName + } + return "" +} + +func (x *UpdatePodReq) GetCpuPod() string { + if x != nil { + return x.CpuPod + } + return "" +} + +func (x *UpdatePodReq) GetMemoryPod() string { + if x != nil { + return x.MemoryPod + } + return "" +} + +func (x *UpdatePodReq) GetRestartPolicy() string { + if x != nil { + return x.RestartPolicy + } + return "" +} + +func (x *UpdatePodReq) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +type UpdatePodResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pod集合 + Pod *PodInstance `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"` + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` + // 请求id,出现问题后提供给云厂商,排查问题 + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *UpdatePodResp) Reset() { + *x = UpdatePodResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePodResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePodResp) ProtoMessage() {} + +func (x *UpdatePodResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePodResp.ProtoReflect.Descriptor instead. +func (*UpdatePodResp) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdatePodResp) GetPod() *PodInstance { + if x != nil { + return x.Pod + } + return nil +} + +func (x *UpdatePodResp) GetFinished() bool { + if x != nil { + return x.Finished + } + return false +} + +func (x *UpdatePodResp) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + type ListPodDetailReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -426,7 +780,7 @@ type ListPodDetailReq struct { func (x *ListPodDetailReq) Reset() { *x = ListPodDetailReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[3] + mi := &file_idl_pbpod_pod_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -439,7 +793,7 @@ func (x *ListPodDetailReq) String() string { func (*ListPodDetailReq) ProtoMessage() {} func (x *ListPodDetailReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[3] + mi := &file_idl_pbpod_pod_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -452,7 +806,7 @@ func (x *ListPodDetailReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPodDetailReq.ProtoReflect.Descriptor instead. func (*ListPodDetailReq) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{3} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{7} } func (x *ListPodDetailReq) GetProvider() pbtenant.CloudProvider { @@ -533,7 +887,7 @@ type ListPodDetailResp struct { func (x *ListPodDetailResp) Reset() { *x = ListPodDetailResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[4] + mi := &file_idl_pbpod_pod_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -546,7 +900,7 @@ func (x *ListPodDetailResp) String() string { func (*ListPodDetailResp) ProtoMessage() {} func (x *ListPodDetailResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[4] + mi := &file_idl_pbpod_pod_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -559,7 +913,7 @@ func (x *ListPodDetailResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPodDetailResp.ProtoReflect.Descriptor instead. func (*ListPodDetailResp) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{4} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{8} } func (x *ListPodDetailResp) GetPods() []*PodInstance { @@ -616,7 +970,7 @@ type ListPodReq struct { func (x *ListPodReq) Reset() { *x = ListPodReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[5] + mi := &file_idl_pbpod_pod_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -629,7 +983,7 @@ func (x *ListPodReq) String() string { func (*ListPodReq) ProtoMessage() {} func (x *ListPodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[5] + mi := &file_idl_pbpod_pod_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -642,7 +996,7 @@ func (x *ListPodReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPodReq.ProtoReflect.Descriptor instead. func (*ListPodReq) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{5} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{9} } func (x *ListPodReq) GetProvider() pbtenant.CloudProvider { @@ -664,7 +1018,7 @@ type ListPodResp struct { func (x *ListPodResp) Reset() { *x = ListPodResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[6] + mi := &file_idl_pbpod_pod_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -677,7 +1031,7 @@ func (x *ListPodResp) String() string { func (*ListPodResp) ProtoMessage() {} func (x *ListPodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[6] + mi := &file_idl_pbpod_pod_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -690,7 +1044,7 @@ func (x *ListPodResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPodResp.ProtoReflect.Descriptor instead. func (*ListPodResp) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{6} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{10} } func (x *ListPodResp) GetPods() []*PodInstance { @@ -709,7 +1063,7 @@ type ListPodAllReq struct { func (x *ListPodAllReq) Reset() { *x = ListPodAllReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[7] + mi := &file_idl_pbpod_pod_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -722,7 +1076,7 @@ func (x *ListPodAllReq) String() string { func (*ListPodAllReq) ProtoMessage() {} func (x *ListPodAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[7] + mi := &file_idl_pbpod_pod_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -735,7 +1089,7 @@ func (x *ListPodAllReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPodAllReq.ProtoReflect.Descriptor instead. func (*ListPodAllReq) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{7} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{11} } var File_idl_pbpod_pod_proto protoreflect.FileDescriptor @@ -809,72 +1163,136 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{ 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, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x64, 0x22, 0x99, 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, 0x15, - 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 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, 0x05, 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, 0x06, 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, 0x07, 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, - 0x08, 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, 0x41, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, - 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x73, 0x74, 0x49, 0x64, 0x22, 0xbc, 0x01, 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, 0x19, 0x0a, + 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 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, 0x04, 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, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x72, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 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, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x83, 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, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 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, 0x04, 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, 0x05, 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, 0x06, 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, 0x07, 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, 0x08, 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, 0x09, 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, 0x0a, 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, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x70, 0x0a, + 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, + 0x0a, 0x03, 0x70, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, + 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x03, 0x70, 0x6f, 0x64, 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, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, + 0x99, 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, 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, 0x0f, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, - 0x71, 0x32, 0xdc, 0x02, 0x0a, 0x0a, 0x50, 0x6f, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x53, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x12, 0x13, 0x2e, + 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, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x04, 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, + 0x05, 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, 0x06, + 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, 0x07, 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, 0x08, 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, 0x41, 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, 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, 0x0f, 0x0a, 0x0d, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x32, 0xad, 0x04, 0x0a, + 0x0a, 0x50, 0x6f, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 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, 0x5f, 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, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x74, - 0x61, 0x69, 0x6c, 0x3a, 0x01, 0x2a, 0x12, 0x46, 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, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, - 0x22, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x50, - 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, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x61, 0x6c, 0x6c, 0x3a, 0x01, 0x2a, - 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, - 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 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, + 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, 0x6a, 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, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, + 0x22, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, + 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x63, 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, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x1a, 0x20, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, + 0x2a, 0x12, 0x5f, 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, + 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 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, 0x74, 0x61, 0x69, 0x6c, 0x3a, + 0x01, 0x2a, 0x12, 0x46, 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, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x09, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x50, 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, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x61, 0x6c, 0x6c, 0x3a, 0x01, 0x2a, 0x42, 0x2d, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, + 0x43, 0x43, 0x45, 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 ( @@ -889,39 +1307,51 @@ func file_idl_pbpod_pod_proto_rawDescGZIP() []byte { return file_idl_pbpod_pod_proto_rawDescData } -var file_idl_pbpod_pod_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_idl_pbpod_pod_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_idl_pbpod_pod_proto_goTypes = []interface{}{ (*PodInstance)(nil), // 0: pbpod.PodInstance (*CreatePodReq)(nil), // 1: pbpod.CreatePodReq (*CreatePodResp)(nil), // 2: pbpod.CreatePodResp - (*ListPodDetailReq)(nil), // 3: pbpod.ListPodDetailReq - (*ListPodDetailResp)(nil), // 4: pbpod.ListPodDetailResp - (*ListPodReq)(nil), // 5: pbpod.ListPodReq - (*ListPodResp)(nil), // 6: pbpod.ListPodResp - (*ListPodAllReq)(nil), // 7: pbpod.ListPodAllReq - (pbtenant.CloudProvider)(0), // 8: pbtenant.CloudProvider + (*DeletePodReq)(nil), // 3: pbpod.DeletePodReq + (*DeletePodResp)(nil), // 4: pbpod.DeletePodResp + (*UpdatePodReq)(nil), // 5: pbpod.UpdatePodReq + (*UpdatePodResp)(nil), // 6: pbpod.UpdatePodResp + (*ListPodDetailReq)(nil), // 7: pbpod.ListPodDetailReq + (*ListPodDetailResp)(nil), // 8: pbpod.ListPodDetailResp + (*ListPodReq)(nil), // 9: pbpod.ListPodReq + (*ListPodResp)(nil), // 10: pbpod.ListPodResp + (*ListPodAllReq)(nil), // 11: pbpod.ListPodAllReq + (pbtenant.CloudProvider)(0), // 12: pbtenant.CloudProvider } var file_idl_pbpod_pod_proto_depIdxs = []int32{ - 8, // 0: pbpod.PodInstance.provider:type_name -> pbtenant.CloudProvider - 8, // 1: pbpod.CreatePodReq.provider:type_name -> pbtenant.CloudProvider + 12, // 0: pbpod.PodInstance.provider:type_name -> pbtenant.CloudProvider + 12, // 1: pbpod.CreatePodReq.provider:type_name -> pbtenant.CloudProvider 0, // 2: pbpod.CreatePodResp.pods:type_name -> pbpod.PodInstance - 8, // 3: pbpod.ListPodDetailReq.provider:type_name -> pbtenant.CloudProvider - 0, // 4: pbpod.ListPodDetailResp.pods:type_name -> pbpod.PodInstance - 8, // 5: pbpod.ListPodReq.provider:type_name -> pbtenant.CloudProvider - 0, // 6: pbpod.ListPodResp.pods:type_name -> pbpod.PodInstance - 1, // 7: pbpod.PodService.CreatePod:input_type -> pbpod.CreatePodReq - 3, // 8: pbpod.PodService.ListPodDetail:input_type -> pbpod.ListPodDetailReq - 5, // 9: pbpod.PodService.ListPod:input_type -> pbpod.ListPodReq - 7, // 10: pbpod.PodService.ListPodAll:input_type -> pbpod.ListPodAllReq - 2, // 11: pbpod.PodService.CreatePod:output_type -> pbpod.CreatePodResp - 4, // 12: pbpod.PodService.ListPodDetail:output_type -> pbpod.ListPodDetailResp - 6, // 13: pbpod.PodService.ListPod:output_type -> pbpod.ListPodResp - 6, // 14: pbpod.PodService.ListPodAll:output_type -> pbpod.ListPodResp - 11, // [11:15] is the sub-list for method output_type - 7, // [7:11] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 12, // 3: pbpod.DeletePodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 4: pbpod.DeletePodResp.pods:type_name -> pbpod.PodInstance + 12, // 5: pbpod.UpdatePodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 6: pbpod.UpdatePodResp.pod:type_name -> pbpod.PodInstance + 12, // 7: pbpod.ListPodDetailReq.provider:type_name -> pbtenant.CloudProvider + 0, // 8: pbpod.ListPodDetailResp.pods:type_name -> pbpod.PodInstance + 12, // 9: pbpod.ListPodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 10: pbpod.ListPodResp.pods:type_name -> pbpod.PodInstance + 1, // 11: pbpod.PodService.CreatePod:input_type -> pbpod.CreatePodReq + 3, // 12: pbpod.PodService.DeletePod:input_type -> pbpod.DeletePodReq + 5, // 13: pbpod.PodService.UpdatePod:input_type -> pbpod.UpdatePodReq + 7, // 14: pbpod.PodService.ListPodDetail:input_type -> pbpod.ListPodDetailReq + 9, // 15: pbpod.PodService.ListPod:input_type -> pbpod.ListPodReq + 11, // 16: pbpod.PodService.ListPodAll:input_type -> pbpod.ListPodAllReq + 2, // 17: pbpod.PodService.CreatePod:output_type -> pbpod.CreatePodResp + 4, // 18: pbpod.PodService.DeletePod:output_type -> pbpod.DeletePodResp + 6, // 19: pbpod.PodService.UpdatePod:output_type -> pbpod.UpdatePodResp + 8, // 20: pbpod.PodService.ListPodDetail:output_type -> pbpod.ListPodDetailResp + 10, // 21: pbpod.PodService.ListPod:output_type -> pbpod.ListPodResp + 10, // 22: pbpod.PodService.ListPodAll:output_type -> pbpod.ListPodResp + 17, // [17:23] is the sub-list for method output_type + 11, // [11:17] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_idl_pbpod_pod_proto_init() } @@ -967,7 +1397,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodDetailReq); i { + switch v := v.(*DeletePodReq); i { case 0: return &v.state case 1: @@ -979,7 +1409,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodDetailResp); i { + switch v := v.(*DeletePodResp); i { case 0: return &v.state case 1: @@ -991,7 +1421,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodReq); i { + switch v := v.(*UpdatePodReq); i { case 0: return &v.state case 1: @@ -1003,7 +1433,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodResp); i { + switch v := v.(*UpdatePodResp); i { case 0: return &v.state case 1: @@ -1015,6 +1445,54 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPodDetailReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbpod_pod_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPodDetailResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbpod_pod_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPodReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbpod_pod_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPodResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbpod_pod_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPodAllReq); i { case 0: return &v.state @@ -1033,7 +1511,7 @@ func file_idl_pbpod_pod_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_pbpod_pod_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/lan_trans/idl/pbpod/pod.pb.gw.go b/lan_trans/idl/pbpod/pod.pb.gw.go index 7cb8d249..b49553fb 100644 --- a/lan_trans/idl/pbpod/pod.pb.gw.go +++ b/lan_trans/idl/pbpod/pod.pb.gw.go @@ -65,6 +65,182 @@ func local_request_PodService_CreatePod_0(ctx context.Context, marshaler runtime } +func request_PodService_DeletePod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePodReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["pod_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pod_name") + } + + protoReq.PodName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pod_name", err) + } + + msg, err := client.DeletePod(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PodService_DeletePod_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePodReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["pod_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pod_name") + } + + protoReq.PodName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pod_name", err) + } + + msg, err := server.DeletePod(ctx, &protoReq) + return msg, metadata, err + +} + +func request_PodService_UpdatePod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePodReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["pod_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pod_name") + } + + protoReq.PodName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pod_name", err) + } + + msg, err := client.UpdatePod(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PodService_UpdatePod_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePodReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["pod_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pod_name") + } + + protoReq.PodName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pod_name", err) + } + + msg, err := server.UpdatePod(ctx, &protoReq) + return msg, metadata, err + +} + func request_PodService_ListPodDetail_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListPodDetailReq var metadata runtime.ServerMetadata @@ -196,6 +372,52 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_PodService_DeletePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PodService_DeletePod_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PodService_DeletePod_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_PodService_UpdatePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PodService_UpdatePod_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PodService_UpdatePod_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_PodService_ListPodDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -326,6 +548,46 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_PodService_DeletePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PodService_DeletePod_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PodService_DeletePod_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_PodService_UpdatePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PodService_UpdatePod_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PodService_UpdatePod_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_PodService_ListPodDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -392,6 +654,10 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, var ( pattern_PodService_CreatePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "create"}, "")) + pattern_PodService_DeletePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "pod", "delete", "namespace", "pod_name"}, "")) + + pattern_PodService_UpdatePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "pod", "namespace", "pod_name"}, "")) + pattern_PodService_ListPodDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "detail"}, "")) pattern_PodService_ListPod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"apis", "pod"}, "")) @@ -402,6 +668,10 @@ var ( var ( forward_PodService_CreatePod_0 = runtime.ForwardResponseMessage + forward_PodService_DeletePod_0 = runtime.ForwardResponseMessage + + forward_PodService_UpdatePod_0 = runtime.ForwardResponseMessage + forward_PodService_ListPodDetail_0 = runtime.ForwardResponseMessage forward_PodService_ListPod_0 = runtime.ForwardResponseMessage diff --git a/lan_trans/idl/pbpod/pod_grpc.pb.go b/lan_trans/idl/pbpod/pod_grpc.pb.go index f68f345a..1e74f9b4 100644 --- a/lan_trans/idl/pbpod/pod_grpc.pb.go +++ b/lan_trans/idl/pbpod/pod_grpc.pb.go @@ -24,6 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 type PodServiceClient interface { // 创建Pod CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error) + // 删除Pod + DeletePod(ctx context.Context, in *DeletePodReq, opts ...grpc.CallOption) (*DeletePodResp, error) + // 更新Pod + UpdatePod(ctx context.Context, in *UpdatePodReq, opts ...grpc.CallOption) (*UpdatePodResp, error) // 查询Pod明细 ListPodDetail(ctx context.Context, in *ListPodDetailReq, opts ...grpc.CallOption) (*ListPodDetailResp, error) // 查询Pod全量 - 根据云类型 @@ -49,6 +53,24 @@ func (c *podServiceClient) CreatePod(ctx context.Context, in *CreatePodReq, opts return out, nil } +func (c *podServiceClient) DeletePod(ctx context.Context, in *DeletePodReq, opts ...grpc.CallOption) (*DeletePodResp, error) { + out := new(DeletePodResp) + err := c.cc.Invoke(ctx, "/pbpod.PodService/DeletePod", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *podServiceClient) UpdatePod(ctx context.Context, in *UpdatePodReq, opts ...grpc.CallOption) (*UpdatePodResp, error) { + out := new(UpdatePodResp) + err := c.cc.Invoke(ctx, "/pbpod.PodService/UpdatePod", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *podServiceClient) ListPodDetail(ctx context.Context, in *ListPodDetailReq, opts ...grpc.CallOption) (*ListPodDetailResp, error) { out := new(ListPodDetailResp) err := c.cc.Invoke(ctx, "/pbpod.PodService/ListPodDetail", in, out, opts...) @@ -82,6 +104,10 @@ func (c *podServiceClient) ListPodAll(ctx context.Context, in *ListPodAllReq, op type PodServiceServer interface { // 创建Pod CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error) + // 删除Pod + DeletePod(context.Context, *DeletePodReq) (*DeletePodResp, error) + // 更新Pod + UpdatePod(context.Context, *UpdatePodReq) (*UpdatePodResp, error) // 查询Pod明细 ListPodDetail(context.Context, *ListPodDetailReq) (*ListPodDetailResp, error) // 查询Pod全量 - 根据云类型 @@ -98,6 +124,12 @@ type UnimplementedPodServiceServer struct { func (UnimplementedPodServiceServer) CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePod not implemented") } +func (UnimplementedPodServiceServer) DeletePod(context.Context, *DeletePodReq) (*DeletePodResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePod not implemented") +} +func (UnimplementedPodServiceServer) UpdatePod(context.Context, *UpdatePodReq) (*UpdatePodResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePod not implemented") +} func (UnimplementedPodServiceServer) ListPodDetail(context.Context, *ListPodDetailReq) (*ListPodDetailResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPodDetail not implemented") } @@ -138,6 +170,42 @@ func _PodService_CreatePod_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _PodService_DeletePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePodReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PodServiceServer).DeletePod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbpod.PodService/DeletePod", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PodServiceServer).DeletePod(ctx, req.(*DeletePodReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _PodService_UpdatePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePodReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PodServiceServer).UpdatePod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbpod.PodService/UpdatePod", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PodServiceServer).UpdatePod(ctx, req.(*UpdatePodReq)) + } + return interceptor(ctx, in, info, handler) +} + func _PodService_ListPodDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListPodDetailReq) if err := dec(in); err != nil { @@ -203,6 +271,14 @@ var PodService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreatePod", Handler: _PodService_CreatePod_Handler, }, + { + MethodName: "DeletePod", + Handler: _PodService_DeletePod_Handler, + }, + { + MethodName: "UpdatePod", + Handler: _PodService_UpdatePod_Handler, + }, { MethodName: "ListPodDetail", Handler: _PodService_ListPodDetail_Handler, diff --git a/lan_trans/idl/pbtenant/tenant.pb.go b/lan_trans/idl/pbtenant/tenant.pb.go index 93a05d1e..83b98a29 100644 --- a/lan_trans/idl/pbtenant/tenant.pb.go +++ b/lan_trans/idl/pbtenant/tenant.pb.go @@ -363,17 +363,17 @@ type HuaweiRegionId int32 const ( HuaweiRegionId_hw_all HuaweiRegionId = 0 - HuaweiRegionId_hw_cn_north_1 HuaweiRegionId = 1 - HuaweiRegionId_hw_cn_north_4 HuaweiRegionId = 2 - HuaweiRegionId_hw_cn_south_1 HuaweiRegionId = 3 - HuaweiRegionId_hw_cn_east_2 HuaweiRegionId = 4 - HuaweiRegionId_hw_cn_east_3 HuaweiRegionId = 5 - HuaweiRegionId_hw_cn_southwest_2 HuaweiRegionId = 6 - HuaweiRegionId_hw_ap_southeast_1 HuaweiRegionId = 7 - HuaweiRegionId_hw_ap_southeast_2 HuaweiRegionId = 8 - HuaweiRegionId_hw_ap_southeast_3 HuaweiRegionId = 9 - HuaweiRegionId_hw_af_south_1 HuaweiRegionId = 10 - HuaweiRegionId_hw_cn_south_2 HuaweiRegionId = 11 + HuaweiRegionId_hw_cn_north_1 HuaweiRegionId = 1 // 华北-北京一 + HuaweiRegionId_hw_cn_north_4 HuaweiRegionId = 2 // 华北-北京四 + HuaweiRegionId_hw_cn_south_1 HuaweiRegionId = 3 // 华南-广州 + HuaweiRegionId_hw_cn_east_2 HuaweiRegionId = 4 // 华东-上海二 + HuaweiRegionId_hw_cn_east_3 HuaweiRegionId = 5 // 华东-上海一 + HuaweiRegionId_hw_cn_southwest_2 HuaweiRegionId = 6 // 西南-贵阳一 + HuaweiRegionId_hw_ap_southeast_1 HuaweiRegionId = 7 // 中国-香港 + HuaweiRegionId_hw_ap_southeast_2 HuaweiRegionId = 8 // 亚太-曼谷 + HuaweiRegionId_hw_ap_southeast_3 HuaweiRegionId = 9 // 亚太-新加坡 + HuaweiRegionId_hw_af_south_1 HuaweiRegionId = 10 //非洲-约翰内斯堡 + HuaweiRegionId_hw_cn_south_2 HuaweiRegionId = 11 // 华南-深圳 ) // Enum value maps for HuaweiRegionId. diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index 405fdec0..76d329c6 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -115,6 +115,53 @@ ] } }, + "/apis/pod/delete/{namespace}/{podName}": { + "post": { + "summary": "删除Pod", + "operationId": "PodService_DeletePod", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbpodDeletePodResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "podName", + "description": "实例名称", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/pbpodDeletePodReq" + } + } + ], + "tags": [ + "PodService" + ] + } + }, "/apis/pod/detail": { "post": { "summary": "查询Pod明细", @@ -147,6 +194,53 @@ "PodService" ] } + }, + "/apis/pod/{namespace}/{podName}": { + "put": { + "summary": "更新Pod", + "operationId": "PodService_UpdatePod", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbpodUpdatePodResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "podName", + "description": "实例名称", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/pbpodUpdatePodReq" + } + } + ], + "tags": [ + "PodService" + ] + } } }, "definitions": { @@ -228,6 +322,52 @@ } } }, + "pbpodDeletePodReq": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云类型" + }, + "accountName": { + "type": "string", + "title": "账号名称" + }, + "podName": { + "type": "string", + "title": "实例名称" + }, + "namespace": { + "type": "string", + "title": "namespace" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "地域,数据中心" + } + } + }, + "pbpodDeletePodResp": { + "type": "object", + "properties": { + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/pbpodPodInstance" + }, + "title": "Pod集合" + }, + "finished": { + "type": "boolean", + "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" + }, + "requestId": { + "type": "string", + "title": "请求id,出现问题后提供给云厂商,排查问题" + } + } + }, "pbpodListPodAllReq": { "type": "object" }, @@ -385,6 +525,73 @@ } } }, + "pbpodUpdatePodReq": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云类型" + }, + "accountName": { + "type": "string", + "title": "账号名称" + }, + "podName": { + "type": "string", + "title": "实例名称" + }, + "namespace": { + "type": "string", + "title": "namespace" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "地域,数据中心" + }, + "containerImage": { + "type": "string", + "title": "镜像" + }, + "containerName": { + "type": "string", + "title": "容器名称" + }, + "cpuPod": { + "type": "string", + "title": "v cpu数" + }, + "memoryPod": { + "type": "string", + "title": "内存MB" + }, + "restartPolicy": { + "type": "string", + "title": "重启策略" + }, + "labels": { + "type": "string", + "title": "labels" + } + } + }, + "pbpodUpdatePodResp": { + "type": "object", + "properties": { + "pod": { + "$ref": "#/definitions/pbpodPodInstance", + "title": "Pod集合" + }, + "finished": { + "type": "boolean", + "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" + }, + "requestId": { + "type": "string", + "title": "请求id,出现问题后提供给云厂商,排查问题" + } + } + }, "pbtenantCloudProvider": { "type": "string", "enum": [