Advertisement
Guest User

Untitled

a guest
Jun 15th, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. diff -r 3fdf7ba71c24 inv/discovery/jobs/link_discovery.py
  2. --- a/inv/discovery/jobs/link_discovery.py Sun Jun 15 11:03:51 2014 +0400
  3. +++ b/inv/discovery/jobs/link_discovery.py Sun Jun 15 11:48:13 2014 +0400
  4. @@ -39,7 +39,8 @@
  5. """
  6. Check interface can be linked
  7. """
  8. - return not iface.is_linked
  9. + #return not iface.is_linked
  10. + return True
  11.  
  12. def submit_candidate(self, local_interface,
  13. remote_object, remote_interface=None):
  14. @@ -91,6 +92,13 @@
  15. rl = r_iface.link
  16. if ll and rl and l_iface in rl and r_iface in ll:
  17. return # Already linked
  18. + # Unlinking existing links
  19. + if ll:
  20. + self.info("Unlinking %s" % ll)
  21. + ll.delete()
  22. + if rl:
  23. + self.info("Unlinking %s" % rl)
  24. + rl.delete()
  25. # Link objects
  26. self.info("Linking %s and %s" % (l_iface, r_iface))
  27. try:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement