From 2eb74f5c5cb58fcb072af765ea67dd80ee6d8755 Mon Sep 17 00:00:00 2001 From: Andrej Kozemcak Date: Wed, 13 Jul 2016 17:19:31 +0200 Subject: CSIT-207: Update LISP Eid API - rename show_local_lisp_eid_tabl -> show_lisp_eid_table. - change EID json output data Change-Id: I4f5f7b5995b61cb0d5034b107c125caba1d73034 Signed-off-by: Andrej Kozemcak --- resources/libraries/python/LispUtil.py | 6 ++-- resources/libraries/robot/lisp/lisp_api.robot | 4 +-- .../templates/vat/lisp/show_lisp_eid_table.vat | 1 + .../vat/lisp/show_lisp_local_eid_table.vat | 1 - resources/test_data/lisp/api/lisp_api_resources.py | 35 +++++++++++++++++----- 5 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 resources/templates/vat/lisp/show_lisp_eid_table.vat delete mode 100644 resources/templates/vat/lisp/show_lisp_local_eid_table.vat diff --git a/resources/libraries/python/LispUtil.py b/resources/libraries/python/LispUtil.py index 157702ade0..8a83dc4d30 100644 --- a/resources/libraries/python/LispUtil.py +++ b/resources/libraries/python/LispUtil.py @@ -54,8 +54,8 @@ class LispUtil(object): return JsonParser().parse_data(vat.get_script_stdout()) @staticmethod - def vpp_show_lisp_local_eid_table(node): - """Get lisp local eid table from VPP node. + def vpp_show_lisp_eid_table(node): + """Get lisp eid table from VPP node. :param node: VPP node. :type node: dict @@ -64,7 +64,7 @@ class LispUtil(object): """ vat = VatExecutor() - vat.execute_script_json_out('lisp/show_lisp_local_eid_table.vat', node) + vat.execute_script_json_out('lisp/show_lisp_eid_table.vat', node) return JsonParser().parse_data(vat.get_script_stdout()) @staticmethod diff --git a/resources/libraries/robot/lisp/lisp_api.robot b/resources/libraries/robot/lisp/lisp_api.robot index faffeb3921..8094d08b84 100644 --- a/resources/libraries/robot/lisp/lisp_api.robot +++ b/resources/libraries/robot/lisp/lisp_api.robot @@ -182,7 +182,7 @@ | | ... | \| ${nodes['DUT1']} \| ${eid_table} \| | | ... | | [Arguments] | ${dut_node} | ${set_eid} -| | ${show_eid}= | Vpp Show Lisp Local Eid Table | ${dut_node} +| | ${show_eid}= | Vpp Show Lisp Eid Table | ${dut_node} | | Lisp Should Be Equal | ${set_eid} | ${show_eid} | Delete all lisp eid address from VPP @@ -216,7 +216,7 @@ | | ... | \| Then Lisp eid table should be empty \| ${nodes['DUT1']} \| | | ... | | [Arguments] | ${dut_node} -| | ${show_eid}= | Vpp Show Lisp Local Eid Table | ${dut_node} +| | ${show_eid}= | Vpp Show Lisp Eid Table | ${dut_node} | | Lisp Is Empty | ${show_eid} | Lisp map resolver address is set diff --git a/resources/templates/vat/lisp/show_lisp_eid_table.vat b/resources/templates/vat/lisp/show_lisp_eid_table.vat new file mode 100644 index 0000000000..4a47a8fdef --- /dev/null +++ b/resources/templates/vat/lisp/show_lisp_eid_table.vat @@ -0,0 +1 @@ +lisp_eid_table_dump \ No newline at end of file diff --git a/resources/templates/vat/lisp/show_lisp_local_eid_table.vat b/resources/templates/vat/lisp/show_lisp_local_eid_table.vat deleted file mode 100644 index 87e276d43a..0000000000 --- a/resources/templates/vat/lisp/show_lisp_local_eid_table.vat +++ /dev/null @@ -1 +0,0 @@ -lisp_local_eid_table_dump \ No newline at end of file diff --git a/resources/test_data/lisp/api/lisp_api_resources.py b/resources/test_data/lisp/api/lisp_api_resources.py index 4502c3cb49..81bf8ee171 100644 --- a/resources/test_data/lisp/api/lisp_api_resources.py +++ b/resources/test_data/lisp/api/lisp_api_resources.py @@ -24,31 +24,52 @@ lisp_status = [{"gpe_status":"disabled", eid_table = [{'eid': '192.168.0.1', 'vni': 0, 'eid-prefix-len': 24, - 'locator-set': 'ls1'}, + 'locator': [], + 'locator-set': 'ls1', + 'ttl': 0, + 'authoritative': 0}, {'eid': '192.168.1.1', 'vni': 0, 'eid-prefix-len': 24, - 'locator-set': 'ls1'}, + 'locator': [], + 'locator-set': 'ls1', + 'ttl': 0, + 'authoritative': 0}, {'eid': '192.168.2.1', 'vni': 0, 'eid-prefix-len': 24, - 'locator-set': 'ls1'}, + 'locator': [], + 'locator-set': 'ls1', + 'ttl': 0, + 'authoritative': 0}, {'eid': '192.168.3.1', 'vni': 0, 'eid-prefix-len': 24, - 'locator-set': 'ls1'}, + 'locator': [], + 'locator-set': 'ls1', + 'ttl': 0, + 'authoritative': 0}, {'eid': '10:1::1', 'vni': 0, 'eid-prefix-len': 32, - 'locator-set': 'ls1'}, + 'locator': [], + 'locator-set': 'ls1', + 'ttl': 0, + 'authoritative': 0}, {'eid': '10:2::1', 'vni': 0, 'eid-prefix-len': 32, - 'locator-set': 'ls1'}, + 'locator': [], + 'locator-set': 'ls1', + 'ttl': 0, + 'authoritative': 0}, {'eid': '10:3::1', 'vni': 0, 'eid-prefix-len': 32, - 'locator-set': 'ls1'}] + 'locator': [], + 'locator-set': 'ls1', + 'ttl': 0, + 'authoritative': 0}] # Example lisp map resolvers data we want set to VPP # and then check if it is set correctly. -- cgit 1.2.3-korg