diff options
author | Zdeno <zolsovsk@cisco.com> | 2016-04-18 16:17:26 +0200 |
---|---|---|
committer | Zdeno Olsovsky <zolsovsk@cisco.com> | 2016-05-09 15:11:56 +0200 |
commit | 395ed47437010c9852d9d620f491f660a085dbfd (patch) | |
tree | 62bb03659c8886b192c619636fff7b9c546441c4 /resources/libraries/python/Routing.py | |
parent | 8935f5271dacc631d5b834b27b36bfad83c350c2 (diff) |
CSIT-9: COP Whitelist/blacklist
- Included are also IPv6 tests
- JIRA: CSIT-17
Change-Id: I89ae6c38cdc6742a597c0dc24ed1c033c1b5d155
Signed-off-by: Zdeno <zolsovsk@cisco.com>
Diffstat (limited to 'resources/libraries/python/Routing.py')
-rw-r--r-- | resources/libraries/python/Routing.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/resources/libraries/python/Routing.py b/resources/libraries/python/Routing.py index 1cbbf6b822..7bb41cbfad 100644 --- a/resources/libraries/python/Routing.py +++ b/resources/libraries/python/Routing.py @@ -42,3 +42,25 @@ class Routing(object): prefix_length=prefix_len, gateway=gateway, sw_if_index=sw_if_index) + + @staticmethod + def add_fib_table(node, network, prefix_len, fib_id, place): + """Create new FIB table according to ID. + + :param node: Node to add FIB on. + :param network: IP address to add to the FIB table. + :param prefix_len: IP address prefix length. + :param fib_id: FIB table ID. + :param place: Possible variants are local, drop. + :type node: dict + :type network: str + :type prefix_len: int + :type fib_id: int + :type place: str + """ + with VatTerminal(node) as vat: + vat.vat_terminal_exec_cmd_from_template('add_fib_table.vat', + network=network, + prefix_length=prefix_len, + fib_number=fib_id, + where=place) |