diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2018-12-24 10:13:00 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2018-12-24 10:13:00 +0900 |
commit | 8e7741a0a80a1bd15a343563a29142f755c29f3f (patch) | |
tree | afc4fc4b8fd11c9fbb6de2c248867e2f1bc94a2c /cmd | |
parent | 8d0a8b0ffa696a3838740fec7accc54ccfb452ab (diff) |
api: rename ValidationDetail to Validation
Let's simply use 'validation' because there is no other validation
structure.
We could add validation results from other than rpki so drop rpki name.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gobgp/neighbor.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cmd/gobgp/neighbor.go b/cmd/gobgp/neighbor.go index 0446b2a0..8e603299 100644 --- a/cmd/gobgp/neighbor.go +++ b/cmd/gobgp/neighbor.go @@ -498,13 +498,13 @@ func getPathSymbolString(p *api.Path, idx int, showBest bool) string { if p.Stale { symbols += "S" } - if v := p.GetValidationDetail(); v != nil { + if v := p.GetValidation(); v != nil { switch v.State { - case api.RPKIValidation_STATE_NOT_FOUND: + case api.Validation_STATE_NOT_FOUND: symbols += "N" - case api.RPKIValidation_STATE_VALID: + case api.Validation_STATE_VALID: symbols += "V" - case api.RPKIValidation_STATE_INVALID: + case api.Validation_STATE_INVALID: symbols += "I" } @@ -673,23 +673,23 @@ func showValidationInfo(p *api.Path, shownAs map[uint32]struct{}) error { return nil } - status := p.GetValidationDetail().State - reason := p.GetValidationDetail().Reason + status := p.GetValidation().State + reason := p.GetValidation().Reason asList := asPath[len(asPath)-1].GetAS() origin := asList[len(asList)-1] fmt.Printf("Target Prefix: %s, AS: %d\n", nlri.String(), origin) fmt.Printf(" This route is %s", status) switch status { - case api.RPKIValidation_STATE_INVALID: + case api.Validation_STATE_INVALID: fmt.Printf(" reason: %s\n", reason) switch reason { - case api.RPKIValidation_REASON_AS: + case api.Validation_REASON_AS: fmt.Println(" No VRP ASN matches the route origin ASN.") - case api.RPKIValidation_REASON_LENGTH: + case api.Validation_REASON_LENGTH: fmt.Println(" Route Prefix length is greater than the maximum length allowed by VRP(s) matching this route origin ASN.") } - case api.RPKIValidation_STATE_NOT_FOUND: + case api.Validation_STATE_NOT_FOUND: fmt.Println("\n No VRP Covers the Route Prefix") default: fmt.Print("\n\n") @@ -713,11 +713,11 @@ func showValidationInfo(p *api.Path, shownAs map[uint32]struct{}) error { } fmt.Println(" Matched VRPs: ") - printVRPs(p.GetValidationDetail().Matched) + printVRPs(p.GetValidation().Matched) fmt.Println(" Unmatched AS VRPs: ") - printVRPs(p.GetValidationDetail().UnmatchedAs) + printVRPs(p.GetValidation().UnmatchedAs) fmt.Println(" Unmatched Length VRPs: ") - printVRPs(p.GetValidationDetail().UnmatchedLength) + printVRPs(p.GetValidation().UnmatchedLength) return nil } |