From: stevenvanrossem Date: Sat, 28 Jan 2017 14:41:14 +0000 (+0100) Subject: fix bug when stopping link metric export X-Git-Tag: v3.1~45^2~18 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;ds=inline;h=fcd8c9b3e4d4e1edc78bfe0022ef75aa7499d615;hp=--cc;p=osm%2Fvim-emu.git fix bug when stopping link metric export --- fcd8c9b3e4d4e1edc78bfe0022ef75aa7499d615 diff --git a/src/emuvim/api/rest/monitor.py b/src/emuvim/api/rest/monitor.py index 737048d..490f5cc 100755 --- a/src/emuvim/api/rest/monitor.py +++ b/src/emuvim/api/rest/monitor.py @@ -202,7 +202,11 @@ class MonitorLinkAction(Resource): vnf_name = vnf_src_name vnf_interface = vnf_src_interface - c2 = net.monitor_agent.setup_flow(vnf_name, vnf_interface, metric, cookie) + c2 = 'command unknown' + if command == 'add-flow': + c2 = net.monitor_agent.setup_flow(vnf_name, vnf_interface, metric, cookie) + elif command == 'del-flows': + c2 = net.monitor_agent.stop_flow(vnf_name, vnf_interface, metric, cookie) # return setChain response return (str(c1) + " " + str(c2)), 200