X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Frest%2Fmonitor.py;h=490f5cc641d6c7124beae07ea061c550ec41dcca;hb=fcd8c9b3e4d4e1edc78bfe0022ef75aa7499d615;hp=737048d5d9a814475e83a9fe340ff7290a52dd37;hpb=9cc7360bf2c0dacb869d8ed0674d9d9e269a1082;p=osm%2Fvim-emu.git 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