summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-10-18 13:22:42 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-20 10:33:10 +0900
commit29f9682ecbe0e5bf0a44fdcc2e9f8cec3f6ea31c (patch)
tree4fe77b8053e2aebe40b84706c68c8aeb99d97ece /server
parent16234ccbb3bbd88759012c95efb690aa2eaba542 (diff)
server: remove stale api related code
use api ModDefinedSet() to modify defined-set Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/grpc_server.go70
1 files changed, 0 insertions, 70 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go
index e768c4c8..1ed56144 100644
--- a/server/grpc_server.go
+++ b/server/grpc_server.go
@@ -43,26 +43,11 @@ const (
REQ_NEIGHBOR_POLICY
REQ_MOD_NEIGHBOR_POLICY
REQ_GLOBAL_RIB
- REQ_POLICY_PREFIX_ADD
- REQ_POLICY_PREFIX_DELETE
- REQ_POLICY_PREFIXES_DELETE
- REQ_POLICY_NEIGHBOR_ADD
- REQ_POLICY_NEIGHBOR_DELETE
- REQ_POLICY_NEIGHBORS_DELETE
- REQ_POLICY_ASPATH_ADD
- REQ_POLICY_ASPATH_DELETE
- REQ_POLICY_ASPATHS_DELETE
REQ_POLICY_ROUTEPOLICIES
REQ_POLICY_ROUTEPOLICY
REQ_POLICY_ROUTEPOLICY_ADD
REQ_POLICY_ROUTEPOLICY_DELETE
REQ_POLICY_ROUTEPOLICIES_DELETE
- REQ_POLICY_COMMUNITY_ADD
- REQ_POLICY_COMMUNITY_DELETE
- REQ_POLICY_COMMUNITIES_DELETE
- REQ_POLICY_EXTCOMMUNITY_ADD
- REQ_POLICY_EXTCOMMUNITY_DELETE
- REQ_POLICY_EXTCOMMUNITIES_DELETE
REQ_MONITOR_GLOBAL_BEST_CHANGED
REQ_MONITOR_NEIGHBOR_PEER_STATE
REQ_MRT_GLOBAL_RIB
@@ -308,61 +293,6 @@ func (s *Server) modPolicy(arg *api.PolicyArguments, stream interface{}) error {
var reqType int
var err error
switch arg.Resource {
- case api.Resource_POLICY_PREFIX:
- switch arg.Operation {
- case api.Operation_ADD:
- reqType = REQ_POLICY_PREFIX_ADD
- case api.Operation_DEL:
- reqType = REQ_POLICY_PREFIX_DELETE
- case api.Operation_DEL_ALL:
- reqType = REQ_POLICY_PREFIXES_DELETE
- default:
- return fmt.Errorf("unsupported operation: %s", arg.Operation)
- }
- case api.Resource_POLICY_NEIGHBOR:
- switch arg.Operation {
- case api.Operation_ADD:
- reqType = REQ_POLICY_NEIGHBOR_ADD
- case api.Operation_DEL:
- reqType = REQ_POLICY_NEIGHBOR_DELETE
- case api.Operation_DEL_ALL:
- reqType = REQ_POLICY_NEIGHBORS_DELETE
- default:
- return fmt.Errorf("unsupported operation: %s", arg.Operation)
- }
- case api.Resource_POLICY_ASPATH:
- switch arg.Operation {
- case api.Operation_ADD:
- reqType = REQ_POLICY_ASPATH_ADD
- case api.Operation_DEL:
- reqType = REQ_POLICY_ASPATH_DELETE
- case api.Operation_DEL_ALL:
- reqType = REQ_POLICY_ASPATHS_DELETE
- default:
- return fmt.Errorf("unsupported operation: %s", arg.Operation)
- }
- case api.Resource_POLICY_COMMUNITY:
- switch arg.Operation {
- case api.Operation_ADD:
- reqType = REQ_POLICY_COMMUNITY_ADD
- case api.Operation_DEL:
- reqType = REQ_POLICY_COMMUNITY_DELETE
- case api.Operation_DEL_ALL:
- reqType = REQ_POLICY_COMMUNITIES_DELETE
- default:
- return fmt.Errorf("unsupported operation: %s", arg.Operation)
- }
- case api.Resource_POLICY_EXTCOMMUNITY:
- switch arg.Operation {
- case api.Operation_ADD:
- reqType = REQ_POLICY_EXTCOMMUNITY_ADD
- case api.Operation_DEL:
- reqType = REQ_POLICY_EXTCOMMUNITY_DELETE
- case api.Operation_DEL_ALL:
- reqType = REQ_POLICY_EXTCOMMUNITIES_DELETE
- default:
- return fmt.Errorf("unsupported operation: %s", arg.Operation)
- }
case api.Resource_POLICY_ROUTEPOLICY:
switch arg.Operation {
case api.Operation_ADD: