mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #10002 from lvyangyang/locals-zhCn-fix
fix(region): vpcpeering error message translation
This commit is contained in:
+3792
-3651
File diff suppressed because it is too large
Load Diff
+177
-177
File diff suppressed because it is too large
Load Diff
@@ -129,7 +129,7 @@ func (manager *SRouteTableRouteSetManager) ValidateCreateData(
|
||||
}
|
||||
|
||||
if input.NextHopType != api.Next_HOP_TYPE_VPCPEERING {
|
||||
return input, httperrors.NewNotSupportedError("not supported next hop type")
|
||||
return input, httperrors.NewNotSupportedError("not supported next hop type %s", input.NextHopType)
|
||||
}
|
||||
if input.NextHopType == api.Next_HOP_TYPE_VPCPEERING {
|
||||
_vpcPeer, err := VpcPeeringConnectionManager.FetchByIdOrName(userCred, input.NextHopId)
|
||||
@@ -207,7 +207,7 @@ func (self *SRouteTableRouteSet) ValidateUpdateData(
|
||||
}
|
||||
|
||||
if input.NextHopType != api.Next_HOP_TYPE_VPCPEERING {
|
||||
return input, httperrors.NewNotSupportedError("not supported next hop type")
|
||||
return input, httperrors.NewNotSupportedError("not supported next hop type %s", input.NextHopType)
|
||||
}
|
||||
if input.NextHopType == api.Next_HOP_TYPE_VPCPEERING {
|
||||
_vpcPeer, err := VpcPeeringConnectionManager.FetchByIdOrName(userCred, input.NextHopId)
|
||||
|
||||
@@ -121,7 +121,7 @@ func (manager *SVpcPeeringConnectionManager) ValidateCreateData(
|
||||
return input, err
|
||||
}
|
||||
if len(input.VpcId) == 0 {
|
||||
return input, httperrors.NewInputParameterError("vpc_id")
|
||||
return input, httperrors.NewMissingParameterError("vpc_id")
|
||||
}
|
||||
|
||||
// get vpc ,peerVpc
|
||||
@@ -188,10 +188,10 @@ func (manager *SVpcPeeringConnectionManager) ValidateCreateData(
|
||||
CrossCloudEnv := account.AccessUrl != peerAccount.AccessUrl
|
||||
CrossRegion := vpc.CloudregionId != peerVpc.CloudregionId
|
||||
if CrossCloudEnv && !factory.IsSupportCrossCloudEnvVpcPeering() {
|
||||
return input, httperrors.NewNotSupportedError("cloudprovider %s %s %s %s %s not supported CrossCloud vpcpeering", account.Provider, account.AccessUrl, vpc.CloudregionId, peerAccount.AccessUrl, peerVpc.CloudregionId)
|
||||
return input, httperrors.NewNotSupportedError("cloudprovider %s not supported CrossCloud vpcpeering", account.Provider)
|
||||
}
|
||||
if CrossRegion && !factory.IsSupportCrossRegionVpcPeering() {
|
||||
return input, httperrors.NewNotSupportedError("cloudprovider %s %s %s %s %s not supported CrossRegion vpcpeering", account.Provider, account.AccessUrl, vpc.CloudregionId, peerAccount.AccessUrl, peerVpc.CloudregionId)
|
||||
return input, httperrors.NewNotSupportedError("cloudprovider %s not supported CrossRegion vpcpeering", account.Provider)
|
||||
}
|
||||
if CrossRegion {
|
||||
err := factory.ValidateCrossRegionVpcPeeringBandWidth(input.Bandwidth)
|
||||
|
||||
Reference in New Issue
Block a user