From c5b285aebcfc93dcccf3285abbde672cf000e3cc Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 17 Feb 2017 21:09:54 +0000 Subject: The interface must be assigned to the VRF and then given a prefix Change-Id: I6a2fc503989576f806413ae98845e3e3676889b8 Signed-off-by: Neale Ranns --- resources/libraries/python/InterfaceUtil.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'resources/libraries/python/InterfaceUtil.py') diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index 16acdf3214..5d6d8f7044 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -950,10 +950,14 @@ class InterfaceUtil(object): ipv6 = 'ipv6' if ipv6 else '' with VatTerminal(node) as vat: - vat.vat_terminal_exec_cmd_from_template("set_fib_to_interface.vat", - sw_index=sw_if_index, - vrf=table_id, - ipv6=ipv6) + ret = vat.vat_terminal_exec_cmd_from_template( + "set_fib_to_interface.vat", + sw_index=sw_if_index, vrf=table_id, ipv6=ipv6) + + if ret[0]["retval"] != 0: + raise RuntimeError('Unable to assign interface to FIB node {}.' + .format(node)) + @staticmethod def set_linux_interface_mac(node, interface, mac, namespace=None): -- cgit 1.2.3-korg