- if src_node in self.vnfds:
- network = self.vnfds[src_node].get("dc").net # there should be a cleaner way to find the DCNetwork
- ret = network.setChain(src_node, dst_node, vnf_src_interface=src_port, vnf_dst_interface=dst_port)
- LOG.debug("setChain return: %r" % ret)
+ if (srcname in self.vnfds) and (dstname in self.vnfds) :
+ network = self.vnfds[srcname].get("dc").net # there should be a cleaner way to find the DCNetwork
+ src_vnf = self.vnfname2num[srcname]
+ dst_vnf = self.vnfname2num[dstname]
+ ret = network.setChain(src_vnf, dst_vnf, vnf_src_interface=src_port, vnf_dst_interface=dst_port, bidirectional = True, cmd="add-flow", cookie = cookie)
+ cookie += 1