diff options
author | selias <samelias@cisco.com> | 2016-11-07 16:04:26 +0100 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2016-11-25 07:56:37 +0000 |
commit | 4bda4f8b55b0d431b514663e8e90fccd97ad31d4 (patch) | |
tree | 40f2e469c45b9f99ea5935bf9dc6cb272020face /resources/test_data/honeycomb | |
parent | 0d782a5690c7e28a329952fb93afde84ddd97078 (diff) |
CSIT-425: HC Test: NSH-SFC test suite
- add keyword to enable optional modules in Honeycomb (including NSH)
- update honeycomb __init__.robot with the new keyword
- add python and robot libraries for NSH tests
- add NSH test suite (CRUD operations)
Change-Id: I869069a138a51d56d25522163c3a6deefb316f46
Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/test_data/honeycomb')
-rw-r--r-- | resources/test_data/honeycomb/nsh.py | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/resources/test_data/honeycomb/nsh.py b/resources/test_data/honeycomb/nsh.py new file mode 100644 index 0000000000..11e9e4ba0c --- /dev/null +++ b/resources/test_data/honeycomb/nsh.py @@ -0,0 +1,190 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Test variables for LISP test suite.""" + +nsh_entry1 = { + "nsh-entry": [{ + "name": "entry1", + "version": 0, + "length": 6, + "md-type": "md-type1", + "next-protocol": "ethernet", + "nsp": 184, + "nsi": 255, + "c1": 1, + "c2": 2, + "c3": 3, + "c4": 4 + }] +} + +nsh_entry1_oper = { + "nsh-entry": [{ + "name": "entry1", + "version": 0, + "length": 6, + "md-type": "vpp-nsh:md-type1", + "next-protocol": "vpp-nsh:ethernet", + "nsp": 184, + "nsi": 255, + "c1": 1, + "c2": 2, + "c3": 3, + "c4": 4 + }] +} + +nsh_entry2 = { + "nsh-entry": [{ + "name": "entry2", + "version": 0, + "length": 5, + "md-type": "md-type1", + "next-protocol": "ethernet", + "nsp": 183, + "nsi": 254, + "c1": 2, + "c2": 3, + "c3": 4, + "c4": 5 + }] +} + +nsh_entry2_oper = { + "nsh-entry": [{ + "name": "entry2", + "version": 0, + "length": 5, + "md-type": "vpp-nsh:md-type1", + "next-protocol": "vpp-nsh:ethernet", + "nsp": 183, + "nsi": 254, + "c1": 2, + "c2": 3, + "c3": 4, + "c4": 5 + }] +} + +# Settings for VxLAN GPE interfaces, needed to configure NSH maps +vxlan_gpe_if1 = 'vxlan_gpe_test1' +vxlan_gpe_base_settings1 = { + 'name': vxlan_gpe_if1, + 'description': 'for testing NSH', + 'enabled': True, + 'link-up-down-trap-enable': 'enabled' +} +vxlan_gpe_settings1 = { + 'local': '192.168.0.1', + 'remote': '192.168.0.2', + 'vni': 5, + 'next-protocol': 'ethernet', + 'encap-vrf-id': 0, + 'decap-vrf-id': 0 +} + +vxlan_gpe_if2 = 'vxlan_gpe_test2' +vxlan_gpe_base_settings2 = { + 'name': vxlan_gpe_if2, + 'description': 'for testing NSH', + 'enabled': True, + 'link-up-down-trap-enable': 'enabled' +} +vxlan_gpe_settings2 = { + 'local': '192.168.1.1', + 'remote': '192.168.1.2', + 'vni': 6, + 'next-protocol': 'ethernet', + 'encap-vrf-id': 0, + 'decap-vrf-id': 0 +} + + +nsh_map1 = { + "nsh-map": [{ + "name": "map1", + "nsp": 184, + "nsi": 255, + "mapped-nsp": 183, + "mapped-nsi": 254, + "nsh-action": "push", + "encap-type": "vxlan-gpe", + "encap-if-name": vxlan_gpe_if1 + }] +} + +nsh_map1_oper = { + "nsh-map": [{ + "name": "map1", + "nsp": 184, + "nsi": 255, + "mapped-nsp": 183, + "mapped-nsi": 254, + "nsh-action": "vpp-nsh:push", + "encap-type": "vpp-nsh:vxlan-gpe", + "encap-if-name": vxlan_gpe_if1 + }] +} + +nsh_map1_edit = { + "nsh-map": [{ + "name": "map1_edit", + "nsp": 184, + "nsi": 255, + "mapped-nsp": 184, + "mapped-nsi": 253, + "nsh-action": "push", + "encap-type": "vxlan-gpe", + "encap-if-name": vxlan_gpe_if1 + }] +} + +nsh_map1_edit_oper = { + "nsh-map": [{ + "name": "map1_edit", + "nsp": 184, + "nsi": 255, + "mapped-nsp": 184, + "mapped-nsi": 253, + "nsh-action": "vpp-nsh:push", + "encap-type": "vpp-nsh:vxlan-gpe", + "encap-if-name": vxlan_gpe_if1 + }] +} + +nsh_map2 = { + "nsh-map": [{ + "name": "map2", + "nsp": 183, + "nsi": 254, + "mapped-nsp": 182, + "mapped-nsi": 253, + "nsh-action": "vpp-nsh:push", + "encap-type": "vpp-nsh:vxlan-gpe", + "encap-if-name": vxlan_gpe_if2 + }] +} + +nsh_map2_oper = { + "nsh-map": [{ + "name": "map2", + "nsp": 183, + "nsi": 254, + "mapped-nsp": 182, + "mapped-nsi": 253, + "nsh-action": "vpp-nsh:push", + "encap-type": "vpp-nsh:vxlan-gpe", + "encap-if-name": vxlan_gpe_if2 + }] +} |