mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
Merge pull request #2109 from yousong/bugfix/yousong-lbcluster-zone
lbclusters: 创建时仅允许指定OneCloud Zone
This commit is contained in:
@@ -57,6 +57,9 @@ func (man *SLoadbalancerClusterManager) ValidateCreateData(ctx context.Context,
|
||||
if err := zoneV.Validate(data); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if zone := zoneV.Model.(*SZone); zone.ExternalId != "" {
|
||||
return nil, httperrors.NewInputParameterError("allow only internal zone, got %s(%s)", zone.Name, zone.Id)
|
||||
}
|
||||
return man.SStandaloneResourceBaseManager.ValidateCreateData(ctx, userCred, ownerId, query, data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user