We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb05161 commit 1d248edCopy full SHA for 1d248ed
contivModel.go
@@ -1874,6 +1874,10 @@ func ValidateNetwork(obj *Network) error {
1874
return errors.New("networkName string too long")
1875
}
1876
1877
+ if obj.NwType == "" {
1878
+ obj.NwType = "data"
1879
+ }
1880
+
1881
nwTypeMatch := regexp.MustCompile("^(infra|data)$")
1882
if nwTypeMatch.MatchString(obj.NwType) == false {
1883
return errors.New("nwType string invalid format")
network.json
@@ -20,6 +20,7 @@
20
"nwType": {
21
"type": "string",
22
"format": "^(infra|data)$",
23
+ "default": "\"data\"",
24
"title": "Network Type",
25
"showSummary": true
26
},
0 commit comments