diff --git a/controllers/network.go b/controllers/network.go index 6ce96ad4f..5d0625209 100644 --- a/controllers/network.go +++ b/controllers/network.go @@ -488,14 +488,6 @@ func createNetwork(w http.ResponseWriter, r *http.Request) { return } - if len(network.Name) > 32 { - err := errors.New("network name shouldn't exceed 32 characters") - logger.Log(0, r.Header.Get("user"), "failed to create network: ", - err.Error()) - logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest")) - return - } - if network.AddressRange == "" && network.AddressRange6 == "" { err := errors.New("IPv4 or IPv6 CIDR required") logger.Log(0, r.Header.Get("user"), "failed to create network: ", diff --git a/models/network.go b/models/network.go index 2e122b7aa..dfcba5185 100644 --- a/models/network.go +++ b/models/network.go @@ -8,7 +8,7 @@ import ( // Network Struct - contains info for a given unique network // At some point, need to replace all instances of Name with something else like Identifier type Network struct { - Name string `json:"name" validate:"required,min=1,max=32,netid_valid"` + Name string `json:"name"` AddressRange string `json:"addressrange" bson:"addressrange" validate:"omitempty,cidrv4"` AddressRange6 string `json:"addressrange6" bson:"addressrange6" validate:"omitempty,cidrv6"` NetID string `json:"netid"`