diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-06-30 19:53:12 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-07-01 21:27:31 +0900 |
commit | 1db97a53022a02ff3bf355909b54eb6be8dc286e (patch) | |
tree | 6d99ec87beab4249faba771875e18d535a615b2f /server/server.go | |
parent | e47ae11969d356ec133e4379a4373e4a26906fbc (diff) |
cli: fix error output when routepolicy does not exist in routepolicy sub command
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index ce0edf65..b6fcc363 100644 --- a/server/server.go +++ b/server/server.go @@ -1661,9 +1661,9 @@ func (server *BgpServer) handleGrpcDelPolicy(grpcReq *GrpcRequest) { case REQ_POLICY_ROUTEPOLICY_DELETE: reqPolicy := grpcReq.Data.(*api.PolicyDefinition) conPolicyList := server.routingPolicy.PolicyDefinitionList - result := &GrpcResponse{} isStatement, policyDef := policy.PolicyDefinitionToConfigStruct(reqPolicy) idxPolicy, idxStatement := policy.IndexOfPolicyDefinition(conPolicyList, policyDef) + log.Error(fmt.Sprintf("isStatament=%v, idxPolicy=%d, idxStatement=%d", isStatement, idxPolicy, idxStatement)) if isStatement { if idxPolicy == -1 { result.ResponseErr = fmt.Errorf("Policy that has %v doesn't exist.", policyDef.Name) |