beginning to add some tests to help verify handling different tlv messages, added delete link logic for net to node and node to net

This commit is contained in:
bharnden 2019-06-21 23:12:18 -07:00
parent 05c6233908
commit 588a0932d3
3 changed files with 232 additions and 61 deletions

View file

@ -361,6 +361,18 @@ class Session(object):
self.delete_node(net_one.id)
node_one.delnetif(interface_one.netindex)
node_two.delnetif(interface_two.netindex)
elif node_one and net_one:
interface = node_one.netif(interface_one_id)
logging.info("deleting link node(%s):interface(%s) node(%s)",
node_one.name, interface.name, net_one.name)
interface.detachnet()
node_one.delnetif(interface.netindex)
elif node_two and net_one:
interface = node_two.netif(interface_two_id)
logging.info("deleting link node(%s):interface(%s) node(%s)",
node_two.name, interface.name, net_one.name)
interface.detachnet()
node_two.delnetif(interface.netindex)
finally:
if node_one:
node_one.lock.release()