fixed bug in listAll for wrong param of container image and name
This commit is contained in:
zhouqunjie 2022-04-07 17:34:58 +08:00
commit bf78c17b16
13 changed files with 294 additions and 229 deletions

View File

@ -143,8 +143,8 @@ func (eci *AliEci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailRe
PodName: v.ContainerGroupName,
RegionId: eci.region.GetId(),
RegionName: v.RegionId,
ContainerImage: v.Containers[k].Image,
ContainerName: v.Containers[k].Name,
ContainerImage: v.Containers[0].Image,
ContainerName: v.Containers[0].Name,
CpuPod: strconv.FormatFloat(float64(v.Cpu), 'f', 6, 64),
MemoryPod: strconv.FormatFloat(float64(v.Memory), 'f', 6, 64),
SecurityGroupId: v.SecurityGroupId,

View File

@ -146,6 +146,9 @@ func (cci *HuaweiCci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*
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")
}
pod := corev1.Pod{
TypeMeta: qresp.TypeMeta,
ObjectMeta: metav1.ObjectMeta{

View File

@ -5,6 +5,10 @@ import (
"strconv"
"sync"
"github.com/golang/glog"
"gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant"
"github.com/pkg/errors"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
@ -104,18 +108,93 @@ func (eks TencentEks) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*
}
func (eks *TencentEks) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) {
//TODO implement ali eci delete pod
return nil, nil
request := tencenteks.NewDeleteEKSContainerInstancesRequest()
request.EksCiIds = make([]*string, 1)
request.EksCiIds[0] = &req.PodId
resp, err := eks.cli.DeleteEKSContainerInstances(request)
isFinished := true
if err != nil {
isFinished = false
return nil, errors.Wrap(err, "Tencent DeletePod error")
}
requestId := resp.Response.RequestId
return &pbpod.DeletePodResp{
Pods: nil,
Finished: isFinished,
RequestId: *requestId,
}, nil
}
func (eks *TencentEks) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) {
//TODO implement ali eci update pod
return nil, nil
//创建更新pod请求
request := tencenteks.NewUpdateEKSContainerInstanceRequest()
request.EksCiId = &req.PodId
request.RestartPolicy = &req.RestartPolicy
request.Name = &req.PodName
cpu, err := strconv.ParseFloat(req.CpuPod, 64)
memory, err := strconv.ParseFloat(req.MemoryPod, 64)
request.Containers = make([]*tencenteks.Container, 1)
request.Containers[0] = new(tencenteks.Container)
request.Containers[0].Name = &req.ContainerName
request.Containers[0].Image = &req.ContainerImage
request.Containers[0].Cpu = &cpu
request.Containers[0].Memory = &memory
resp, err := eks.cli.UpdateEKSContainerInstance(request)
isFinished := true
if err != nil {
isFinished = false
glog.Errorf("Tencent UpdatePod error: %v", err)
return nil, errors.Wrap(err, "Tencent UpdatePod error")
}
requestId := resp.Response.RequestId
return &pbpod.UpdatePodResp{
Pod: nil,
Finished: isFinished,
RequestId: *requestId,
}, nil
}
func (eks TencentEks) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (resp *pbpod.ListPodDetailResp, err error) {
//TODO implement me
return nil, nil
func (eks TencentEks) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) {
request := tencenteks.NewDescribeEKSContainerInstancesRequest()
resp, err := eks.cli.DescribeEKSContainerInstances(request)
if err != nil {
return nil, errors.Wrap(err, "Tencent ListDetail pod error")
}
var ekspods = make([]*pbpod.PodInstance, len(resp.Response.EksCis))
for k, v := range resp.Response.EksCis {
ekspods[k] = &pbpod.PodInstance{
Provider: pbtenant.CloudProvider_tencent,
AccountName: eks.tenanter.AccountName(),
PodId: *v.EksCiId,
PodName: *v.EksCiName,
RegionId: eks.region.GetId(),
RegionName: eks.region.GetName(),
ContainerImage: *v.Containers[0].Image,
ContainerName: *v.Containers[0].Name,
CpuPod: strconv.FormatFloat(*v.Cpu, 'f', 6, 64),
MemoryPod: strconv.FormatFloat(*v.Memory, 'f', 6, 64),
SecurityGroupId: *v.SecurityGroupIds[0],
SubnetId: *v.SubnetId,
VpcId: *v.VpcId,
//Namespace: ,
}
}
isFinished := false
if len(ekspods) < int(req.PageSize) {
isFinished = true
}
return &pbpod.ListPodDetailResp{
Pods: ekspods,
Finished: isFinished,
PageNumber: req.PageNumber + 1,
PageSize: req.PageSize,
//NextToken: resp.NextToken,
RequestId: *resp.Response.RequestId,
}, nil
}
//

View File

@ -1,9 +1,10 @@
package tenanter
import (
"gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant"
"strings"
"gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant"
"github.com/pkg/errors"
)
@ -35,8 +36,8 @@ func NewRegion(provider pbtenant.CloudProvider, regionId int32) (Region, error)
switch provider {
case pbtenant.CloudProvider_ali:
r.regionName, err = getAliRegionName(regionId)
//case pbtenant.CloudProvider_tencent:
// r.regionName, err = getTencentRegionName(regionId)
case pbtenant.CloudProvider_tencent:
r.regionName, err = getTencentRegionName(regionId)
case pbtenant.CloudProvider_huawei:
r.regionName, err = getHuaweiRegionName(regionId)
//case pbtenant.CloudProvider_aws:

View File

@ -219,24 +219,21 @@ service PodService {
// Pod明细
rpc ListPodDetail(ListPodDetailReq) returns (ListPodDetailResp) {
option (google.api.http) = {
post : "/apis/pod/detail"
body : "*"
get : "/apis/pod/detail"
};
}
// Pod全量 -
rpc ListPod(ListPodReq) returns (ListPodResp) {
option (google.api.http) = {
post : "/apis/pod"
body : "*"
get : "/apis/pod"
};
}
// Pod
rpc ListPodAll(ListPodAllReq) returns (ListPodResp) {
option (google.api.http) = {
post : "/apis/pod/all"
body : "*"
get : "/apis/pod/all"
};
}
}

View File

@ -77,13 +77,12 @@ func RegisterDemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
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, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_DemoService_Echo_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_DemoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -140,13 +139,12 @@ func RegisterDemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_DemoService_Echo_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_DemoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)

View File

@ -145,13 +145,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
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, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_EcsService_ListEcsDetail_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -169,13 +168,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
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, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcs")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_EcsService_ListEcs_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_EcsService_ListEcs_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -193,13 +191,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
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, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_EcsService_ListEcsAll_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -256,13 +253,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_EcsService_ListEcsDetail_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@ -277,13 +273,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_EcsService_ListEcs_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_EcsService_ListEcs_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@ -298,13 +293,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_EcsService_ListEcsAll_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)

View File

@ -1296,7 +1296,7 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{
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, 0x86, 0x04, 0x0a,
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,
@ -1313,26 +1313,26 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{
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, 0x5f, 0x0a, 0x0d, 0x4c, 0x69,
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, 0x1b,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f,
0x64, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x3a, 0x01, 0x2a, 0x12, 0x46, 0x0a, 0x07, 0x4c,
0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f,
0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x14, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64,
0x3a, 0x01, 0x2a, 0x12, 0x50, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c,
0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f,
0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x18, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x61,
0x6c, 0x6c, 0x3a, 0x01, 0x2a, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x6b,
0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, 0x50, 0x43, 0x4d,
0x2f, 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x70,
0x62, 0x70, 0x6f, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
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 (

View File

@ -133,15 +133,18 @@ func local_request_PodService_UpdatePod_0(ctx context.Context, marshaler runtime
}
var (
filter_PodService_ListPodDetail_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_PodService_ListPodDetail_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListPodDetailReq
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPodDetail_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@ -154,11 +157,10 @@ func local_request_PodService_ListPodDetail_0(ctx context.Context, marshaler run
var protoReq ListPodDetailReq
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPodDetail_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@ -167,15 +169,18 @@ func local_request_PodService_ListPodDetail_0(ctx context.Context, marshaler run
}
var (
filter_PodService_ListPod_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_PodService_ListPod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListPodReq
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPod_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@ -188,11 +193,10 @@ func local_request_PodService_ListPod_0(ctx context.Context, marshaler runtime.M
var protoReq ListPodReq
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPod_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@ -205,14 +209,6 @@ func request_PodService_ListPodAll_0(ctx context.Context, marshaler runtime.Mars
var protoReq ListPodAllReq
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.ListPodAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
@ -222,14 +218,6 @@ func local_request_PodService_ListPodAll_0(ctx context.Context, marshaler runtim
var protoReq ListPodAllReq
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.ListPodAll(ctx, &protoReq)
return msg, metadata, err
@ -247,13 +235,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
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/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PodService_CreatePod_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_PodService_CreatePod_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -271,13 +258,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
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/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PodService_DeletePod_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_PodService_DeletePod_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -295,13 +281,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
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/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PodService_UpdatePod_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_PodService_UpdatePod_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -313,19 +298,18 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_PodService_ListPodDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_PodService_ListPodDetail_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/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PodService_ListPodDetail_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_PodService_ListPodDetail_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -337,19 +321,18 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_PodService_ListPod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_PodService_ListPod_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/ListPod", runtime.WithHTTPPathPattern("/apis/pod"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PodService_ListPod_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_PodService_ListPod_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -361,19 +344,18 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_PodService_ListPodAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_PodService_ListPodAll_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/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all"))
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_PodService_ListPodAll_0(ctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_PodService_ListPodAll_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
@ -430,13 +412,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
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"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PodService_CreatePod_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_PodService_CreatePod_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@ -451,13 +432,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
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/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PodService_DeletePod_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_PodService_DeletePod_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@ -472,13 +452,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
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/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PodService_UpdatePod_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_PodService_UpdatePod_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@ -489,17 +468,16 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_PodService_ListPodDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_PodService_ListPodDetail_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/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PodService_ListPodDetail_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_PodService_ListPodDetail_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@ -510,17 +488,16 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_PodService_ListPod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_PodService_ListPod_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/ListPod", runtime.WithHTTPPathPattern("/apis/pod"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PodService_ListPod_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_PodService_ListPod_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@ -531,17 +508,16 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_PodService_ListPodAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_PodService_ListPodAll_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/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all"))
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_PodService_ListPodAll_0(ctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_PodService_ListPodAll_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)

View File

@ -68,11 +68,14 @@
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
},
"additionalProperties": {}
}
},
"rpcStatus": {
"type": "object",

View File

@ -303,11 +303,14 @@
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
},
"additionalProperties": {}
}
},
"rpcStatus": {
"type": "object",

View File

@ -17,7 +17,7 @@
],
"paths": {
"/apis/pod": {
"post": {
"get": {
"summary": "查询Pod全量 - 根据云类型",
"operationId": "PodService_ListPod",
"responses": {
@ -36,12 +36,18 @@
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbpodListPodReq"
}
"name": "provider",
"description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云",
"in": "query",
"required": false,
"type": "string",
"enum": [
"ali",
"tencent",
"huawei",
"aws"
],
"default": "ali"
}
],
"tags": [
@ -50,7 +56,7 @@
}
},
"/apis/pod/all": {
"post": {
"get": {
"summary": "查询所有云的Pod",
"operationId": "PodService_ListPodAll",
"responses": {
@ -67,16 +73,6 @@
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbpodListPodAllReq"
}
}
],
"tags": [
"PodService"
]
@ -149,7 +145,7 @@
}
},
"/apis/pod/detail": {
"post": {
"get": {
"summary": "查询Pod明细",
"operationId": "PodService_ListPodDetail",
"responses": {
@ -168,12 +164,79 @@
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pbpodListPodDetailReq"
}
"name": "provider",
"description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云",
"in": "query",
"required": false,
"type": "string",
"enum": [
"ali",
"tencent",
"huawei",
"aws"
],
"default": "ali"
},
{
"name": "accountName",
"description": "账户名称根据config.yaml中的配置默认为第一个配置的账户.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "regionId",
"description": "区域Id参考 tenant.proto 中的各个云的区域.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "regionName",
"description": "区域名称各云厂商自定义的region name.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "podId",
"description": "podID.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "pageNumber",
"description": "分页相关参数,页码.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "pageSize",
"description": "分页相关参数,每页数量.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "nextToken",
"description": "分页相关参数下一页的token.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "namespace",
"description": "namespace.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
@ -344,55 +407,6 @@
}
}
},
"pbpodListPodAllReq": {
"type": "object"
},
"pbpodListPodDetailReq": {
"type": "object",
"properties": {
"provider": {
"$ref": "#/definitions/pbtenantCloudProvider",
"title": "云名称"
},
"accountName": {
"type": "string",
"title": "账户名称根据config.yaml中的配置默认为第一个配置的账户"
},
"regionId": {
"type": "integer",
"format": "int32",
"title": "区域Id参考 tenant.proto 中的各个云的区域"
},
"regionName": {
"type": "integer",
"format": "int32",
"title": "区域名称各云厂商自定义的region name"
},
"podId": {
"type": "integer",
"format": "int32",
"title": "podID"
},
"pageNumber": {
"type": "integer",
"format": "int32",
"title": "分页相关参数,页码"
},
"pageSize": {
"type": "integer",
"format": "int32",
"title": "分页相关参数,每页数量"
},
"nextToken": {
"type": "string",
"title": "分页相关参数下一页的token"
},
"namespace": {
"type": "string",
"title": "namespace"
}
}
},
"pbpodListPodDetailResp": {
"type": "object",
"properties": {
@ -427,15 +441,6 @@
}
}
},
"pbpodListPodReq": {
"type": "object",
"properties": {
"provider": {
"$ref": "#/definitions/pbtenantCloudProvider",
"title": "云名称"
}
}
},
"pbpodListPodResp": {
"type": "object",
"properties": {
@ -596,11 +601,14 @@
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
},
"additionalProperties": {}
}
},
"rpcStatus": {
"type": "object",

View File

@ -15,11 +15,14 @@
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
},
"additionalProperties": {}
}
},
"rpcStatus": {
"type": "object",