File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2570,7 +2570,7 @@ func ValidateNetprofile(obj *Netprofile) error {
2570
2570
return errors .New ("bandwidth string too long" )
2571
2571
}
2572
2572
2573
- bandwidthMatch := regexp .MustCompile ("^((( [1-9][0-9]*((k|K|m|M|g|G)( bps|BPS)))|(K|k|M|m|G|g)|(K|k|M|m|G|g)(b))|(( [1-9][0-9]* ((k|K|m|M|g|G)( bps|BPS)))|(K|k|M|m|G|g)|(K|k|M|m|G|g)(b )))?$" )
2573
+ bandwidthMatch := regexp .MustCompile ("^([1-9][0-9]* (([kmgKMG{1}] bps)|[kmgKMG{1}]|(kb|Kb|Gb|gb|Mb|mb)))?$|^( [1-9][0-9]*(((k|m|g|K|G|M) bps)|(k|m|g|K|M|G)|(kb|Kb|Gb|gb|Mb|mb )))?$" )
2574
2574
if bandwidthMatch .MatchString (obj .Bandwidth ) == false {
2575
2575
return errors .New ("bandwidth string invalid format" )
2576
2576
}
Original file line number Diff line number Diff line change 22
22
"bandwidth" : {
23
23
"type" : " string" ,
24
24
"length" : 64 ,
25
- "format" : " ^((( [1-9][0-9]*((k|K|m|M|g|G)( bps|BPS)))|(K|k|M|m|G|g)|(K|k|M|m|G|g)(b))|(( [1-9][0-9]* ((k|K|m|M|g|G)( bps|BPS)))|(K|k|M|m|G|g)|(K|k|M|m|G|g)(b )))?$" ,
25
+ "format" : " ^([1-9][0-9]* (([kmgKMG{1}] bps)|[kmgKMG{1}]|(kb|Kb|Gb|gb|Mb|mb)))?$|^( [1-9][0-9]*(((k|m|g|K|G|M) bps)|(k|m|g|K|M|G)|(kb|Kb|Gb|gb|Mb|mb )))?$" ,
26
26
"title" : " Allocated bandwidth" ,
27
27
"description" : " Amount of allocated outbound bandwidth" ,
28
28
"ShowSummary" : true
You can’t perform that action at this time.
0 commit comments