+ # query rate
+
+ #need to wait a bit before containers are fully up?
+ time.sleep(2)
+
+ def generate():
+ for rate in [0, 1, 2, 3]:
+ #logging.info('query:{0}'.format(query_cpu))
+
+ output_line = DCNetwork.monitor_agent.profile(psrc_mgmt_ip, rate, psink_input_ip, vnf_uuid)
+ gevent.sleep(0)
+ yield output_line
+
+ # query loss
+
+
+ # create table
+
+ ## VIM/dummy gatekeeper's tasks:
+ # remove vnfs and chain
+ DCNetwork.setChain('psrc', compute_name,
+ vnf_src_interface='output',
+ vnf_dst_interface=kwargs.get('input'),
+ cmd='del-flows', weight=None, bidirectional=True)
+ DCNetwork.setChain('psrc', compute_name,
+ vnf_src_interface='output',
+ vnf_dst_interface=kwargs.get('input'),
+ cmd='del-flows', weight=None,
+ match='dl_type=0x0800,nw_proto=17,udp_dst=5001',
+ cookie=10)
+ DCNetwork.setChain(compute_name, 'psink',
+ vnf_src_interface='output',
+ vnf_dst_interface=kwargs.get('input'),
+ cmd='del-flows', weight=None, bidirectional=True)
+ DCNetwork.setChain(compute_name, 'psink',
+ vnf_src_interface='output',
+ vnf_dst_interface=kwargs.get('input'),
+ cmd='del-flows', weight=None,
+ match='dl_type=0x0800,nw_proto=17,udp_dst=5001',
+ cookie=11)
+ self.compute_action_stop(dc_label, compute_name)
+ self.compute_action_stop(dc_label, 'psink')
+ self.compute_action_stop(dc_label, 'psrc')
+
+ return generate()