parent
c752e46538
commit
ca4b1a34db
|
@ -213,8 +213,7 @@ func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, er
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.WithMessage(err, "getTenanters error")
|
return nil, errors.WithMessage(err, "getTenanters error")
|
||||||
}
|
}
|
||||||
|
//get the available region for product
|
||||||
//regions := tenanter.GetAllRegionIds(req.Provider)
|
|
||||||
reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()}
|
reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()}
|
||||||
respPodRegion, err := GetPodRegion(ctx, reqPodRegion)
|
respPodRegion, err := GetPodRegion(ctx, reqPodRegion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -10,7 +10,6 @@ var (
|
||||||
aliTenant []Tenanter
|
aliTenant []Tenanter
|
||||||
tcTenant []Tenanter
|
tcTenant []Tenanter
|
||||||
hwTenant []Tenanter
|
hwTenant []Tenanter
|
||||||
awsTenant []Tenanter
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
@ -28,8 +27,6 @@ func TestMain(m *testing.M) {
|
||||||
if hwTenant, err = GetTenanters(pbtenant.CloudProvider_huawei); err != nil {
|
if hwTenant, err = GetTenanters(pbtenant.CloudProvider_huawei); err != nil {
|
||||||
panic("get hwTenant failed")
|
panic("get hwTenant failed")
|
||||||
}
|
}
|
||||||
if awsTenant, err = GetTenanters(pbtenant.CloudProvider_aws); err != nil {
|
|
||||||
panic("get awsTenant failed")
|
|
||||||
}
|
|
||||||
os.Exit(m.Run())
|
os.Exit(m.Run())
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ func TestGetAllRegionIds(t *testing.T) {
|
||||||
{name: "ali", args: args{provider: pbtenant.CloudProvider_ali}},
|
{name: "ali", args: args{provider: pbtenant.CloudProvider_ali}},
|
||||||
{name: "tencent", args: args{provider: pbtenant.CloudProvider_tencent}},
|
{name: "tencent", args: args{provider: pbtenant.CloudProvider_tencent}},
|
||||||
{name: "huawei", args: args{provider: pbtenant.CloudProvider_huawei}},
|
{name: "huawei", args: args{provider: pbtenant.CloudProvider_huawei}},
|
||||||
{name: "aws", args: args{provider: pbtenant.CloudProvider_aws}},
|
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
|
|
@ -41,7 +41,7 @@ message PodInstance {
|
||||||
|
|
||||||
|
|
||||||
message CreatePodsReq {
|
message CreatePodsReq {
|
||||||
// 云类型
|
// 创建请求集合
|
||||||
repeated CreatePodReq createPodReq = 1;
|
repeated CreatePodReq createPodReq = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue