mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
networks: eliminate a variable
This commit is contained in:
@@ -53,10 +53,6 @@ import (
|
||||
"yunion.io/x/onecloud/pkg/util/stringutils2"
|
||||
)
|
||||
|
||||
var (
|
||||
ALL_NETWORK_TYPES = api.ALL_NETWORK_TYPES
|
||||
)
|
||||
|
||||
type SNetworkManager struct {
|
||||
db.SSharableVirtualResourceBaseManager
|
||||
db.SExternalizedResourceBaseManager
|
||||
@@ -1271,7 +1267,7 @@ func (manager *SNetworkManager) validateEnsureZoneVpc(ctx context.Context, userC
|
||||
func (manager *SNetworkManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.NetworkCreateInput) (api.NetworkCreateInput, error) {
|
||||
if input.ServerType == "" {
|
||||
input.ServerType = api.NETWORK_TYPE_GUEST
|
||||
} else if !utils.IsInStringArray(input.ServerType, ALL_NETWORK_TYPES) {
|
||||
} else if !utils.IsInStringArray(input.ServerType, api.ALL_NETWORK_TYPES) {
|
||||
return input, httperrors.NewInputParameterError("Invalid server_type: %s", input.ServerType)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user