The interface must be assigned to the VRF and then given a prefix 16/5416/3
authorNeale Ranns <nranns@cisco.com>
Fri, 17 Feb 2017 21:09:54 +0000 (21:09 +0000)
committerJan Gelety <jgelety@cisco.com>
Wed, 22 Feb 2017 11:06:10 +0000 (11:06 +0000)
Change-Id: I6a2fc503989576f806413ae98845e3e3676889b8
Signed-off-by: Neale Ranns <nranns@cisco.com>
ID [new file with mode: 0644]
resources/libraries/python/InterfaceUtil.py
tests/func/lisp/eth2p-ethip4lispgpe-ip4base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip6lispgpe-ip6base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-eth-2vhost-1vm-func.robot

diff --git a/ID b/ID
new file mode 100644 (file)
index 0000000..076076f
Binary files /dev/null and b/ID differ
index 16acdf3..5d6d8f7 100644 (file)
@@ -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):
index d1eec4b..f9860e8 100644 (file)
 | | ...
 | | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1}
 | | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2}
-| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4}
 | | Assign Interface To Fib Table | ${dut1_node}
 | | ... | ${vhost2} | ${fib_table}
+| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4}
 | | Set Interface State | ${dut1_node} | ${vhost1} | up
 | | Set Interface State | ${dut1_node} | ${vhost2} | up
 | | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE}
index 7c6c6f4..d83dec6 100644 (file)
 | | ...
 | | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1}
 | | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2}
-| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4}
 | | Assign Interface To Fib Table | ${dut1_node}
 | | ... | ${vhost2} | ${fib_table}
+| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4}
 | | Set Interface State | ${dut1_node} | ${vhost1} | up
 | | Set Interface State | ${dut1_node} | ${vhost2} | up
 | | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE}
index 7baaeee..9d47158 100644 (file)
 | | ...
 | | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1}
 | | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2}
-| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip}
-| | ... | ${prefix6}
 | | Assign Interface To Fib Table | ${dut1_node}
 | | ... | ${vhost2} | ${fib_table} | ipv6=${TRUE}
+| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip}
+| | ... | ${prefix6}
 | | Set Interface State | ${dut1_node} | ${vhost1} | up
 | | Set Interface State | ${dut1_node} | ${vhost2} | up
 | | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE}
index d9b489e..52c37b3 100644 (file)
 | | ...
 | | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1}
 | | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2}
-| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip}
-| | ... | ${prefix6}
 | | Assign Interface To Fib Table | ${dut1_node}
 | | ... | ${vhost2} | ${fib_table} | ipv6=${TRUE}
+| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip}
+| | ... | ${prefix6}
 | | Set Interface State | ${dut1_node} | ${vhost1} | up
 | | Set Interface State | ${dut1_node} | ${vhost2} | up
 | | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE}