From 73c9de7e8a342c95bbde5393bef0aeb38534482f Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Fri, 8 Apr 2022 16:09:20 +0800 Subject: [PATCH 1/6] Create Pod on multiple cloud Signed-off-by: zhouqunjie <450705171@qq.com> --- adaptor/pod_adaptor/server/pod/list.go | 23 +++ common/server/server_pod.go | 9 ++ idl/pbpod/pod.proto | 22 +++ lan_trans/idl/demo/demo.pb.gw.go | 10 +- lan_trans/idl/pbecs/ecs.pb.gw.go | 30 ++-- lan_trans/idl/pbpod/pod.pb.gw.go | 145 +++++++++++++++--- lan_trans/idl/pbpod/pod_grpc.pb.go | 38 +++++ .../openapiv2/idl/demo/demo.swagger.json | 9 +- .../openapiv2/idl/pbecs/ecs.swagger.json | 9 +- .../openapiv2/idl/pbpod/pod.swagger.json | 97 ++++++++++-- .../idl/pbtenant/tenant.swagger.json | 9 +- 11 files changed, 326 insertions(+), 75 deletions(-) diff --git a/adaptor/pod_adaptor/server/pod/list.go b/adaptor/pod_adaptor/server/pod/list.go index dd9b4414..c5338c14 100644 --- a/adaptor/pod_adaptor/server/pod/list.go +++ b/adaptor/pod_adaptor/server/pod/list.go @@ -13,6 +13,29 @@ import ( "github.com/pkg/errors" ) +func CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbpod.CreatePodsResp, error) { + var ( + pods []*pbpod.PodInstance + requestIds []string + ) + for k := range req.CreatePodReq { + resp, _ := CreatePod(ctx, req.CreatePodReq[k]) + pods[k] = resp.Pods[0] + requestIds[k] = resp.RequestId + } + + isFinished := false + if len(pods) > 0 { + isFinished = true + } + + return &pbpod.CreatePodsResp{ + Pods: pods, + Finished: isFinished, + RequestId: requestIds, + }, nil +} + func CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { var ( pod poder.Poder diff --git a/common/server/server_pod.go b/common/server/server_pod.go index dcb19966..f180983c 100644 --- a/common/server/server_pod.go +++ b/common/server/server_pod.go @@ -11,6 +11,15 @@ import ( "google.golang.org/grpc/status" ) +func (s *Server) CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbpod.CreatePodsResp, error) { + resp, err := pod.CreatePods(ctx, req) + if err != nil { + glog.Errorf("CreatePods error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + func (s *Server) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { resp, err := pod.CreatePod(ctx, req) if err != nil { diff --git a/idl/pbpod/pod.proto b/idl/pbpod/pod.proto index 3fb33404..07ddabe5 100644 --- a/idl/pbpod/pod.proto +++ b/idl/pbpod/pod.proto @@ -40,6 +40,20 @@ message PodInstance { } +message CreatePodsReq { + // 云类型 + repeated CreatePodReq createPodReq = 1; +} + +message CreatePodsResp { + // Pod集合 + repeated PodInstance pods = 1; + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + bool finished = 2; + // 请求id,出现问题后提供给云厂商,排查问题 + repeated string request_id = 3; +} + message CreatePodReq { // 云类型 pbtenant.CloudProvider provider = 1; @@ -194,6 +208,14 @@ message ListPodAllReq{} service PodService { + // 创建Pods + rpc CreatePods(CreatePodsReq) returns (CreatePodsResp) { + option (google.api.http) = { + post : "/apis/pod/createMulti" + body : "*" + }; + } + // 创建Pod rpc CreatePod(CreatePodReq) returns (CreatePodResp) { option (google.api.http) = { diff --git a/lan_trans/idl/demo/demo.pb.gw.go b/lan_trans/idl/demo/demo.pb.gw.go index 66ed1dcd..5fedd6b4 100644 --- a/lan_trans/idl/demo/demo.pb.gw.go +++ b/lan_trans/idl/demo/demo.pb.gw.go @@ -77,12 +77,13 @@ func RegisterDemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DemoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DemoService_Echo_0(ctx, 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 { @@ -139,12 +140,13 @@ func RegisterDemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DemoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DemoService_Echo_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/idl/pbecs/ecs.pb.gw.go b/lan_trans/idl/pbecs/ecs.pb.gw.go index 95d63554..425292e0 100644 --- a/lan_trans/idl/pbecs/ecs.pb.gw.go +++ b/lan_trans/idl/pbecs/ecs.pb.gw.go @@ -145,12 +145,13 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcsDetail_0(ctx, 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 { @@ -168,12 +169,13 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcs") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcs_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcs_0(ctx, 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 { @@ -191,12 +193,13 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcsAll_0(ctx, 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 { @@ -253,12 +256,13 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcsDetail_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -273,12 +277,13 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcs_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcs_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -293,12 +298,13 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcsAll_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/idl/pbpod/pod.pb.gw.go b/lan_trans/idl/pbpod/pod.pb.gw.go index a688fc77..8aed6f35 100644 --- a/lan_trans/idl/pbpod/pod.pb.gw.go +++ b/lan_trans/idl/pbpod/pod.pb.gw.go @@ -31,6 +31,40 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join +func request_PodService_CreatePods_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreatePodsReq + 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) + } + + msg, err := client.CreatePods(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PodService_CreatePods_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreatePodsReq + 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) + } + + msg, err := server.CreatePods(ctx, &protoReq) + return msg, metadata, err + +} + func request_PodService_CreatePod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreatePodReq var metadata runtime.ServerMetadata @@ -229,18 +263,43 @@ func local_request_PodService_ListPodAll_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPodServiceHandlerFromEndpoint instead. func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PodServiceServer) error { + mux.Handle("POST", pattern_PodService_CreatePods_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) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PodService_CreatePods_0(ctx, 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_CreatePods_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_PodService_CreatePod_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/CreatePod") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_CreatePod_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_CreatePod_0(ctx, 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 { @@ -258,12 +317,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, 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") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) 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) + resp, md, err := local_request_PodService_DeletePod_0(ctx, 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 { @@ -281,12 +341,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, 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") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) 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) + resp, md, err := local_request_PodService_UpdatePod_0(ctx, 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 { @@ -304,12 +365,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodDetail_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodDetail_0(ctx, 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 { @@ -327,12 +389,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPod_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPod_0(ctx, 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 { @@ -350,12 +413,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodAll_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodAll_0(ctx, 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 { @@ -408,16 +472,38 @@ func RegisterPodServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // "PodServiceClient" to call the correct interceptors. func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PodServiceClient) error { - mux.Handle("POST", pattern_PodService_CreatePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PodService_CreatePods_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/CreatePod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_CreatePod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_CreatePods_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PodService_CreatePods_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_PodService_CreatePod_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) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PodService_CreatePod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -432,12 +518,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_DeletePod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_DeletePod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -452,12 +539,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_UpdatePod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_UpdatePod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -472,12 +560,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodDetail_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodDetail_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -492,12 +581,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -512,12 +602,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodAll_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodAll_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -532,6 +623,8 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( + pattern_PodService_CreatePods_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "createMulti"}, "")) + 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}, []string{"apis", "pod", "delete"}, "")) @@ -546,6 +639,8 @@ var ( ) var ( + forward_PodService_CreatePods_0 = runtime.ForwardResponseMessage + forward_PodService_CreatePod_0 = runtime.ForwardResponseMessage forward_PodService_DeletePod_0 = runtime.ForwardResponseMessage diff --git a/lan_trans/idl/pbpod/pod_grpc.pb.go b/lan_trans/idl/pbpod/pod_grpc.pb.go index 1e74f9b4..dd11b5bd 100644 --- a/lan_trans/idl/pbpod/pod_grpc.pb.go +++ b/lan_trans/idl/pbpod/pod_grpc.pb.go @@ -22,6 +22,8 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type PodServiceClient interface { + // 创建Pods + CreatePods(ctx context.Context, in *CreatePodsReq, opts ...grpc.CallOption) (*CreatePodsResp, error) // 创建Pod CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error) // 删除Pod @@ -44,6 +46,15 @@ func NewPodServiceClient(cc grpc.ClientConnInterface) PodServiceClient { return &podServiceClient{cc} } +func (c *podServiceClient) CreatePods(ctx context.Context, in *CreatePodsReq, opts ...grpc.CallOption) (*CreatePodsResp, error) { + out := new(CreatePodsResp) + err := c.cc.Invoke(ctx, "/pbpod.PodService/CreatePods", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *podServiceClient) CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error) { out := new(CreatePodResp) err := c.cc.Invoke(ctx, "/pbpod.PodService/CreatePod", in, out, opts...) @@ -102,6 +113,8 @@ func (c *podServiceClient) ListPodAll(ctx context.Context, in *ListPodAllReq, op // All implementations must embed UnimplementedPodServiceServer // for forward compatibility type PodServiceServer interface { + // 创建Pods + CreatePods(context.Context, *CreatePodsReq) (*CreatePodsResp, error) // 创建Pod CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error) // 删除Pod @@ -121,6 +134,9 @@ type PodServiceServer interface { type UnimplementedPodServiceServer struct { } +func (UnimplementedPodServiceServer) CreatePods(context.Context, *CreatePodsReq) (*CreatePodsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePods not implemented") +} func (UnimplementedPodServiceServer) CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePod not implemented") } @@ -152,6 +168,24 @@ func RegisterPodServiceServer(s grpc.ServiceRegistrar, srv PodServiceServer) { s.RegisterService(&PodService_ServiceDesc, srv) } +func _PodService_CreatePods_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePodsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PodServiceServer).CreatePods(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbpod.PodService/CreatePods", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PodServiceServer).CreatePods(ctx, req.(*CreatePodsReq)) + } + return interceptor(ctx, in, info, handler) +} + func _PodService_CreatePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreatePodReq) if err := dec(in); err != nil { @@ -267,6 +301,10 @@ var PodService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbpod.PodService", HandlerType: (*PodServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "CreatePods", + Handler: _PodService_CreatePods_Handler, + }, { MethodName: "CreatePod", Handler: _PodService_CreatePod_Handler, diff --git a/lan_trans/openapiv2/idl/demo/demo.swagger.json b/lan_trans/openapiv2/idl/demo/demo.swagger.json index a969e31b..d7db3be6 100644 --- a/lan_trans/openapiv2/idl/demo/demo.swagger.json +++ b/lan_trans/openapiv2/idl/demo/demo.swagger.json @@ -68,14 +68,11 @@ "protobufAny": { "type": "object", "properties": { - "typeUrl": { + "@type": { "type": "string" - }, - "value": { - "type": "string", - "format": "byte" } - } + }, + "additionalProperties": {} }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json index cba0d0e6..017208a2 100644 --- a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json +++ b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json @@ -303,14 +303,11 @@ "protobufAny": { "type": "object", "properties": { - "typeUrl": { + "@type": { "type": "string" - }, - "value": { - "type": "string", - "format": "byte" } - } + }, + "additionalProperties": {} }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index 56b3588f..8ca8800e 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", "in": "query", "required": false, "type": "string", @@ -111,6 +111,39 @@ ] } }, + "/apis/pod/createMulti": { + "post": { + "summary": "创建Pods", + "operationId": "PodService_CreatePods", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbpodCreatePodsResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/pbpodCreatePodsReq" + } + } + ], + "tags": [ + "PodService" + ] + } + }, "/apis/pod/delete": { "post": { "summary": "删除Pod", @@ -165,7 +198,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", "in": "query", "required": false, "type": "string", @@ -179,14 +212,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域.", + "description": "区域Id,参考 tenant.proto 中的各个云的区域", "in": "query", "required": false, "type": "integer", @@ -194,7 +227,7 @@ }, { "name": "regionName", - "description": "区域名称,各云厂商自定义的region name.", + "description": "区域名称,各云厂商自定义的region name", "in": "query", "required": false, "type": "integer", @@ -202,7 +235,7 @@ }, { "name": "podId", - "description": "podID.", + "description": "podID", "in": "query", "required": false, "type": "integer", @@ -210,7 +243,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码.", + "description": "分页相关参数,页码", "in": "query", "required": false, "type": "integer", @@ -218,7 +251,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量.", + "description": "分页相关参数,每页数量", "in": "query", "required": false, "type": "integer", @@ -226,14 +259,14 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token.", + "description": "分页相关参数,下一页的token", "in": "query", "required": false, "type": "string" }, { "name": "namespace", - "description": "namespace.", + "description": "namespace", "in": "query", "required": false, "type": "string" @@ -357,6 +390,41 @@ } } }, + "pbpodCreatePodsReq": { + "type": "object", + "properties": { + "createPodReq": { + "type": "array", + "items": { + "$ref": "#/definitions/pbpodCreatePodReq" + }, + "title": "云类型" + } + } + }, + "pbpodCreatePodsResp": { + "type": "object", + "properties": { + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/pbpodPodInstance" + }, + "title": "Pod集合" + }, + "finished": { + "type": "boolean", + "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" + }, + "requestId": { + "type": "array", + "items": { + "type": "string" + }, + "title": "请求id,出现问题后提供给云厂商,排查问题" + } + } + }, "pbpodDeletePodReq": { "type": "object", "properties": { @@ -605,14 +673,11 @@ "protobufAny": { "type": "object", "properties": { - "typeUrl": { + "@type": { "type": "string" - }, - "value": { - "type": "string", - "format": "byte" } - } + }, + "additionalProperties": {} }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json b/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json index 636ce737..0a73b355 100644 --- a/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json +++ b/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json @@ -15,14 +15,11 @@ "protobufAny": { "type": "object", "properties": { - "typeUrl": { + "@type": { "type": "string" - }, - "value": { - "type": "string", - "format": "byte" } - } + }, + "additionalProperties": {} }, "rpcStatus": { "type": "object", From 019a9a6e2fb01e08836c6babb681be94a821485b Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Fri, 8 Apr 2022 17:38:00 +0800 Subject: [PATCH 2/6] Create Pod on multiple cloud Signed-off-by: zhouqunjie <450705171@qq.com> --- adaptor/pod_adaptor/server/pod/list.go | 10 +- idl/pbpod/pod.proto | 2 - lan_trans/idl/pbpod/pod.pb.go | 643 +++++++++++------- .../openapiv2/idl/pbpod/pod.swagger.json | 7 - 4 files changed, 401 insertions(+), 261 deletions(-) diff --git a/adaptor/pod_adaptor/server/pod/list.go b/adaptor/pod_adaptor/server/pod/list.go index c5338c14..93a12464 100644 --- a/adaptor/pod_adaptor/server/pod/list.go +++ b/adaptor/pod_adaptor/server/pod/list.go @@ -16,21 +16,21 @@ import ( func CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbpod.CreatePodsResp, error) { var ( pods []*pbpod.PodInstance - requestIds []string + requestIds = make([]string, len(req.CreatePodReq)) ) for k := range req.CreatePodReq { - resp, _ := CreatePod(ctx, req.CreatePodReq[k]) - pods[k] = resp.Pods[0] + resp, err := CreatePod(ctx, req.CreatePodReq[k]) + if err != nil { + return nil, errors.Wrap(err, "Batch pod creation error") + } requestIds[k] = resp.RequestId } - isFinished := false if len(pods) > 0 { isFinished = true } return &pbpod.CreatePodsResp{ - Pods: pods, Finished: isFinished, RequestId: requestIds, }, nil diff --git a/idl/pbpod/pod.proto b/idl/pbpod/pod.proto index 07ddabe5..72ea3ef9 100644 --- a/idl/pbpod/pod.proto +++ b/idl/pbpod/pod.proto @@ -46,8 +46,6 @@ message CreatePodsReq { } message CreatePodsResp { - // Pod集合 - repeated PodInstance pods = 1; // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 bool finished = 2; // 请求id,出现问题后提供给云厂商,排查问题 diff --git a/lan_trans/idl/pbpod/pod.pb.go b/lan_trans/idl/pbpod/pod.pb.go index 1699f9f5..4bb13fc1 100644 --- a/lan_trans/idl/pbpod/pod.pb.go +++ b/lan_trans/idl/pbpod/pod.pb.go @@ -196,6 +196,111 @@ func (x *PodInstance) GetStatus() string { return "" } +type CreatePodsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云类型 + CreatePodReq []*CreatePodReq `protobuf:"bytes,1,rep,name=createPodReq,proto3" json:"createPodReq,omitempty"` +} + +func (x *CreatePodsReq) Reset() { + *x = CreatePodsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatePodsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePodsReq) ProtoMessage() {} + +func (x *CreatePodsReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[1] + 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 CreatePodsReq.ProtoReflect.Descriptor instead. +func (*CreatePodsReq) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{1} +} + +func (x *CreatePodsReq) GetCreatePodReq() []*CreatePodReq { + if x != nil { + return x.CreatePodReq + } + return nil +} + +type CreatePodsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` + // 请求id,出现问题后提供给云厂商,排查问题 + RequestId []string `protobuf:"bytes,3,rep,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreatePodsResp) Reset() { + *x = CreatePodsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatePodsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePodsResp) ProtoMessage() {} + +func (x *CreatePodsResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[2] + 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 CreatePodsResp.ProtoReflect.Descriptor instead. +func (*CreatePodsResp) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{2} +} + +func (x *CreatePodsResp) GetFinished() bool { + if x != nil { + return x.Finished + } + return false +} + +func (x *CreatePodsResp) GetRequestId() []string { + if x != nil { + return x.RequestId + } + return nil +} + type CreatePodReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -232,7 +337,7 @@ type CreatePodReq struct { func (x *CreatePodReq) Reset() { *x = CreatePodReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[1] + mi := &file_idl_pbpod_pod_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -245,7 +350,7 @@ func (x *CreatePodReq) String() string { func (*CreatePodReq) ProtoMessage() {} func (x *CreatePodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[1] + mi := &file_idl_pbpod_pod_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -258,7 +363,7 @@ func (x *CreatePodReq) ProtoReflect() protoreflect.Message { // Deprecated: Use CreatePodReq.ProtoReflect.Descriptor instead. func (*CreatePodReq) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{1} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{3} } func (x *CreatePodReq) GetProvider() pbtenant.CloudProvider { @@ -368,7 +473,7 @@ type CreatePodResp struct { func (x *CreatePodResp) Reset() { *x = CreatePodResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[2] + mi := &file_idl_pbpod_pod_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -381,7 +486,7 @@ func (x *CreatePodResp) String() string { func (*CreatePodResp) ProtoMessage() {} func (x *CreatePodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[2] + mi := &file_idl_pbpod_pod_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -394,7 +499,7 @@ func (x *CreatePodResp) ProtoReflect() protoreflect.Message { // Deprecated: Use CreatePodResp.ProtoReflect.Descriptor instead. func (*CreatePodResp) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{2} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{4} } func (x *CreatePodResp) GetPods() []*PodInstance { @@ -440,7 +545,7 @@ type DeletePodReq struct { func (x *DeletePodReq) Reset() { *x = DeletePodReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[3] + mi := &file_idl_pbpod_pod_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -453,7 +558,7 @@ func (x *DeletePodReq) String() string { func (*DeletePodReq) ProtoMessage() {} func (x *DeletePodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[3] + mi := &file_idl_pbpod_pod_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -466,7 +571,7 @@ func (x *DeletePodReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePodReq.ProtoReflect.Descriptor instead. func (*DeletePodReq) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{3} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{5} } func (x *DeletePodReq) GetProvider() pbtenant.CloudProvider { @@ -527,7 +632,7 @@ type DeletePodResp struct { func (x *DeletePodResp) Reset() { *x = DeletePodResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[4] + mi := &file_idl_pbpod_pod_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -540,7 +645,7 @@ func (x *DeletePodResp) String() string { func (*DeletePodResp) ProtoMessage() {} func (x *DeletePodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[4] + mi := &file_idl_pbpod_pod_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -553,7 +658,7 @@ func (x *DeletePodResp) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePodResp.ProtoReflect.Descriptor instead. func (*DeletePodResp) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{4} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{6} } func (x *DeletePodResp) GetPods() []*PodInstance { @@ -611,7 +716,7 @@ type UpdatePodReq struct { func (x *UpdatePodReq) Reset() { *x = UpdatePodReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[5] + mi := &file_idl_pbpod_pod_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -624,7 +729,7 @@ func (x *UpdatePodReq) String() string { func (*UpdatePodReq) ProtoMessage() {} func (x *UpdatePodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[5] + mi := &file_idl_pbpod_pod_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -637,7 +742,7 @@ func (x *UpdatePodReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdatePodReq.ProtoReflect.Descriptor instead. func (*UpdatePodReq) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{5} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{7} } func (x *UpdatePodReq) GetProvider() pbtenant.CloudProvider { @@ -740,7 +845,7 @@ type UpdatePodResp struct { func (x *UpdatePodResp) Reset() { *x = UpdatePodResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[6] + mi := &file_idl_pbpod_pod_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -753,7 +858,7 @@ func (x *UpdatePodResp) String() string { func (*UpdatePodResp) ProtoMessage() {} func (x *UpdatePodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[6] + mi := &file_idl_pbpod_pod_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -766,7 +871,7 @@ func (x *UpdatePodResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdatePodResp.ProtoReflect.Descriptor instead. func (*UpdatePodResp) Descriptor() ([]byte, []int) { - return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{6} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{8} } func (x *UpdatePodResp) GetPod() *PodInstance { @@ -818,7 +923,7 @@ type ListPodDetailReq struct { func (x *ListPodDetailReq) Reset() { *x = ListPodDetailReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[7] + mi := &file_idl_pbpod_pod_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -831,7 +936,7 @@ func (x *ListPodDetailReq) String() string { func (*ListPodDetailReq) ProtoMessage() {} func (x *ListPodDetailReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[7] + mi := &file_idl_pbpod_pod_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -844,7 +949,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{7} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{9} } func (x *ListPodDetailReq) GetProvider() pbtenant.CloudProvider { @@ -932,7 +1037,7 @@ type ListPodDetailResp struct { func (x *ListPodDetailResp) Reset() { *x = ListPodDetailResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[8] + mi := &file_idl_pbpod_pod_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -945,7 +1050,7 @@ func (x *ListPodDetailResp) String() string { func (*ListPodDetailResp) ProtoMessage() {} func (x *ListPodDetailResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[8] + mi := &file_idl_pbpod_pod_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -958,7 +1063,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{8} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{10} } func (x *ListPodDetailResp) GetPods() []*PodInstance { @@ -1015,7 +1120,7 @@ type ListPodReq struct { func (x *ListPodReq) Reset() { *x = ListPodReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[9] + mi := &file_idl_pbpod_pod_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1028,7 +1133,7 @@ func (x *ListPodReq) String() string { func (*ListPodReq) ProtoMessage() {} func (x *ListPodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[9] + mi := &file_idl_pbpod_pod_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1041,7 +1146,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{9} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{11} } func (x *ListPodReq) GetProvider() pbtenant.CloudProvider { @@ -1063,7 +1168,7 @@ type ListPodResp struct { func (x *ListPodResp) Reset() { *x = ListPodResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[10] + mi := &file_idl_pbpod_pod_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1076,7 +1181,7 @@ func (x *ListPodResp) String() string { func (*ListPodResp) ProtoMessage() {} func (x *ListPodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[10] + mi := &file_idl_pbpod_pod_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1089,7 +1194,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{10} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{12} } func (x *ListPodResp) GetPods() []*PodInstance { @@ -1108,7 +1213,7 @@ type ListPodAllReq struct { func (x *ListPodAllReq) Reset() { *x = ListPodAllReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[11] + mi := &file_idl_pbpod_pod_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1121,7 +1226,7 @@ func (x *ListPodAllReq) String() string { func (*ListPodAllReq) ProtoMessage() {} func (x *ListPodAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[11] + mi := &file_idl_pbpod_pod_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1134,7 +1239,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{11} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{13} } var File_idl_pbpod_pod_proto protoreflect.FileDescriptor @@ -1176,173 +1281,188 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{ 0x76, 0x70, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xbb, 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, 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, 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, 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, 0x2a, 0x0a, 0x11, 0x73, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, - 0x65, 0x74, 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, 0x72, 0x0a, 0x0d, 0x43, 0x72, 0x65, - 0x61, 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, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x48, 0x0a, 0x0d, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x12, 0x37, 0x0a, 0x0c, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x6f, 0x64, 0x52, 0x65, 0x71, 0x22, 0x4b, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 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, 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x22, 0xbb, 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, 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, + 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, 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, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 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, 0x72, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 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, 0xd3, 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, 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, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 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, 0x06, 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, 0x9a, + 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, 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, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 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, 0x06, 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, 0x07, 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, + 0x08, 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, + 0x09, 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, 0x0a, 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, 0x0b, + 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, 0x0c, 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, 0xd3, 0x01, - 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 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, 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, 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, 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, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 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, 0x06, 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, 0x9a, 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, 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, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x05, 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, 0x06, 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, 0x07, 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, 0x08, 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, 0x09, 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, 0x0a, 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, 0x0b, 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, 0x0c, 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, 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, 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, 0xfd, 0x03, 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, 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, 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, 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, + 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, 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, 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, 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 ( @@ -1357,51 +1477,56 @@ 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, 12) +var file_idl_pbpod_pod_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_idl_pbpod_pod_proto_goTypes = []interface{}{ (*PodInstance)(nil), // 0: pbpod.PodInstance - (*CreatePodReq)(nil), // 1: pbpod.CreatePodReq - (*CreatePodResp)(nil), // 2: pbpod.CreatePodResp - (*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 + (*CreatePodsReq)(nil), // 1: pbpod.CreatePodsReq + (*CreatePodsResp)(nil), // 2: pbpod.CreatePodsResp + (*CreatePodReq)(nil), // 3: pbpod.CreatePodReq + (*CreatePodResp)(nil), // 4: pbpod.CreatePodResp + (*DeletePodReq)(nil), // 5: pbpod.DeletePodReq + (*DeletePodResp)(nil), // 6: pbpod.DeletePodResp + (*UpdatePodReq)(nil), // 7: pbpod.UpdatePodReq + (*UpdatePodResp)(nil), // 8: pbpod.UpdatePodResp + (*ListPodDetailReq)(nil), // 9: pbpod.ListPodDetailReq + (*ListPodDetailResp)(nil), // 10: pbpod.ListPodDetailResp + (*ListPodReq)(nil), // 11: pbpod.ListPodReq + (*ListPodResp)(nil), // 12: pbpod.ListPodResp + (*ListPodAllReq)(nil), // 13: pbpod.ListPodAllReq + (pbtenant.CloudProvider)(0), // 14: pbtenant.CloudProvider } var file_idl_pbpod_pod_proto_depIdxs = []int32{ - 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 - 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 + 14, // 0: pbpod.PodInstance.provider:type_name -> pbtenant.CloudProvider + 3, // 1: pbpod.CreatePodsReq.createPodReq:type_name -> pbpod.CreatePodReq + 14, // 2: pbpod.CreatePodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 3: pbpod.CreatePodResp.pods:type_name -> pbpod.PodInstance + 14, // 4: pbpod.DeletePodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 5: pbpod.DeletePodResp.pods:type_name -> pbpod.PodInstance + 14, // 6: pbpod.UpdatePodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 7: pbpod.UpdatePodResp.pod:type_name -> pbpod.PodInstance + 14, // 8: pbpod.ListPodDetailReq.provider:type_name -> pbtenant.CloudProvider + 0, // 9: pbpod.ListPodDetailResp.pods:type_name -> pbpod.PodInstance + 14, // 10: pbpod.ListPodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 11: pbpod.ListPodResp.pods:type_name -> pbpod.PodInstance + 1, // 12: pbpod.PodService.CreatePods:input_type -> pbpod.CreatePodsReq + 3, // 13: pbpod.PodService.CreatePod:input_type -> pbpod.CreatePodReq + 5, // 14: pbpod.PodService.DeletePod:input_type -> pbpod.DeletePodReq + 7, // 15: pbpod.PodService.UpdatePod:input_type -> pbpod.UpdatePodReq + 9, // 16: pbpod.PodService.ListPodDetail:input_type -> pbpod.ListPodDetailReq + 11, // 17: pbpod.PodService.ListPod:input_type -> pbpod.ListPodReq + 13, // 18: pbpod.PodService.ListPodAll:input_type -> pbpod.ListPodAllReq + 2, // 19: pbpod.PodService.CreatePods:output_type -> pbpod.CreatePodsResp + 4, // 20: pbpod.PodService.CreatePod:output_type -> pbpod.CreatePodResp + 6, // 21: pbpod.PodService.DeletePod:output_type -> pbpod.DeletePodResp + 8, // 22: pbpod.PodService.UpdatePod:output_type -> pbpod.UpdatePodResp + 10, // 23: pbpod.PodService.ListPodDetail:output_type -> pbpod.ListPodDetailResp + 12, // 24: pbpod.PodService.ListPod:output_type -> pbpod.ListPodResp + 12, // 25: pbpod.PodService.ListPodAll:output_type -> pbpod.ListPodResp + 19, // [19:26] is the sub-list for method output_type + 12, // [12:19] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_idl_pbpod_pod_proto_init() } @@ -1423,7 +1548,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePodReq); i { + switch v := v.(*CreatePodsReq); i { case 0: return &v.state case 1: @@ -1435,7 +1560,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePodResp); i { + switch v := v.(*CreatePodsResp); i { case 0: return &v.state case 1: @@ -1447,7 +1572,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.(*DeletePodReq); i { + switch v := v.(*CreatePodReq); i { case 0: return &v.state case 1: @@ -1459,7 +1584,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.(*DeletePodResp); i { + switch v := v.(*CreatePodResp); i { case 0: return &v.state case 1: @@ -1471,7 +1596,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.(*UpdatePodReq); i { + switch v := v.(*DeletePodReq); i { case 0: return &v.state case 1: @@ -1483,7 +1608,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.(*UpdatePodResp); i { + switch v := v.(*DeletePodResp); i { case 0: return &v.state case 1: @@ -1495,7 +1620,7 @@ 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 { + switch v := v.(*UpdatePodReq); i { case 0: return &v.state case 1: @@ -1507,7 +1632,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodDetailResp); i { + switch v := v.(*UpdatePodResp); i { case 0: return &v.state case 1: @@ -1519,7 +1644,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodReq); i { + switch v := v.(*ListPodDetailReq); i { case 0: return &v.state case 1: @@ -1531,7 +1656,7 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodResp); i { + switch v := v.(*ListPodDetailResp); i { case 0: return &v.state case 1: @@ -1543,6 +1668,30 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[11].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[12].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[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPodAllReq); i { case 0: return &v.state @@ -1561,7 +1710,7 @@ func file_idl_pbpod_pod_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_pbpod_pod_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index 8ca8800e..97849a0b 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -405,13 +405,6 @@ "pbpodCreatePodsResp": { "type": "object", "properties": { - "pods": { - "type": "array", - "items": { - "$ref": "#/definitions/pbpodPodInstance" - }, - "title": "Pod集合" - }, "finished": { "type": "boolean", "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" From 55abc4c9df78ccf388e718c1571e6fc88cd17757 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Mon, 18 Apr 2022 17:34:54 +0800 Subject: [PATCH 3/6] config template&k8s ns Signed-off-by: zhouqunjie <450705171@qq.com> --- adaptor/pod_adaptor/server/pod/pod.go | 4 ++-- configs/config_template.yaml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/adaptor/pod_adaptor/server/pod/pod.go b/adaptor/pod_adaptor/server/pod/pod.go index ac176714..ba5f55ac 100644 --- a/adaptor/pod_adaptor/server/pod/pod.go +++ b/adaptor/pod_adaptor/server/pod/pod.go @@ -230,9 +230,9 @@ func ListPodAll(ctx context.Context) (*pbpod.ListPodResp, error) { go func(provider int32) { defer wg.Done() - //针对私有K8S集群,调用listAll时默认只查询default namespace下的pod + //针对私有K8S集群,调用listAll时默认只查询ListPodDetailReq namespace下的pod if provider == 3 { - resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbtenant.CloudProvider(provider), Namespace: "default"}) + resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbtenant.CloudProvider(provider), Namespace: "pcm"}) if err != nil { glog.Errorf("List error %v", err) return diff --git a/configs/config_template.yaml b/configs/config_template.yaml index 27b43ac4..5e14b973 100644 --- a/configs/config_template.yaml +++ b/configs/config_template.yaml @@ -12,3 +12,7 @@ configs: name: "huawei-PCM" accessid: "" accesssecret: "" + - provider: 3 + name: "K8S-PCM" + url: "" + token: "" \ No newline at end of file From e6760ae5328e350f5335732fb423b0d198e63585 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Fri, 22 Apr 2022 17:39:45 +0800 Subject: [PATCH 4/6] get available region for product Signed-off-by: zhouqunjie <450705171@qq.com> --- .gitignore | 3 +- adaptor/pod_adaptor/server/pod/pod.go | 88 ++++- adaptor/pod_adaptor/service/poder/ali_eci.go | 82 ++--- .../pod_adaptor/service/poder/huawei_cci.go | 17 + adaptor/pod_adaptor/service/poder/k8s.go | 16 + adaptor/pod_adaptor/service/poder/poder.go | 1 + .../pod_adaptor/service/poder/tencent_eks.go | 21 ++ .../vm_adaptor/service/ecser/ecser_test.go | 14 +- adaptor/vm_adaptor/service/ecser/main_test.go | 3 - common/server/server_pod.go | 14 + idl/pbpod/pod.proto | 16 +- idl/pbtenant/tenant.proto | 9 + lan_trans/idl/pbecs/ecs.pb.gw.go | 40 ++- lan_trans/idl/pbpod/pod.pb.go | 288 +++++++++++---- lan_trans/idl/pbpod/pod.pb.gw.go | 70 ++-- lan_trans/idl/pbtenant/tenant.pb.go | 337 +++++++++++------- .../openapiv2/idl/pbecs/ecs.swagger.json | 14 +- .../openapiv2/idl/pbpod/pod.swagger.json | 31 +- 18 files changed, 706 insertions(+), 358 deletions(-) diff --git a/.gitignore b/.gitignore index 9b3a0107..073c08cd 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ go.sum aksk.conf config.yaml -log/ \ No newline at end of file +log/ +/go_build_gitlink_org_cn_JCCE_PCM diff --git a/adaptor/pod_adaptor/server/pod/pod.go b/adaptor/pod_adaptor/server/pod/pod.go index ba5f55ac..c67addb3 100644 --- a/adaptor/pod_adaptor/server/pod/pod.go +++ b/adaptor/pod_adaptor/server/pod/pod.go @@ -14,6 +14,64 @@ import ( "github.com/pkg/errors" ) +// GetPodRegions get the available region for pod +func GetPodRegions(ctx context.Context, req *pbpod.GetPodRegionReq) (resp *pbpod.GetPodRegionResp, err error) { + var ( + regionInit tenanter.Region + regions []*pbtenant.Region + ) + + switch req.GetProvider() { + case pbtenant.CloudProvider_ali: + regionInit, _ = tenanter.NewRegion(req.GetProvider(), 2) + case pbtenant.CloudProvider_tencent: + regionInit, _ = tenanter.NewRegion(req.GetProvider(), 5) + case pbtenant.CloudProvider_huawei: + //type result struct { + // Args string `json:"args"` + // Headers map[string]string `json:"headers"` + // Origin string `json:"origin"` + // Url string `json:"url"` + //} + ////todo + //resp, err := http.Get("https://apiexplorer.developer.huaweicloud.com/v4/regions?product_short=CCI&api_name=createCoreV1NamespacedPod") + //if err != nil { + // println("error") + //} + //defer resp.Body.Close() + //body, _ := ioutil.ReadAll(resp.Body) + //fmt.Println(string(body)) + //var res result + //_ = json.Unmarshal(body, &res) + //regions = append(regions, nil) + return nil, nil + } + tenanters, err := tenanter.GetTenanters(req.GetProvider()) + if err != nil { + return nil, errors.WithMessage(err, "getTenanters error") + } + + for _, tenant := range tenanters { + + pod, err := poder.NewPodClient(req.GetProvider(), regionInit, tenant) + if err != nil { + return nil, errors.WithMessage(err, "NewPodClient error") + } + request := &pbpod.GetPodRegionReq{ + Provider: req.GetProvider(), + } + resp, err := pod.GetPodRegion(ctx, request) + if err != nil { + return nil, errors.Wrap(err, "GetPodRegion error") + } + for _, region := range resp.GetRegions() { + regions = append(regions, region) + } + } + + return &pbpod.GetPodRegionResp{Regions: regions}, nil +} + func CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbpod.CreatePodsResp, error) { var ( wg sync.WaitGroup @@ -68,9 +126,9 @@ func CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodRe 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 { + for _, tenant := range tenanters { + if req.AccountName == "" || tenant.AccountName() == req.AccountName { + if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { return nil, errors.WithMessage(err, "NewPodClient error") } break @@ -95,9 +153,9 @@ func DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodRe 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 { + for _, tenant := range tenanters { + if req.AccountName == "" || tenant.AccountName() == req.AccountName { + if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { return nil, errors.WithMessage(err, "NewPodClient error") } break @@ -122,9 +180,9 @@ func UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodRe 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 { + for _, tenant := range tenanters { + if req.AccountName == "" || tenant.AccountName() == req.AccountName { + if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { return nil, errors.WithMessage(err, "NewPodClient error") } break @@ -149,9 +207,9 @@ func ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.Lis 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 { + for _, tenant := range tenanters { + if req.AccountName == "" || tenant.AccountName() == req.AccountName { + if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { return nil, errors.WithMessage(err, "NewPodClient error") } break @@ -174,6 +232,12 @@ func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, er } regions := tenanter.GetAllRegionIds(req.Provider) + reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()} + respPodRegion, err := GetPodRegions(ctx, reqPodRegion) + if err != nil { + return nil, errors.WithMessage(err, "getPodRegion error") + } + fmt.Println(respPodRegion) wg.Add(len(tenanters) * len(regions)) for _, t := range tenanters { diff --git a/adaptor/pod_adaptor/service/poder/ali_eci.go b/adaptor/pod_adaptor/service/poder/ali_eci.go index a9e4867e..099b427b 100644 --- a/adaptor/pod_adaptor/service/poder/ali_eci.go +++ b/adaptor/pod_adaptor/service/poder/ali_eci.go @@ -2,6 +2,7 @@ package poder import ( "context" + "fmt" "strconv" "sync" @@ -9,7 +10,7 @@ import ( "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" + pbtenant "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" alieci "github.com/aliyun/alibaba-cloud-sdk-go/services/eci" "github.com/pkg/errors" @@ -23,6 +24,32 @@ type AliEci struct { tenanter tenanter.Tenanter } +func (eci *AliEci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { + + regions := make([]*pbtenant.Region, 0) + + request := alieci.CreateDescribeRegionsRequest() + request.RegionId = "cn-beijing" + resp, err := eci.cli.DescribeRegions(request) + if err != nil { + return nil, errors.Wrap(err, "ali eci describe region error") + } + for _, eciRegion := range resp.Regions { + + regionId, err := strconv.ParseInt(eciRegion.RegionId, 10, 32) + if err == nil { + fmt.Printf("%T, %v\n", regionId, err) + } + regionPod := &pbtenant.Region{ + Id: int32(regionId), + Name: eciRegion.RegionEndpoint, + } + regions = append(regions, regionPod) + } + return &pbpod.GetPodRegionResp{Regions: regions}, nil + +} + func newAliEciClient(region tenanter.Region, tenant tenanter.Tenanter) (Poder, error) { var ( client *alieci.Client @@ -50,7 +77,6 @@ func newAliEciClient(region tenanter.Region, tenant tenanter.Tenanter) (Poder, e func (eci *AliEci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { request := alieci.CreateCreateContainerGroupRequest() - request.RegionId = eci.region.GetName() request.ContainerGroupName = req.PodName requestContainer := make([]alieci.CreateContainerGroupContainer, 1) @@ -176,55 +202,3 @@ func (eci *AliEci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailRe RequestId: resp.RequestId, }, nil } - -//// UpdateContainerGroup 更新Pod -//func UpdateContainerGroup(cloudStack string, akskPath string, configPath string) string { -// var client *eci.Client -// -// configCommon, _ := config.PCMconfig(configPath) -// configAksk, _ := aksk.AkskConfig(cloudStack, akskPath) -// -// client, _ = eci.NewClientWithAccessKey(configCommon.RegionId, configAksk.AccessKey, configAksk.SecretKey) -// -// //生成更新请求 -// updateContainerGroupRequest := eci.CreateUpdateContainerGroupRequest() -// updateContainerGroupRequest.RegionId = configCommon.RegionIdUpdate -// updateContainerGroupRequest.ContainerGroupId = configCommon.ContainerGroupIdUpdate -// -// //容器实体内容,这里测试可以修改配置文件中的重启策略 -// updateContainerRequestContainer := make([]eci.UpdateContainerGroupContainer, 1) -// updateContainerRequestContainer[0].Image = configCommon.ContainerImage -// updateContainerRequestContainer[0].Name = configCommon.ContainerName -// updateContainerGroupRequest.Container = &updateContainerRequestContainer -// updateContainerGroupRequest.RestartPolicy = configCommon.RestartPolicyUpdate -// -// updateContainerGroupResponse, err := client.UpdateContainerGroup(updateContainerGroupRequest) -// if err != nil { -// panic(err) -// } -// requestId := updateContainerGroupResponse.RequestId -// fmt.Println("Alibaba ContainerGroup: ", configCommon.ContainerGroupIdUpdate, " Updated with request ID:", requestId) -// return requestId -//} -// -//// DeleteContainerGroup 删除Pod -//func DeleteContainerGroup(cloudStack string, akskPath string, configPath string) string { -// var client *eci.Client -// configCommon, _ := config.PCMconfig(configPath) -// configAksk, _ := aksk.AkskConfig(cloudStack, akskPath) -// client, _ = eci.NewClientWithAccessKey(configCommon.RegionId, configAksk.AccessKey, configAksk.SecretKey) -// -// //生成删除请求 -// deleteContainerGroupRequest := eci.CreateDeleteContainerGroupRequest() -// deleteContainerGroupRequest.RegionId = configCommon.RegionIdDelete -// deleteContainerGroupRequest.ContainerGroupId = configCommon.ContainerGroupIdDelete -// -// deleteContainerGroupResponse, err := client.DeleteContainerGroup(deleteContainerGroupRequest) -// if err != nil { -// panic(err) -// } -// requestId := deleteContainerGroupResponse.RequestId -// fmt.Println("Alibaba ContainerGroup: ", configCommon.ContainerGroupIdUpdate, " Deleted with request ID:", requestId) -// -// return requestId -//} diff --git a/adaptor/pod_adaptor/service/poder/huawei_cci.go b/adaptor/pod_adaptor/service/poder/huawei_cci.go index b733e552..2c5db0a4 100644 --- a/adaptor/pod_adaptor/service/poder/huawei_cci.go +++ b/adaptor/pod_adaptor/service/poder/huawei_cci.go @@ -31,6 +31,23 @@ type HuaweiCci struct { tenanter tenanter.Tenanter } +func (cci *HuaweiCci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { + //TODO implement me + var ( + regions []*pbtenant.Region + ) + region := &pbtenant.Region{ + Id: 1, + Name: "region", + } + regions = append(regions, region) + resp := &pbpod.GetPodRegionResp{ + Regions: regions, + } + + return resp, nil +} + const ( apiVersion = "client.authentication.k8s.io/v1beta1" iamEndpoint = "https://iam.myhuaweicloud.com" diff --git a/adaptor/pod_adaptor/service/poder/k8s.go b/adaptor/pod_adaptor/service/poder/k8s.go index 36f9a734..a893ef63 100644 --- a/adaptor/pod_adaptor/service/poder/k8s.go +++ b/adaptor/pod_adaptor/service/poder/k8s.go @@ -30,6 +30,22 @@ type K8SPoder struct { tenanter tenanter.Tenanter } +func (k K8SPoder) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { + var ( + regions []*pbtenant.Region + ) + region := &pbtenant.Region{ + Id: 1, + Name: "region", + } + regions = append(regions, region) + resp := &pbpod.GetPodRegionResp{ + Regions: regions, + } + + return resp, nil +} + func newK8SClient(tenant tenanter.Tenanter) (Poder, error) { var ( client *k8s.Clientset diff --git a/adaptor/pod_adaptor/service/poder/poder.go b/adaptor/pod_adaptor/service/poder/poder.go index 3c99f896..63e4d3dc 100644 --- a/adaptor/pod_adaptor/service/poder/poder.go +++ b/adaptor/pod_adaptor/service/poder/poder.go @@ -21,6 +21,7 @@ type Poder interface { 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) + GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, 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 fc6e5a3c..f4aeabe1 100644 --- a/adaptor/pod_adaptor/service/poder/tencent_eks.go +++ b/adaptor/pod_adaptor/service/poder/tencent_eks.go @@ -25,6 +25,27 @@ type TencentEks struct { tenanter tenanter.Tenanter } +func (eks TencentEks) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { + + regions := make([]*pbtenant.Region, 0) + + request := tencenteks.NewDescribeEKSContainerInstanceRegionsRequest() + resp, err := eks.cli.DescribeEKSContainerInstanceRegions(request) + if err != nil { + return nil, errors.Wrap(err, "tencent eks describe region error") + } + for _, eksRegion := range resp.Response.Regions { + + regionPod := &pbtenant.Region{ + Id: int32(*eksRegion.RegionId), + Name: *eksRegion.RegionName, + } + regions = append(regions, regionPod) + } + return &pbpod.GetPodRegionResp{Regions: regions}, nil + +} + func newTencentEksClient(region tenanter.Region, tenant tenanter.Tenanter) (Poder, error) { var ( client *tencenteks.Client diff --git a/adaptor/vm_adaptor/service/ecser/ecser_test.go b/adaptor/vm_adaptor/service/ecser/ecser_test.go index 482a2128..fa514348 100644 --- a/adaptor/vm_adaptor/service/ecser/ecser_test.go +++ b/adaptor/vm_adaptor/service/ecser/ecser_test.go @@ -2,27 +2,25 @@ package ecser import ( "context" + "gitlink.org.cn/JCCE/PCM/common/tenanter" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" "testing" ) func TestEcser_ListDetail(t *testing.T) { region, _ := tenanter.NewRegion(pbtenant.CloudProvider_ali, int32(pbtenant.AliRegionId_ali_cn_hangzhou)) ali, _ := NewEcsClient(pbtenant.CloudProvider_ali, region, aliTenant[0]) - aliFailed, _ := NewEcsClient(pbtenant.CloudProvider_ali, region, tenanter.NewTenantWithAccessKey("empty", "", "")) + aliFailed, _ := NewEcsClient(pbtenant.CloudProvider_ali, region, tenanter.NewTenantWithAccessKey("empty", "", "", "", "")) region, _ = tenanter.NewRegion(pbtenant.CloudProvider_tencent, int32(pbtenant.TencentRegionId_tc_ap_beijing)) tc, _ := NewEcsClient(pbtenant.CloudProvider_tencent, region, tcTenant[0]) - tcFailed, _ := NewEcsClient(pbtenant.CloudProvider_tencent, region, tenanter.NewTenantWithAccessKey("empty", "", "")) + tcFailed, _ := NewEcsClient(pbtenant.CloudProvider_tencent, region, tenanter.NewTenantWithAccessKey("empty", "", "", "", "")) region, _ = tenanter.NewRegion(pbtenant.CloudProvider_huawei, int32(pbtenant.HuaweiRegionId_hw_cn_southwest_2)) hw, _ := NewEcsClient(pbtenant.CloudProvider_huawei, region, hwTenant[0]) // hwFailed, _ := newHuaweiEcsClient(int32(pbtenant.HuaweiRegionId_hw_cn_north_1), tenanter.NewTenantWithAccessKey("empty", "", "", "")) - region, _ = tenanter.NewRegion(pbtenant.CloudProvider_aws, int32(pbtenant.AwsRegionId_aws_us_east_2)) - aws, _ := NewEcsClient(pbtenant.CloudProvider_aws, region, awsTenant[0]) - - // google, _ := NewGoogleEcsClient(tenanter.NewTenantWithAccessKey("", "")) - type args struct { req *pbecs.ListDetailReq } @@ -45,8 +43,6 @@ func TestEcser_ListDetail(t *testing.T) { // {name: "hw wrong cli", fields: hwFailed, args: args{pageNumber: 1, pageSize: 1}, wantErr: true}, {name: "hw right cli", fields: hw, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - {name: "aws right cli", fields: aws, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - // {name: "right cli", fields: google, args: args{pageNumber: 1, pageSize: 10}, wantErr: false}, } diff --git a/adaptor/vm_adaptor/service/ecser/main_test.go b/adaptor/vm_adaptor/service/ecser/main_test.go index 2477e03d..21eb0e8a 100644 --- a/adaptor/vm_adaptor/service/ecser/main_test.go +++ b/adaptor/vm_adaptor/service/ecser/main_test.go @@ -25,8 +25,5 @@ func TestMain(m *testing.M) { 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/common/server/server_pod.go b/common/server/server_pod.go index f180983c..4e4a1321 100644 --- a/common/server/server_pod.go +++ b/common/server/server_pod.go @@ -11,6 +11,17 @@ import ( "google.golang.org/grpc/status" ) +// GetProdRegions get available region for product +func (s *Server) GetProdRegions(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { + resp, err := pod.GetPodRegions(ctx, req) + if err != nil { + glog.Errorf("CreatePods error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// 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) if err != nil { @@ -20,6 +31,7 @@ func (s *Server) CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbp return resp, nil } +// 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) if err != nil { @@ -29,6 +41,7 @@ func (s *Server) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod return resp, nil } +// DeletePod delete specified pod func (s *Server) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { resp, err := pod.DeletePod(ctx, req) if err != nil { @@ -38,6 +51,7 @@ func (s *Server) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod return resp, nil } +// UpdatePod update specified pod func (s *Server) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { resp, err := pod.UpdatePod(ctx, req) if err != nil { diff --git a/idl/pbpod/pod.proto b/idl/pbpod/pod.proto index be979089..e9806794 100644 --- a/idl/pbpod/pod.proto +++ b/idl/pbpod/pod.proto @@ -187,17 +187,29 @@ message ListPodDetailResp { } message ListPodReq { - // 云名称 + // cloud name pbtenant.CloudProvider provider = 1; // string namespace =2; } message ListPodResp { - // pod集合 + // pod list repeated PodInstance pods = 1; } +message GetPodRegionReq { + // cloud name + pbtenant.CloudProvider provider = 1; + +} + +message GetPodRegionResp { + // region list + repeated pbtenant.Region regions = 1; +} + + message ListPodAllReq{} diff --git a/idl/pbtenant/tenant.proto b/idl/pbtenant/tenant.proto index 237a3f5c..2c25af51 100644 --- a/idl/pbtenant/tenant.proto +++ b/idl/pbtenant/tenant.proto @@ -57,6 +57,15 @@ message CloudConfig { string token = 6; } + +message Region { + //id + int32 id = 1; + //name + string name = 2; +} + + // 阿里云区域,需要将对应的 _ 转化为 - enum AliRegionId { ali_all = 0; diff --git a/lan_trans/idl/pbecs/ecs.pb.gw.go b/lan_trans/idl/pbecs/ecs.pb.gw.go index 00511467..42f8e1da 100644 --- a/lan_trans/idl/pbecs/ecs.pb.gw.go +++ b/lan_trans/idl/pbecs/ecs.pb.gw.go @@ -269,12 +269,13 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs", runtime.WithHTTPPathPattern("/apis/ecs/createMultiple")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_CreateMultipleEcs_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_CreateMultipleEcs_0(ctx, 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 { @@ -292,12 +293,13 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs", runtime.WithHTTPPathPattern("/apis/ecs/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_CreateEcs_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_CreateEcs_0(ctx, 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 { @@ -315,12 +317,13 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs", runtime.WithHTTPPathPattern("/apis/ecs/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_DeleteEcs_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_DeleteEcs_0(ctx, 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 { @@ -338,12 +341,13 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs", runtime.WithHTTPPathPattern("/apis/ecs/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_UpdateEcs_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_UpdateEcs_0(ctx, 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 { @@ -472,12 +476,13 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs", runtime.WithHTTPPathPattern("/apis/ecs/createMultiple")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_CreateMultipleEcs_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_CreateMultipleEcs_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -492,12 +497,13 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs", runtime.WithHTTPPathPattern("/apis/ecs/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_CreateEcs_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_CreateEcs_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -512,12 +518,13 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs", runtime.WithHTTPPathPattern("/apis/ecs/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_DeleteEcs_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_DeleteEcs_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -532,12 +539,13 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs", runtime.WithHTTPPathPattern("/apis/ecs/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_UpdateEcs_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_UpdateEcs_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/idl/pbpod/pod.pb.go b/lan_trans/idl/pbpod/pod.pb.go index 06db2b43..d8bd2820 100644 --- a/lan_trans/idl/pbpod/pod.pb.go +++ b/lan_trans/idl/pbpod/pod.pb.go @@ -1113,7 +1113,7 @@ type ListPodReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 云名称 + // 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"` @@ -1170,7 +1170,7 @@ type ListPodResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // pod集合 + // pod list Pods []*PodInstance `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"` } @@ -1213,6 +1213,102 @@ func (x *ListPodResp) GetPods() []*PodInstance { return nil } +type GetPodRegionReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // cloud name + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` +} + +func (x *GetPodRegionReq) Reset() { + *x = GetPodRegionReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPodRegionReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPodRegionReq) ProtoMessage() {} + +func (x *GetPodRegionReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[13] + 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 GetPodRegionReq.ProtoReflect.Descriptor instead. +func (*GetPodRegionReq) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{13} +} + +func (x *GetPodRegionReq) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +type GetPodRegionResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // region list + Regions []*pbtenant.Region `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"` +} + +func (x *GetPodRegionResp) Reset() { + *x = GetPodRegionResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbpod_pod_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPodRegionResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPodRegionResp) ProtoMessage() {} + +func (x *GetPodRegionResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbpod_pod_proto_msgTypes[14] + 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 GetPodRegionResp.ProtoReflect.Descriptor instead. +func (*GetPodRegionResp) Descriptor() ([]byte, []int) { + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{14} +} + +func (x *GetPodRegionResp) GetRegions() []*pbtenant.Region { + if x != nil { + return x.Regions + } + return nil +} + type ListPodAllReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1222,7 +1318,7 @@ type ListPodAllReq struct { func (x *ListPodAllReq) Reset() { *x = ListPodAllReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbpod_pod_proto_msgTypes[13] + mi := &file_idl_pbpod_pod_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1235,7 +1331,7 @@ func (x *ListPodAllReq) String() string { func (*ListPodAllReq) ProtoMessage() {} func (x *ListPodAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbpod_pod_proto_msgTypes[13] + mi := &file_idl_pbpod_pod_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1248,7 +1344,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{13} + return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{15} } var File_idl_pbpod_pod_proto protoreflect.FileDescriptor @@ -1431,49 +1527,58 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{ 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, 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, 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, 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, + 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, 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, 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 ( @@ -1488,7 +1593,7 @@ 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, 14) +var file_idl_pbpod_pod_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_idl_pbpod_pod_proto_goTypes = []interface{}{ (*PodInstance)(nil), // 0: pbpod.PodInstance (*CreatePodsReq)(nil), // 1: pbpod.CreatePodsReq @@ -1503,41 +1608,46 @@ var file_idl_pbpod_pod_proto_goTypes = []interface{}{ (*ListPodDetailResp)(nil), // 10: pbpod.ListPodDetailResp (*ListPodReq)(nil), // 11: pbpod.ListPodReq (*ListPodResp)(nil), // 12: pbpod.ListPodResp - (*ListPodAllReq)(nil), // 13: pbpod.ListPodAllReq - (pbtenant.CloudProvider)(0), // 14: pbtenant.CloudProvider + (*GetPodRegionReq)(nil), // 13: pbpod.GetPodRegionReq + (*GetPodRegionResp)(nil), // 14: pbpod.GetPodRegionResp + (*ListPodAllReq)(nil), // 15: pbpod.ListPodAllReq + (pbtenant.CloudProvider)(0), // 16: pbtenant.CloudProvider + (*pbtenant.Region)(nil), // 17: pbtenant.Region } var file_idl_pbpod_pod_proto_depIdxs = []int32{ - 14, // 0: pbpod.PodInstance.provider:type_name -> pbtenant.CloudProvider + 16, // 0: pbpod.PodInstance.provider:type_name -> pbtenant.CloudProvider 3, // 1: pbpod.CreatePodsReq.createPodReq:type_name -> pbpod.CreatePodReq - 14, // 2: pbpod.CreatePodReq.provider:type_name -> pbtenant.CloudProvider + 16, // 2: pbpod.CreatePodReq.provider:type_name -> pbtenant.CloudProvider 0, // 3: pbpod.CreatePodResp.pods:type_name -> pbpod.PodInstance - 14, // 4: pbpod.DeletePodReq.provider:type_name -> pbtenant.CloudProvider + 16, // 4: pbpod.DeletePodReq.provider:type_name -> pbtenant.CloudProvider 0, // 5: pbpod.DeletePodResp.pods:type_name -> pbpod.PodInstance - 14, // 6: pbpod.UpdatePodReq.provider:type_name -> pbtenant.CloudProvider + 16, // 6: pbpod.UpdatePodReq.provider:type_name -> pbtenant.CloudProvider 0, // 7: pbpod.UpdatePodResp.pod:type_name -> pbpod.PodInstance - 14, // 8: pbpod.ListPodDetailReq.provider:type_name -> pbtenant.CloudProvider + 16, // 8: pbpod.ListPodDetailReq.provider:type_name -> pbtenant.CloudProvider 0, // 9: pbpod.ListPodDetailResp.pods:type_name -> pbpod.PodInstance - 14, // 10: pbpod.ListPodReq.provider:type_name -> pbtenant.CloudProvider + 16, // 10: pbpod.ListPodReq.provider:type_name -> pbtenant.CloudProvider 0, // 11: pbpod.ListPodResp.pods:type_name -> pbpod.PodInstance - 1, // 12: pbpod.PodService.CreatePods:input_type -> pbpod.CreatePodsReq - 3, // 13: pbpod.PodService.CreatePod:input_type -> pbpod.CreatePodReq - 5, // 14: pbpod.PodService.DeletePod:input_type -> pbpod.DeletePodReq - 7, // 15: pbpod.PodService.UpdatePod:input_type -> pbpod.UpdatePodReq - 9, // 16: pbpod.PodService.ListPodDetail:input_type -> pbpod.ListPodDetailReq - 11, // 17: pbpod.PodService.ListPod:input_type -> pbpod.ListPodReq - 13, // 18: pbpod.PodService.ListPodAll:input_type -> pbpod.ListPodAllReq - 2, // 19: pbpod.PodService.CreatePods:output_type -> pbpod.CreatePodsResp - 4, // 20: pbpod.PodService.CreatePod:output_type -> pbpod.CreatePodResp - 6, // 21: pbpod.PodService.DeletePod:output_type -> pbpod.DeletePodResp - 8, // 22: pbpod.PodService.UpdatePod:output_type -> pbpod.UpdatePodResp - 10, // 23: pbpod.PodService.ListPodDetail:output_type -> pbpod.ListPodDetailResp - 12, // 24: pbpod.PodService.ListPod:output_type -> pbpod.ListPodResp - 12, // 25: pbpod.PodService.ListPodAll:output_type -> pbpod.ListPodResp - 19, // [19:26] is the sub-list for method output_type - 12, // [12:19] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 16, // 12: pbpod.GetPodRegionReq.provider:type_name -> pbtenant.CloudProvider + 17, // 13: pbpod.GetPodRegionResp.regions:type_name -> pbtenant.Region + 1, // 14: pbpod.PodService.CreatePods:input_type -> pbpod.CreatePodsReq + 3, // 15: pbpod.PodService.CreatePod:input_type -> pbpod.CreatePodReq + 5, // 16: pbpod.PodService.DeletePod:input_type -> pbpod.DeletePodReq + 7, // 17: pbpod.PodService.UpdatePod:input_type -> pbpod.UpdatePodReq + 9, // 18: pbpod.PodService.ListPodDetail:input_type -> pbpod.ListPodDetailReq + 11, // 19: pbpod.PodService.ListPod:input_type -> pbpod.ListPodReq + 15, // 20: pbpod.PodService.ListPodAll:input_type -> pbpod.ListPodAllReq + 2, // 21: pbpod.PodService.CreatePods:output_type -> pbpod.CreatePodsResp + 4, // 22: pbpod.PodService.CreatePod:output_type -> pbpod.CreatePodResp + 6, // 23: pbpod.PodService.DeletePod:output_type -> pbpod.DeletePodResp + 8, // 24: pbpod.PodService.UpdatePod:output_type -> pbpod.UpdatePodResp + 10, // 25: pbpod.PodService.ListPodDetail:output_type -> pbpod.ListPodDetailResp + 12, // 26: pbpod.PodService.ListPod:output_type -> pbpod.ListPodResp + 12, // 27: pbpod.PodService.ListPodAll:output_type -> pbpod.ListPodResp + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_idl_pbpod_pod_proto_init() } @@ -1703,6 +1813,30 @@ func file_idl_pbpod_pod_proto_init() { } } file_idl_pbpod_pod_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPodRegionReq); 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[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPodRegionResp); 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[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPodAllReq); i { case 0: return &v.state @@ -1721,7 +1855,7 @@ func file_idl_pbpod_pod_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_pbpod_pod_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, 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 8a65b392..8aed6f35 100644 --- a/lan_trans/idl/pbpod/pod.pb.gw.go +++ b/lan_trans/idl/pbpod/pod.pb.gw.go @@ -269,12 +269,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_CreatePods_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_CreatePods_0(ctx, 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 { @@ -292,12 +293,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_CreatePod_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_CreatePod_0(ctx, 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 { @@ -315,12 +317,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, 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") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) 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) + resp, md, err := local_request_PodService_DeletePod_0(ctx, 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 { @@ -338,12 +341,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, 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") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) 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) + resp, md, err := local_request_PodService_UpdatePod_0(ctx, 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 { @@ -361,12 +365,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodDetail_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodDetail_0(ctx, 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 { @@ -384,12 +389,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPod_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPod_0(ctx, 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 { @@ -407,12 +413,13 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodAll_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodAll_0(ctx, 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 { @@ -469,12 +476,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_CreatePods_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_CreatePods_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -489,12 +497,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_CreatePod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_CreatePod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -509,12 +518,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_DeletePod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_DeletePod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -529,12 +539,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_UpdatePod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_UpdatePod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -549,12 +560,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodDetail_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodDetail_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -569,12 +581,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPod_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPod_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -589,12 +602,13 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodAll_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodAll_0(ctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/idl/pbtenant/tenant.pb.go b/lan_trans/idl/pbtenant/tenant.pb.go index 0b05b84e..de387a58 100644 --- a/lan_trans/idl/pbtenant/tenant.pb.go +++ b/lan_trans/idl/pbtenant/tenant.pb.go @@ -735,6 +735,63 @@ func (x *CloudConfig) GetToken() string { return "" } +type Region struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + //id + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + //name + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Region) Reset() { + *x = Region{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbtenant_tenant_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Region) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Region) ProtoMessage() {} + +func (x *Region) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbtenant_tenant_proto_msgTypes[2] + 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 Region.ProtoReflect.Descriptor instead. +func (*Region) Descriptor() ([]byte, []int) { + return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{2} +} + +func (x *Region) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Region) GetName() string { + if x != nil { + return x.Name + } + return "" +} + var File_idl_pbtenant_tenant_proto protoreflect.FileDescriptor var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ @@ -761,136 +818,139 @@ var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0x49, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, - 0x0a, 0x06, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, - 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x10, 0x04, 0x2a, 0x77, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x61, 0x6c, - 0x6c, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x65, - 0x63, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, - 0x72, 0x64, 0x73, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x5f, 0x6f, 0x73, 0x73, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x64, 0x10, 0x05, 0x2a, 0xf3, 0x03, 0x0a, 0x0b, - 0x41, 0x6c, 0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x61, - 0x6c, 0x69, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, - 0x63, 0x6e, 0x5f, 0x71, 0x69, 0x6e, 0x67, 0x64, 0x61, 0x6f, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, - 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x62, 0x65, 0x69, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, - 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x7a, 0x68, 0x61, 0x6e, 0x67, - 0x6a, 0x69, 0x61, 0x6b, 0x6f, 0x75, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, - 0x63, 0x6e, 0x5f, 0x68, 0x75, 0x68, 0x65, 0x68, 0x61, 0x6f, 0x74, 0x65, 0x10, 0x04, 0x12, 0x15, - 0x0a, 0x11, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x77, 0x75, 0x6c, 0x61, 0x6e, 0x63, 0x68, - 0x61, 0x62, 0x75, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, - 0x68, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, - 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x07, 0x12, - 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, - 0x65, 0x6e, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, - 0x65, 0x79, 0x75, 0x61, 0x6e, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, - 0x6e, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x0a, 0x12, 0x12, 0x0a, - 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, - 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x6f, 0x6e, 0x67, - 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, - 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0d, 0x12, 0x16, - 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, - 0x73, 0x74, 0x5f, 0x32, 0x10, 0x0e, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, - 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x0f, 0x12, 0x16, - 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, - 0x73, 0x74, 0x5f, 0x35, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, - 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, - 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, - 0x10, 0x12, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, - 0x74, 0x5f, 0x31, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, - 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, - 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, - 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, - 0x16, 0x2a, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, - 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, - 0x6f, 0x6b, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x65, - 0x69, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, - 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, - 0x5f, 0x61, 0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, - 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, - 0x6f, 0x75, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, - 0x6e, 0x67, 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, - 0x70, 0x5f, 0x6a, 0x61, 0x6b, 0x61, 0x72, 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, - 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, - 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, - 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, - 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, - 0x68, 0x61, 0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, - 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, - 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, - 0x66, 0x73, 0x69, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, - 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, - 0x5f, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, - 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, - 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, - 0x10, 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, - 0x75, 0x72, 0x6e, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, - 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, - 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, - 0x14, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, - 0x75, 0x6c, 0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, - 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, - 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, - 0x72, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, - 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x34, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, - 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x10, 0x0a, - 0x0c, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, - 0x10, 0x0a, 0x0c, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, - 0x05, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, - 0x77, 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, - 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x07, 0x12, - 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, - 0x73, 0x74, 0x5f, 0x32, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, - 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x09, 0x12, 0x11, 0x0a, - 0x0d, 0x68, 0x77, 0x5f, 0x61, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x0a, - 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, - 0x32, 0x10, 0x0b, 0x2a, 0x1a, 0x0a, 0x0b, 0x4b, 0x38, 0x53, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x6b, 0x38, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x2a, - 0xcd, 0x03, 0x0a, 0x0b, 0x41, 0x77, 0x73, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x0b, 0x0a, 0x07, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, - 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x01, 0x12, - 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, - 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, - 0x74, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, - 0x77, 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, - 0x61, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, - 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x06, 0x12, - 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, - 0x31, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, - 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x61, - 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, - 0x32, 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, - 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x61, - 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, - 0x32, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, - 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x61, - 0x77, 0x73, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, - 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, - 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, - 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, - 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x10, 0x12, 0x12, 0x0a, - 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, - 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, - 0x5f, 0x33, 0x10, 0x12, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x6e, - 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x13, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, - 0x6d, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, - 0x61, 0x77, 0x73, 0x5f, 0x73, 0x61, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x15, 0x32, - 0x70, 0x0a, 0x0d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x1a, 0x5f, 0x92, 0x41, 0x5c, 0x12, 0x1e, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe4, 0xba, 0x91, - 0xe7, 0xa7, 0x9f, 0xe6, 0x88, 0xb7, 0xe7, 0x9a, 0x84, 0xe8, 0xae, 0xa4, 0xe8, 0xaf, 0x81, 0xe6, - 0x9c, 0x8d, 0xe5, 0x8a, 0xa1, 0x1a, 0x3a, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, - 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x50, 0x43, 0x4d, - 0x12, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, - 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, 0x50, 0x43, - 0x4d, 0x42, 0x30, 0x5a, 0x2e, 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, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x49, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0x04, + 0x2a, 0x77, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x65, 0x63, 0x73, + 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x72, 0x64, + 0x73, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x5f, 0x6f, 0x73, 0x73, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x64, 0x10, 0x05, 0x2a, 0xf3, 0x03, 0x0a, 0x0b, 0x41, 0x6c, + 0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x6c, 0x69, + 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, + 0x5f, 0x71, 0x69, 0x6e, 0x67, 0x64, 0x61, 0x6f, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, + 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x62, 0x65, 0x69, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x16, + 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x7a, 0x68, 0x61, 0x6e, 0x67, 0x6a, 0x69, + 0x61, 0x6b, 0x6f, 0x75, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, + 0x5f, 0x68, 0x75, 0x68, 0x65, 0x68, 0x61, 0x6f, 0x74, 0x65, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, + 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x77, 0x75, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x61, 0x62, + 0x75, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x61, + 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, + 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x07, 0x12, 0x13, 0x0a, + 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, + 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x65, 0x79, + 0x75, 0x61, 0x6e, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, + 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x61, + 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x0b, 0x12, + 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b, 0x6f, + 0x6e, 0x67, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, + 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0d, 0x12, 0x16, 0x0a, 0x12, + 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, + 0x5f, 0x32, 0x10, 0x0e, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, + 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, + 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, + 0x5f, 0x35, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, + 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, + 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x12, + 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, + 0x31, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, + 0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, + 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, 0x0a, 0x0d, + 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x16, 0x2a, + 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, + 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, 0x6f, 0x6b, + 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x65, 0x69, 0x6a, + 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x63, + 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, + 0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x13, 0x0a, + 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, + 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, 0x6e, 0x67, + 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, + 0x6a, 0x61, 0x6b, 0x61, 0x72, 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, + 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x74, + 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0f, + 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, 0x0a, 0x12, + 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, + 0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, + 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x74, + 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, 0x66, 0x73, + 0x69, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, + 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, + 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, + 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, 0x12, 0x10, + 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, 0x10, 0x11, + 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, 0x75, 0x72, + 0x6e, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, 0x69, 0x6c, + 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d, + 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, 0x14, 0x12, + 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, 0x75, 0x6c, + 0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, 0x52, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, 0x6c, 0x6c, + 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, 0x72, 0x74, + 0x68, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, + 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x34, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, + 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x68, + 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x10, 0x0a, + 0x0c, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x05, 0x12, + 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x77, 0x65, + 0x73, 0x74, 0x5f, 0x32, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, + 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x07, 0x12, 0x15, 0x0a, + 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, + 0x5f, 0x32, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, + 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x68, + 0x77, 0x5f, 0x61, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x0a, 0x12, 0x11, + 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x32, 0x10, + 0x0b, 0x2a, 0x1a, 0x0a, 0x0b, 0x4b, 0x38, 0x53, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x0b, 0x0a, 0x07, 0x6b, 0x38, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x2a, 0xcd, 0x03, + 0x0a, 0x0b, 0x41, 0x77, 0x73, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, 0x0a, + 0x07, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, + 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x01, 0x12, 0x11, 0x0a, + 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x02, + 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, + 0x31, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, + 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x66, + 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, + 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x06, 0x12, 0x12, 0x0a, + 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, + 0x07, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, + 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, + 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, + 0x09, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, + 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, + 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, + 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, + 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x77, 0x73, + 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x0d, 0x12, + 0x14, 0x0a, 0x10, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, + 0x6c, 0x5f, 0x31, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, + 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, + 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x61, + 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, 0x12, + 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x33, + 0x10, 0x12, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x6e, 0x6f, 0x72, + 0x74, 0x68, 0x5f, 0x31, 0x10, 0x13, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x6d, 0x65, + 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, + 0x73, 0x5f, 0x73, 0x61, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x15, 0x32, 0x70, 0x0a, + 0x0d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x5f, + 0x92, 0x41, 0x5c, 0x12, 0x1e, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe4, 0xba, 0x91, 0xe7, 0xa7, + 0x9f, 0xe6, 0x88, 0xb7, 0xe7, 0x9a, 0x84, 0xe8, 0xae, 0xa4, 0xe8, 0xaf, 0x81, 0xe6, 0x9c, 0x8d, + 0xe5, 0x8a, 0xa1, 0x1a, 0x3a, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, + 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x50, 0x43, 0x4d, 0x12, 0x1f, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, + 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, 0x50, 0x43, 0x4d, 0x42, + 0x30, 0x5a, 0x2e, 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, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -906,7 +966,7 @@ func file_idl_pbtenant_tenant_proto_rawDescGZIP() []byte { } var file_idl_pbtenant_tenant_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_idl_pbtenant_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_idl_pbtenant_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_idl_pbtenant_tenant_proto_goTypes = []interface{}{ (CloudProvider)(0), // 0: pbtenant.CloudProvider (CloudProduct)(0), // 1: pbtenant.CloudProduct @@ -917,6 +977,7 @@ var file_idl_pbtenant_tenant_proto_goTypes = []interface{}{ (AwsRegionId)(0), // 6: pbtenant.AwsRegionId (*CloudConfigs)(nil), // 7: pbtenant.CloudConfigs (*CloudConfig)(nil), // 8: pbtenant.CloudConfig + (*Region)(nil), // 9: pbtenant.Region } var file_idl_pbtenant_tenant_proto_depIdxs = []int32{ 8, // 0: pbtenant.CloudConfigs.configs:type_name -> pbtenant.CloudConfig @@ -958,6 +1019,18 @@ func file_idl_pbtenant_tenant_proto_init() { return nil } } + file_idl_pbtenant_tenant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Region); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -965,7 +1038,7 @@ func file_idl_pbtenant_tenant_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_pbtenant_tenant_proto_rawDesc, NumEnums: 7, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 1, }, diff --git a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json index 82710833..123ca380 100644 --- a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json +++ b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -199,7 +199,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -214,14 +214,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域.", + "description": "区域Id,参考 tenant.proto 中的各个云的区域", "in": "query", "required": false, "type": "integer", @@ -229,7 +229,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码.", + "description": "分页相关参数,页码", "in": "query", "required": false, "type": "integer", @@ -237,7 +237,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量.", + "description": "分页相关参数,每页数量", "in": "query", "required": false, "type": "integer", @@ -245,7 +245,7 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token.", + "description": "分页相关参数,下一页的token", "in": "query", "required": false, "type": "string" diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index 32ac949a..8e6fb7e5 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "cloud name\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -205,7 +205,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -220,14 +220,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域.", + "description": "区域Id,参考 tenant.proto 中的各个云的区域", "in": "query", "required": false, "type": "integer", @@ -235,7 +235,7 @@ }, { "name": "regionName", - "description": "区域名称,各云厂商自定义的region name.", + "description": "区域名称,各云厂商自定义的region name", "in": "query", "required": false, "type": "integer", @@ -243,7 +243,7 @@ }, { "name": "podId", - "description": "podID.", + "description": "podID", "in": "query", "required": false, "type": "integer", @@ -251,7 +251,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码.", + "description": "分页相关参数,页码", "in": "query", "required": false, "type": "integer", @@ -259,7 +259,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量.", + "description": "分页相关参数,每页数量", "in": "query", "required": false, "type": "integer", @@ -267,14 +267,14 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token.", + "description": "分页相关参数,下一页的token", "in": "query", "required": false, "type": "string" }, { "name": "namespace", - "description": "namespace.", + "description": "namespace", "in": "query", "required": false, "type": "string" @@ -518,7 +518,7 @@ "items": { "$ref": "#/definitions/pbpodPodInstance" }, - "title": "pod集合" + "title": "pod list" } } }, @@ -675,14 +675,11 @@ "protobufAny": { "type": "object", "properties": { - "typeUrl": { + "@type": { "type": "string" - }, - "value": { - "type": "string", - "format": "byte" } - } + }, + "additionalProperties": {} }, "rpcStatus": { "type": "object", From c752e46538a23bf63bd135286a10ad5d09a48bc1 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Tue, 26 Apr 2022 18:55:36 +0800 Subject: [PATCH 5/6] get available region for product Signed-off-by: zhouqunjie <450705171@qq.com> --- adaptor/pod_adaptor/server/pod/pod.go | 32 ++--- adaptor/pod_adaptor/service/poder/ali_eci.go | 83 +++++++------ .../pod_adaptor/service/poder/huawei_cci.go | 49 +++++--- adaptor/pod_adaptor/service/poder/k8s.go | 110 +++++++++--------- .../pod_adaptor/service/poder/tencent_eks.go | 109 +++-------------- common/server/server_pod.go | 2 +- common/tenanter/region.go | 62 ++++++++-- go.mod | 2 + idl/pbpod/pod.proto | 31 ++--- 9 files changed, 235 insertions(+), 245 deletions(-) diff --git a/adaptor/pod_adaptor/server/pod/pod.go b/adaptor/pod_adaptor/server/pod/pod.go index c67addb3..00b3c54d 100644 --- a/adaptor/pod_adaptor/server/pod/pod.go +++ b/adaptor/pod_adaptor/server/pod/pod.go @@ -14,8 +14,8 @@ import ( "github.com/pkg/errors" ) -// GetPodRegions get the available region for pod -func GetPodRegions(ctx context.Context, req *pbpod.GetPodRegionReq) (resp *pbpod.GetPodRegionResp, err error) { +// GetPodRegion get the available region for pod +func GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (resp *pbpod.GetPodRegionResp, err error) { var ( regionInit tenanter.Region regions []*pbtenant.Region @@ -27,24 +27,7 @@ func GetPodRegions(ctx context.Context, req *pbpod.GetPodRegionReq) (resp *pbpod case pbtenant.CloudProvider_tencent: regionInit, _ = tenanter.NewRegion(req.GetProvider(), 5) case pbtenant.CloudProvider_huawei: - //type result struct { - // Args string `json:"args"` - // Headers map[string]string `json:"headers"` - // Origin string `json:"origin"` - // Url string `json:"url"` - //} - ////todo - //resp, err := http.Get("https://apiexplorer.developer.huaweicloud.com/v4/regions?product_short=CCI&api_name=createCoreV1NamespacedPod") - //if err != nil { - // println("error") - //} - //defer resp.Body.Close() - //body, _ := ioutil.ReadAll(resp.Body) - //fmt.Println(string(body)) - //var res result - //_ = json.Unmarshal(body, &res) - //regions = append(regions, nil) - return nil, nil + regionInit, _ = tenanter.NewRegion(req.GetProvider(), 5) } tenanters, err := tenanter.GetTenanters(req.GetProvider()) if err != nil { @@ -231,17 +214,16 @@ func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, er return nil, errors.WithMessage(err, "getTenanters error") } - regions := tenanter.GetAllRegionIds(req.Provider) + //regions := tenanter.GetAllRegionIds(req.Provider) reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()} - respPodRegion, err := GetPodRegions(ctx, reqPodRegion) + respPodRegion, err := GetPodRegion(ctx, reqPodRegion) if err != nil { return nil, errors.WithMessage(err, "getPodRegion error") } - fmt.Println(respPodRegion) - wg.Add(len(tenanters) * len(regions)) + wg.Add(len(tenanters) * len(respPodRegion.Regions)) for _, t := range tenanters { - for _, region := range regions { + for _, region := range respPodRegion.Regions { go func(tenant tenanter.Tenanter, region tenanter.Region) { defer wg.Done() pod, err := poder.NewPodClient(req.Provider, region, tenant) diff --git a/adaptor/pod_adaptor/service/poder/ali_eci.go b/adaptor/pod_adaptor/service/poder/ali_eci.go index 099b427b..8fd7a22f 100644 --- a/adaptor/pod_adaptor/service/poder/ali_eci.go +++ b/adaptor/pod_adaptor/service/poder/ali_eci.go @@ -2,18 +2,17 @@ package poder import ( "context" - "fmt" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + alieci "github.com/aliyun/alibaba-cloud-sdk-go/services/eci" + "github.com/bitly/go-simplejson" + "github.com/golang/glog" "strconv" "sync" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - + "github.com/pkg/errors" "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbpod" - pbtenant "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" - - alieci "github.com/aliyun/alibaba-cloud-sdk-go/services/eci" - "github.com/pkg/errors" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" ) var aliClientMutex sync.Mutex @@ -28,24 +27,36 @@ func (eci *AliEci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) regions := make([]*pbtenant.Region, 0) - request := alieci.CreateDescribeRegionsRequest() - request.RegionId = "cn-beijing" - resp, err := eci.cli.DescribeRegions(request) - if err != nil { - return nil, errors.Wrap(err, "ali eci describe region error") - } - for _, eciRegion := range resp.Regions { + requestRegion := requests.NewCommonRequest() + requestRegion.Method = "POST" + requestRegion.Scheme = "https" // https | http + requestRegion.Domain = "eci.aliyuncs.com" + requestRegion.Version = "2018-08-08" + requestRegion.ApiName = "DescribeRegions" + //这里需要给一个空字符串的RegionId + requestRegion.QueryParams["RegionId"] = "" - regionId, err := strconv.ParseInt(eciRegion.RegionId, 10, 32) - if err == nil { - fmt.Printf("%T, %v\n", regionId, err) - } + resp, err := eci.cli.ProcessCommonRequest(requestRegion) + + var respRegion *simplejson.Json + respRegion, err = simplejson.NewJson([]byte(resp.GetHttpContentString())) + if err != nil { + panic("解析失败") + } + + i := 0 + for i < len(respRegion.Get("Regions").MustArray()) { + regionsJson := respRegion.Get("Regions").GetIndex(i) + regionName, _ := regionsJson.Get("RegionId").String() + regionId, _ := tenanter.GetAliRegionId(regionName) regionPod := &pbtenant.Region{ - Id: int32(regionId), - Name: eciRegion.RegionEndpoint, + Id: regionId, + Name: regionName, } regions = append(regions, regionPod) + i++ } + return &pbpod.GetPodRegionResp{Regions: regions}, nil } @@ -95,45 +106,45 @@ func (eci *AliEci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbp if len(resp.ContainerGroupId) > 0 { isFinished = true } + glog.Infof("--------------------Aliyun ECI Instance created--------------------") return &pbpod.CreatePodResp{ - Pods: nil, Finished: isFinished, - RequestId: "ali pod ID:" + resp.ContainerGroupId, + RequestId: "Create Ali pod request ID:" + resp.RequestId, + PodId: resp.ContainerGroupId, + PodName: req.PodName, }, nil } func (eci *AliEci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - //生成删除请求 deleteContainerGroupRequest := alieci.CreateDeleteContainerGroupRequest() deleteContainerGroupRequest.RegionId = eci.region.GetName() deleteContainerGroupRequest.ContainerGroupId = req.PodId - deleteContainerGroupResponse, err := eci.cli.DeleteContainerGroup(deleteContainerGroupRequest) + resp, err := eci.cli.DeleteContainerGroup(deleteContainerGroupRequest) isFinished := true if err != nil { isFinished = false return nil, errors.Wrap(err, "Aliyun DeletePod error") } - requestId := deleteContainerGroupResponse.RequestId + glog.Infof("--------------------Aliyun ECI Instance deleted--------------------") return &pbpod.DeletePodResp{ - //Pods: nil, Finished: isFinished, - RequestId: requestId, + RequestId: "Delete Ali pod request ID:" + resp.RequestId, + PodId: req.PodId, + PodName: req.PodName, }, nil } func (eci *AliEci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - //TODO implement ali eci update pod - //生成更新请求 + updateContainerGroupRequest := alieci.CreateUpdateContainerGroupRequest() updateContainerGroupRequest.RegionId = eci.region.GetName() updateContainerGroupRequest.ContainerGroupId = req.PodId - //容器实体内容,这里测试可以修改配置文件中的重启策略 updateContainerRequestContainer := make([]alieci.UpdateContainerGroupContainer, 1) updateContainerRequestContainer[0].Image = req.ContainerImage updateContainerRequestContainer[0].Name = req.ContainerName @@ -142,19 +153,20 @@ func (eci *AliEci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbp updateContainerGroupRequest.Container = &updateContainerRequestContainer updateContainerGroupRequest.RestartPolicy = req.RestartPolicy - updateContainerGroupResponse, err := eci.cli.UpdateContainerGroup(updateContainerGroupRequest) + resp, err := eci.cli.UpdateContainerGroup(updateContainerGroupRequest) isFinished := true if err != nil { isFinished = false - return nil, errors.Wrap(err, "Aliyun DeletePod error") + return nil, errors.Wrap(err, "Aliyun UpdatePod error") } - requestId := updateContainerGroupResponse.RequestId + glog.Infof("--------------------Aliyun ECI Instance updated--------------------") return &pbpod.UpdatePodResp{ - //Pods: nil, Finished: isFinished, - RequestId: requestId, + RequestId: "Update Ali pod request ID:" + resp.RequestId, + PodId: req.PodId, + PodName: req.PodName, }, nil } @@ -162,6 +174,7 @@ func (eci *AliEci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailRe request := alieci.CreateDescribeContainerGroupsRequest() request.NextToken = req.NextToken resp, err := eci.cli.DescribeContainerGroups(request) + if err != nil { return nil, errors.Wrap(err, "Aliyun ListDetail error") } diff --git a/adaptor/pod_adaptor/service/poder/huawei_cci.go b/adaptor/pod_adaptor/service/poder/huawei_cci.go index 2c5db0a4..ad3b0b28 100644 --- a/adaptor/pod_adaptor/service/poder/huawei_cci.go +++ b/adaptor/pod_adaptor/service/poder/huawei_cci.go @@ -3,6 +3,7 @@ package poder import ( "context" "fmt" + util "github.com/alibabacloud-go/tea-utils/service" "sync" "k8s.io/apimachinery/pkg/api/resource" @@ -32,13 +33,14 @@ type HuaweiCci struct { } func (cci *HuaweiCci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { - //TODO implement me + //todo var ( regions []*pbtenant.Region ) + huaweiRegionName, _ := tenanter.GetHuaweiRegionName(5) region := &pbtenant.Region{ - Id: 1, - Name: "region", + Id: 5, + Name: huaweiRegionName, } regions = append(regions, region) resp := &pbpod.GetPodRegionResp{ @@ -48,6 +50,7 @@ func (cci *HuaweiCci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionR return resp, nil } +//CCI auth through iam const ( apiVersion = "client.authentication.k8s.io/v1beta1" iamEndpoint = "https://iam.myhuaweicloud.com" @@ -124,7 +127,6 @@ func (cci *HuaweiCci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (* } 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") } @@ -134,33 +136,39 @@ func (cci *HuaweiCci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (* isFinished = true } + glog.Infof("--------------------Huawei CCI Instance created--------------------") + return &pbpod.CreatePodResp{ - Pods: nil, Finished: isFinished, - RequestId: "huawei pod Name:" + resp.Name, + RequestId: "Create huawei pod request ID:" + resp.GenerateName, + PodId: string(resp.Generation), + PodName: resp.Name, }, 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) + err := cci.cli.CoreV1().Pods(req.GetNamespace()).Delete(req.PodName, &metav1.DeleteOptions{}) + isFinished := true if err != nil { isFinished = false return nil, errors.Wrap(err, "Huaweiyun DeletePod error") } + glog.Infof("--------------------Huawei CCI Instance deleted--------------------") + glog.Infof(*util.ToJSONString(util.ToMap(err))) + return &pbpod.DeletePodResp{ - //Pods: err, - Finished: isFinished, - //RequestId: resp.RequestId, + Finished: isFinished, + RequestId: "Delete huawei pod request ID:" + req.PodName, + PodId: req.PodName, + PodName: req.PodName, }, 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{}) if err != nil { return nil, errors.Wrap(err, "Huaweiyun UpdatePod error") @@ -182,20 +190,25 @@ func (cci *HuaweiCci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (* return nil, errors.Wrap(err, "Huaweiyun UpdatePod error") } + glog.Infof("--------------------Huawei CCI Instance updated--------------------") + isFinished := false if len(resp.UID) > 0 { isFinished = true } return &pbpod.UpdatePodResp{ - Pod: nil, - Finished: isFinished, - //RequestId: resp.RequestId, + Finished: isFinished, + RequestId: "Update huawei pod request ID:" + resp.GenerateName, + PodId: string(resp.Generation), + PodName: resp.Name, }, 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") } @@ -217,6 +230,8 @@ func (cci *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetai } } + glog.Infof("--------------------Huawei CCI Instance updated--------------------") + isFinished := false if len(pods) < int(req.PageSize) { isFinished = true @@ -227,7 +242,5 @@ func (cci *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetai Finished: isFinished, PageNumber: req.PageNumber + 1, PageSize: req.PageSize, - //NextToken: resp.NextToken, - //RequestId: resp.RequestId, }, nil } diff --git a/adaptor/pod_adaptor/service/poder/k8s.go b/adaptor/pod_adaptor/service/poder/k8s.go index a893ef63..25cdbf46 100644 --- a/adaptor/pod_adaptor/service/poder/k8s.go +++ b/adaptor/pod_adaptor/service/poder/k8s.go @@ -31,12 +31,14 @@ type K8SPoder struct { } func (k K8SPoder) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { + //todo var ( regions []*pbtenant.Region ) + huaweiRegionName, _ := tenanter.GetK8SRegionName(0) region := &pbtenant.Region{ - Id: 1, - Name: "region", + Id: 0, + Name: huaweiRegionName, } regions = append(regions, region) resp := &pbpod.GetPodRegionResp{ @@ -80,45 +82,6 @@ func newK8SClient(tenant tenanter.Tenanter) (Poder, error) { }, nil } -func (k K8SPoder) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - //TODO implement me - resp, err := k.cli.CoreV1().Pods(req.GetNamespace()).List(metav1.ListOptions{}) - if err != nil { - return nil, errors.Wrap(err, "K8S ListDetail pod error") - } - glog.Info("K8S ListDetail pod success", resp.Items) - var pods = make([]*pbpod.PodInstance, len(resp.Items)) - for k, v := range resp.Items { - pods[k] = &pbpod.PodInstance{ - Provider: pbtenant.CloudProvider_k8s, - AccountName: req.AccountName, - PodId: string(v.GetUID()), - PodName: v.Name, - ContainerImage: v.Spec.Containers[0].Image, - ContainerName: v.Spec.Containers[0].Name, - CpuPod: v.Spec.Containers[0].Resources.Requests.Cpu().String(), - MemoryPod: v.Spec.Containers[0].Resources.Requests.Memory().String(), - Namespace: v.Namespace, - Status: string(v.Status.Phase), - } - } - - isFinished := false - if len(pods) < int(req.PageSize) { - isFinished = true - } - - return &pbpod.ListPodDetailResp{ - Pods: pods, - Finished: isFinished, - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - //NextToken: resp.NextToken, - //RequestId: resp.RequestId, - }, nil - -} - func (k *K8SPoder) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { pod := corev1.Pod{ @@ -150,21 +113,22 @@ func (k *K8SPoder) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbp } resp, err := k.cli.CoreV1().Pods(req.Namespace).Create(&pod) - - glog.Info("K8S create pod resp", resp) if err != nil { return nil, errors.Wrap(err, "K8S CreatePod error") } + glog.Infof("--------------------K8S Pod Instance created--------------------") + isFinished := false if len(resp.UID) > 0 { isFinished = true } return &pbpod.CreatePodResp{ - Pods: nil, Finished: isFinished, RequestId: "K8S pod Name:" + resp.Name, + PodId: string(resp.UID), + PodName: resp.Name, }, nil } @@ -175,7 +139,8 @@ func (k K8SPoder) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpo fmt.Println("K8S ContainerGroup:", podName, " Deleted") err := k.cli.CoreV1().Pods(req.Namespace).Delete(podName, &metav1.DeleteOptions{}) - glog.Info("K8S delete pod resp", err) + glog.Infof("--------------------K8S Pod Instance deleted--------------------") + isFinished := true if err != nil { isFinished = false @@ -183,9 +148,10 @@ func (k K8SPoder) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpo } return &pbpod.DeletePodResp{ - //Pods: err, - Finished: isFinished, - //RequestId: resp.RequestId, + Finished: isFinished, + RequestId: "K8S pod Name:" + req.PodName, + PodId: req.PodName, + PodName: req.PodName, }, nil } @@ -207,20 +173,60 @@ func (k K8SPoder) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpo } pod.Spec.Containers[0].Image = req.ContainerImage resp, err := k.cli.CoreV1().Pods(req.Namespace).Update(&pod) - glog.Info("K8S update pod resp", resp) if err != nil { return nil, errors.Wrap(err, "K8S UpdatePod error") } + glog.Infof("--------------------K8S Pod Instance updated--------------------") + isFinished := false if len(resp.UID) > 0 { isFinished = true } return &pbpod.UpdatePodResp{ - Pod: nil, - Finished: isFinished, - //RequestId: resp.RequestId, + Finished: isFinished, + RequestId: "K8S pod Name:" + req.PodName, + PodId: string(resp.UID), + PodName: req.PodName, + }, nil + +} + +func (k K8SPoder) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { + resp, err := k.cli.CoreV1().Pods(req.GetNamespace()).List(metav1.ListOptions{}) + if err != nil { + return nil, errors.Wrap(err, "K8S ListDetail pod error") + } + + var pods = make([]*pbpod.PodInstance, len(resp.Items)) + for k, v := range resp.Items { + pods[k] = &pbpod.PodInstance{ + Provider: pbtenant.CloudProvider_k8s, + AccountName: req.AccountName, + PodId: string(v.GetUID()), + PodName: v.Name, + ContainerImage: v.Spec.Containers[0].Image, + ContainerName: v.Spec.Containers[0].Name, + CpuPod: v.Spec.Containers[0].Resources.Requests.Cpu().String(), + MemoryPod: v.Spec.Containers[0].Resources.Requests.Memory().String(), + Namespace: v.Namespace, + Status: string(v.Status.Phase), + } + } + + glog.Infof("--------------------Huawei CCI Instance updated--------------------") + + isFinished := false + if len(pods) < int(req.PageSize) { + isFinished = true + } + + return &pbpod.ListPodDetailResp{ + Pods: pods, + Finished: isFinished, + PageNumber: req.PageNumber + 1, + PageSize: req.PageSize, }, nil } diff --git a/adaptor/pod_adaptor/service/poder/tencent_eks.go b/adaptor/pod_adaptor/service/poder/tencent_eks.go index f4aeabe1..da562655 100644 --- a/adaptor/pod_adaptor/service/poder/tencent_eks.go +++ b/adaptor/pod_adaptor/service/poder/tencent_eks.go @@ -67,7 +67,7 @@ func newTencentEksClient(region tenanter.Region, tenant tenanter.Tenanter) (Pode } if err != nil { - return nil, errors.Wrap(err, "init ali ecs client error") + return nil, errors.Wrap(err, "init tencent eks client error") } return &TencentEks{ @@ -97,8 +97,6 @@ func (eks TencentEks) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (* container[0] = new(tencenteks.Container) container[0].Name = &containerName container[0].Image = &containerImage - //container[0].Cpu = containerCpuPt - //container[0].Memory = containerMemoryPt request.Containers = container eksCpu64, err := strconv.ParseFloat(eksCpu, 64) @@ -115,15 +113,17 @@ func (eks TencentEks) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (* } isFinished := false - if resp.Response.RequestId != nil { isFinished = true } + glog.Infof("--------------------K8S Pod Instance created--------------------") + return &pbpod.CreatePodResp{ - Pods: nil, Finished: isFinished, - RequestId: *resp.Response.RequestId, + RequestId: "tencent pod create request id:" + *resp.Response.RequestId, + PodId: *resp.Response.EksCiIds[0], + PodName: req.PodName, }, nil } @@ -140,12 +140,13 @@ func (eks *TencentEks) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) ( return nil, errors.Wrap(err, "Tencent DeletePod error") } - requestId := resp.Response.RequestId + glog.Infof("--------------------K8S Pod Instance deleted--------------------") return &pbpod.DeletePodResp{ - Pods: nil, Finished: isFinished, - RequestId: *requestId, + RequestId: "tencent pod delete request id:" + *resp.Response.RequestId, + PodId: req.PodId, + PodName: req.PodName, }, nil } @@ -167,14 +168,16 @@ func (eks *TencentEks) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) ( isFinished := true if err != nil { isFinished = false - glog.Errorf("Tencent UpdatePod error: %v", err) return nil, errors.Wrap(err, "Tencent UpdatePod error") } + glog.Infof("--------------------K8S Pod Instance deleted--------------------") + return &pbpod.UpdatePodResp{ - Pod: nil, Finished: isFinished, - RequestId: "tencent pod ID:" + *resp.Response.EksCiId, + RequestId: "tencent pod update request id:" + *resp.Response.RequestId, + PodId: req.PodId, + PodName: req.PodName, }, nil } @@ -208,88 +211,14 @@ func (eks TencentEks) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetai if len(ekspods) < int(req.PageSize) { isFinished = true } + + glog.Infof("--------------------K8S Pod Instance deleted--------------------") + return &pbpod.ListPodDetailResp{ Pods: ekspods, Finished: isFinished, PageNumber: req.PageNumber + 1, PageSize: req.PageSize, - //NextToken: resp.NextToken, - RequestId: *resp.Response.RequestId, + RequestId: *resp.Response.RequestId, }, nil } - -// -//func ListEksInstance(cloudStack string, akskPath string, configPath string) { -// -// configCommon, _ := pcmCommon.PCMconfig(configPath) -// configAksk, _ := aksk.AkskConfig(cloudStack, akskPath) -// -// credential := common.NewCredential(configAksk.AccessKey, configAksk.SecretKey) -// cpf := profile.NewClientProfile() -// cpf.HttpProfile.Endpoint = "tke.tencentcloudapi.com" -// client, _ := tke.NewClient(credential, configCommon.RegionId, cpf) -// -// request := tke.NewDescribeEKSContainerInstancesRequest() -// -// response, err := client.DescribeEKSContainerInstances(request) -// if _, ok := err.(*errors.TencentCloudSDKError); ok { -// fmt.Printf("An API error has returned: %s", err) -// return -// } -// if err != nil { -// panic(err) -// } -// fmt.Printf("%s", response.ToJsonString()) -//} -// -//func UpdateEksInstance(cloudStack string, akskPath string, configPath string) { -// -// configCommon, _ := pcmCommon.PCMconfig(configPath) -// configAksk, _ := aksk.AkskConfig(cloudStack, akskPath) -// -// credential := common.NewCredential(configAksk.AccessKey, configAksk.SecretKey) -// cpf := profile.NewClientProfile() -// cpf.HttpProfile.Endpoint = "tke.tencentcloudapi.com" -// client, _ := tke.NewClient(credential, configCommon.RegionId, cpf) -// -// request := tke.NewUpdateEKSContainerInstanceRequest() -// request.EksCiId = &configCommon.ContainerGroupIdUpdate -// request.Name = &configCommon.ContainerGroupNameUpdate -// -// response, err := client.UpdateEKSContainerInstance(request) -// if _, ok := err.(*errors.TencentCloudSDKError); ok { -// fmt.Printf("An API error has returned: %s", err) -// return -// } -// if err != nil { -// panic(err) -// } -// fmt.Printf("%s", response.ToJsonString()) -//} -// -//func DeleteEksInstance(cloudStack string, akskPath string, configPath string) { -// -// configCommon, _ := pcmCommon.PCMconfig(configPath) -// configAksk, _ := aksk.AkskConfig(cloudStack, akskPath) -// -// credential := common.NewCredential(configAksk.AccessKey, configAksk.SecretKey) -// cpf := profile.NewClientProfile() -// cpf.HttpProfile.Endpoint = "tke.tencentcloudapi.com" -// client, _ := tke.NewClient(credential, configCommon.RegionId, cpf) -// -// request := tke.NewDeleteEKSContainerInstancesRequest() -// eksCiIds := make([]*string, 1) -// eksCiIds[0] = &configCommon.ContainerGroupIdDelete -// -// request.EksCiIds = eksCiIds -// -// response, err := client.DeleteEKSContainerInstances(request) -// if _, ok := err.(*errors.TencentCloudSDKError); ok { -// fmt.Printf("An API error has returned: %s", err) -// return -// } -// if err != nil { -// panic(err) -// } -// fmt.Printf("%s", response.ToJsonString()) -//} diff --git a/common/server/server_pod.go b/common/server/server_pod.go index 4e4a1321..d928ab09 100644 --- a/common/server/server_pod.go +++ b/common/server/server_pod.go @@ -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.GetPodRegions(ctx, req) + resp, err := pod.GetPodRegion(ctx, req) if err != nil { glog.Errorf("CreatePods error %+v", err) return nil, status.Errorf(codes.Internal, err.Error()) diff --git a/common/tenanter/region.go b/common/tenanter/region.go index 9a9f8983..ad4148d2 100644 --- a/common/tenanter/region.go +++ b/common/tenanter/region.go @@ -35,11 +35,11 @@ func NewRegion(provider pbtenant.CloudProvider, regionId int32) (Region, error) switch provider { case pbtenant.CloudProvider_ali: - r.regionName, err = getAliRegionName(regionId) + r.regionName, err = GetAliRegionName(regionId) case pbtenant.CloudProvider_tencent: - r.regionName, err = getTencentRegionName(regionId) + r.regionName, err = GetTencentRegionName(regionId) case pbtenant.CloudProvider_huawei: - r.regionName, err = getHuaweiRegionName(regionId) + r.regionName, err = GetHuaweiRegionName(regionId) //case pbtenant.CloudProvider_aws: // r.regionName, err = getAwsRegionName(regionId) } @@ -87,8 +87,8 @@ func GetAllRegionIds(provider pbtenant.CloudProvider) (regions []Region) { return } -// prefix ali_ -func getAliRegionName(regionId int32) (string, error) { +// GetAliRegionName prefix ali_ +func GetAliRegionName(regionId int32) (string, error) { name, ok := pbtenant.AliRegionId_name[regionId] if !ok || regionId == int32(pbtenant.AliRegionId_ali_all) { return "", errors.WithMessagef(ErrNoExistAliRegionId, "input region id is %d", regionId) @@ -97,8 +97,18 @@ func getAliRegionName(regionId int32) (string, error) { return region[4:], nil } -// prefix tc_ -func getTencentRegionName(regionId int32) (string, error) { +// GetAliRegionId prefix ali_ +func GetAliRegionId(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 +} + +// GetTencentRegionName prefix tencent +func GetTencentRegionName(regionId int32) (string, error) { name, ok := pbtenant.TencentRegionId_name[regionId] if !ok || regionId == int32(pbtenant.TencentRegionId_tc_all) { return "", errors.WithMessagef(ErrNoExistTencentRegionId, "input region id is %d", regionId) @@ -107,8 +117,8 @@ func getTencentRegionName(regionId int32) (string, error) { return region[3:], nil } -// prefix hw_ -func getHuaweiRegionName(regionId int32) (string, error) { +// GetHuaweiRegionName prefix huawei +func GetHuaweiRegionName(regionId int32) (string, error) { name, ok := pbtenant.HuaweiRegionId_name[regionId] if !ok || regionId == int32(pbtenant.HuaweiRegionId_hw_all) { return "", errors.WithMessagef(ErrNoExistHuaweiRegionId, "input region id is %d", regionId) @@ -117,8 +127,38 @@ func getHuaweiRegionName(regionId int32) (string, error) { return region[3:], nil } -// prefix aws_ -func getAwsRegionName(regionId int32) (string, error) { +// GetHuaweiRegionId prefix huawei +func GetHuaweiRegionId(regionName string) (int32, error) { + regionName = "hw_" + 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 +} + +// GetK8SRegionName prefix ali_ +func GetK8SRegionName(regionId int32) (string, error) { + name, ok := pbtenant.AliRegionId_name[regionId] + if !ok || regionId == int32(pbtenant.AliRegionId_ali_all) { + return "", errors.WithMessagef(ErrNoExistAliRegionId, "input region id is %d", regionId) + } + region := strings.ReplaceAll(name, "_", "-") + return region[4:], nil +} + +// 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 +} + +// GetAwsRegionName prefix aws_ +func GetAwsRegionName(regionId int32) (string, error) { name, ok := pbtenant.AwsRegionId_name[regionId] if !ok || regionId == int32(pbtenant.AwsRegionId_aws_all) { return "", errors.WithMessagef(ErrNoExistAwsRegionId, "input region id is %d", regionId) diff --git a/go.mod b/go.mod index a07670ce..b8706aee 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/alibabacloud-go/tea v1.1.15 github.com/alibabacloud-go/tea-utils v1.3.9 github.com/aliyun/alibaba-cloud-sdk-go v1.61.1530 + github.com/bitly/go-simplejson v0.5.0 github.com/go-yaml/yaml v2.1.0+incompatible github.com/golang/glog v1.0.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0 @@ -30,6 +31,7 @@ require ( github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect github.com/alibabacloud-go/openapi-util v0.0.7 // indirect github.com/aliyun/credentials-go v1.1.2 // indirect + github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415 // indirect github.com/golang/protobuf v1.5.2 // indirect diff --git a/idl/pbpod/pod.proto b/idl/pbpod/pod.proto index e9806794..45a6d3d2 100644 --- a/idl/pbpod/pod.proto +++ b/idl/pbpod/pod.proto @@ -82,12 +82,14 @@ message CreatePodReq { } message CreatePodResp { - // Pod集合 - repeated PodInstance pods = 1; // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 2; + bool finished = 1; // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 3; + string request_id = 2; + // podId + string pod_id = 3; + // podName + string pod_name = 4; } message DeletePodReq { @@ -106,12 +108,14 @@ message DeletePodReq { } message DeletePodResp { - // Pod集合 - repeated PodInstance pods = 1; // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 2; + bool finished = 1; // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 3; + string request_id = 2; + // podId + string pod_id = 3; + // podName + string pod_name = 4; } message UpdatePodReq { @@ -142,12 +146,14 @@ message UpdatePodReq { } message UpdatePodResp { - // Pod集合 - PodInstance pod = 1; // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 2; + bool finished = 1; // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 3; + string request_id = 2; + // podId + string pod_id = 3; + // podName + string pod_name = 4; } message ListPodDetailReq { @@ -212,7 +218,6 @@ message GetPodRegionResp { message ListPodAllReq{} - // Pod类产品接口 // 阿里云 - ECI // 腾讯云 - TKS From ca4b1a34dbbbdb33c819328eb076b9463382a374 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Thu, 28 Apr 2022 16:41:38 +0800 Subject: [PATCH 6/6] bug fix Signed-off-by: zhouqunjie <450705171@qq.com> --- adaptor/pod_adaptor/server/pod/pod.go | 3 +-- common/tenanter/main_test.go | 5 +---- common/tenanter/region_test.go | 1 - idl/pbpod/pod.proto | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/adaptor/pod_adaptor/server/pod/pod.go b/adaptor/pod_adaptor/server/pod/pod.go index 00b3c54d..50ae6ad7 100644 --- a/adaptor/pod_adaptor/server/pod/pod.go +++ b/adaptor/pod_adaptor/server/pod/pod.go @@ -213,8 +213,7 @@ func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, er if err != nil { return nil, errors.WithMessage(err, "getTenanters error") } - - //regions := tenanter.GetAllRegionIds(req.Provider) + //get the available region for product reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()} respPodRegion, err := GetPodRegion(ctx, reqPodRegion) if err != nil { diff --git a/common/tenanter/main_test.go b/common/tenanter/main_test.go index 20889881..51cda479 100644 --- a/common/tenanter/main_test.go +++ b/common/tenanter/main_test.go @@ -10,7 +10,6 @@ var ( aliTenant []Tenanter tcTenant []Tenanter hwTenant []Tenanter - awsTenant []Tenanter ) func TestMain(m *testing.M) { @@ -28,8 +27,6 @@ func TestMain(m *testing.M) { if hwTenant, err = GetTenanters(pbtenant.CloudProvider_huawei); err != nil { panic("get hwTenant failed") } - if awsTenant, err = GetTenanters(pbtenant.CloudProvider_aws); err != nil { - panic("get awsTenant failed") - } + os.Exit(m.Run()) } diff --git a/common/tenanter/region_test.go b/common/tenanter/region_test.go index 5d2bcfad..7314a417 100644 --- a/common/tenanter/region_test.go +++ b/common/tenanter/region_test.go @@ -17,7 +17,6 @@ func TestGetAllRegionIds(t *testing.T) { {name: "ali", args: args{provider: pbtenant.CloudProvider_ali}}, {name: "tencent", args: args{provider: pbtenant.CloudProvider_tencent}}, {name: "huawei", args: args{provider: pbtenant.CloudProvider_huawei}}, - {name: "aws", args: args{provider: pbtenant.CloudProvider_aws}}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/idl/pbpod/pod.proto b/idl/pbpod/pod.proto index 45a6d3d2..6abbc4a1 100644 --- a/idl/pbpod/pod.proto +++ b/idl/pbpod/pod.proto @@ -41,7 +41,7 @@ message PodInstance { message CreatePodsReq { - // 云类型 + // 创建请求集合 repeated CreatePodReq createPodReq = 1; }