- # setup the rate measurement for a vnf interface
- def monitor_setup_rate_measurement(self, vnf_name, vnf_interface, metric):
- logging.debug("RPC CALL: get rate")
+ # remove the rate measurement for a vnf interface
+ def stop_metric(self, vnf_name, vnf_interface, metric):
+ logging.debug("RPC CALL: stop metric")
+ try:
+ c = self.net.monitor_agent.stop_metric(vnf_name, vnf_interface, metric)
+ return c
+ except Exception as ex:
+ logging.exception("RPC error.")
+ return ex.message
+
+ # setup the flow metrics measurement
+ def setup_flow(self, vnf_name, vnf_interface, metric, cookie):
+ logging.debug("RPC CALL: setup flow")
+ try:
+ c = self.net.monitor_agent.setup_flow(vnf_name, vnf_interface, metric, cookie)
+ return c
+ except Exception as ex:
+ logging.exception("RPC error.")
+ return ex.message
+
+ # remove the flow metrics measurement
+ def stop_flow(self, vnf_name, vnf_interface, metric, cookie):
+ logging.debug("RPC CALL: stop flow")