Skip to content

Commit

Permalink
Fix #801
Browse files Browse the repository at this point in the history
  • Loading branch information
jojimt committed Mar 22, 2017
1 parent ca81b46 commit bd953b7
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 386 deletions.
4 changes: 2 additions & 2 deletions aciGw.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"type": "string",
"title": "List of ACI fabric ports connected to cluster",
"length": 2048,
"format": "^$|^(topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\\\[eth[0-9]{1,2}/[0-9]{1,2}\\\\]){1}(,topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\\\[eth[0-9]{1,2}/[0-9]{1,2}\\\\])?$",
"format": "^$|^(topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\\\[eth[0-9]{1,2}/[0-9]{1,2}\\\\]){1}(,topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\\\[eth[0-9]{1,2}/[0-9]{1,2}\\\\])*$",
"ShowSummary": true
},
"nodeBindings": {
"type": "string",
"title": "List of ACI complete nodes to be bound",
"length": 2048,
"format": "^$|^(topology/pod-[0-9]{1,4}/node-[0-9]{1,4}){1}(,topology/pod-[0-9]{1,4}/node-[0-9]{1,4})?$",
"format": "^$|^(topology/pod-[0-9]{1,4}/node-[0-9]{1,4}){1}(,topology/pod-[0-9]{1,4}/node-[0-9]{1,4})*$",
"ShowSummary": true
},
"physicalDomain": {
Expand Down
4 changes: 2 additions & 2 deletions contivModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ func ValidateAciGw(obj *AciGw) error {
return errors.New("nodeBindings string too long")
}

nodeBindingsMatch := regexp.MustCompile("^$|^(topology/pod-[0-9]{1,4}/node-[0-9]{1,4}){1}(,topology/pod-[0-9]{1,4}/node-[0-9]{1,4})?$")
nodeBindingsMatch := regexp.MustCompile("^$|^(topology/pod-[0-9]{1,4}/node-[0-9]{1,4}){1}(,topology/pod-[0-9]{1,4}/node-[0-9]{1,4})*$")
if nodeBindingsMatch.MatchString(obj.NodeBindings) == false {
return errors.New("nodeBindings string invalid format")
}
Expand All @@ -1416,7 +1416,7 @@ func ValidateAciGw(obj *AciGw) error {
return errors.New("pathBindings string too long")
}

pathBindingsMatch := regexp.MustCompile("^$|^(topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\[eth[0-9]{1,2}/[0-9]{1,2}\\]){1}(,topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\[eth[0-9]{1,2}/[0-9]{1,2}\\])?$")
pathBindingsMatch := regexp.MustCompile("^$|^(topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\[eth[0-9]{1,2}/[0-9]{1,2}\\]){1}(,topology/pod-[0-9]{1,4}/paths-[0-9]{1,4}/pathep-\\[eth[0-9]{1,2}/[0-9]{1,2}\\])*$")
if pathBindingsMatch.MatchString(obj.PathBindings) == false {
return errors.New("pathBindings string invalid format")
}
Expand Down

0 comments on commit bd953b7

Please sign in to comment.