summaryrefslogtreecommitdiffhomepage
path: root/policy
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-10-04 15:18:12 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-09 19:22:56 +0900
commiteb67afbdad499466e9407b4b30e9854664dd0486 (patch)
tree0d4c78757957ebdeef58a57e65615e43ccf61b0d /policy
parent29c4b5e6bea1e91c31a52910bb8812989d009423 (diff)
api: make enum RouteAction to avoid using raw string
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'policy')
-rw-r--r--policy/policy.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/policy/policy.go b/policy/policy.go
index 839cb926..e04d56a3 100644
--- a/policy/policy.go
+++ b/policy/policy.go
@@ -1856,9 +1856,9 @@ func ConditionsToConfigStruct(reqConditions *gobgpapi.Conditions) config.Conditi
}
func ActionsToApiStruct(conActions config.Actions) *gobgpapi.Actions {
- action := ROUTE_REJECT
+ action := gobgpapi.RouteAction_REJECT
if conActions.RouteDisposition.AcceptRoute {
- action = ROUTE_ACCEPT
+ action = gobgpapi.RouteAction_ACCEPT
}
//TODO: support CommunitySetRef
@@ -1904,9 +1904,9 @@ func ActionsToConfigStruct(reqActions *gobgpapi.Actions) config.Actions {
}
switch reqActions.RouteAction {
- case ROUTE_ACCEPT:
+ case gobgpapi.RouteAction_ACCEPT:
actions.RouteDisposition.AcceptRoute = true
- case ROUTE_REJECT:
+ case gobgpapi.RouteAction_REJECT:
actions.RouteDisposition.RejectRoute = true
}
return actions