aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2016-12-16 15:28:39 +0100
committerPeter Mikus <pmikus@cisco.com>2017-01-10 13:05:13 +0000
commit954e51613f8dbd4f2fa4a7c2cf7c066176bee963 (patch)
treed572e42249a63bb5b89ed4d5743d9d9c492d821b
parente3ed9257cd7ef50b44eca72ef7d9ae6c7c792647 (diff)
CSIT-482: HC Test - NAT
- add NAT test suite - add keywords and methods for configuring and reading NAT settings - add test data used in NAT suite Change-Id: Iaa2ac1eb156bc9bcff41ec242318f6a973210d38 Signed-off-by: selias <samelias@cisco.com>
-rw-r--r--resources/libraries/python/NAT.py107
-rw-r--r--resources/libraries/python/honeycomb/NAT.py143
-rw-r--r--resources/libraries/robot/honeycomb/nat.robot174
-rw-r--r--resources/templates/honeycomb/config_nat.url1
-rw-r--r--resources/templates/honeycomb/oper_nat.url1
-rw-r--r--resources/templates/vat/snat/snat_interface_dump.vat1
-rw-r--r--resources/templates/vat/snat/snat_mapping_dump.vat1
-rw-r--r--resources/test_data/honeycomb/nat.py99
-rw-r--r--tests/func/honeycomb/130_nat.robot104
9 files changed, 631 insertions, 0 deletions
diff --git a/resources/libraries/python/NAT.py b/resources/libraries/python/NAT.py
new file mode 100644
index 0000000000..d0e01c7f84
--- /dev/null
+++ b/resources/libraries/python/NAT.py
@@ -0,0 +1,107 @@
+# 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.
+
+"""NAT utilities library."""
+
+from resources.libraries.python.VatExecutor import VatExecutor
+
+
+class NATUtil(object):
+ """NAT utilities."""
+
+ def __init__(self):
+ pass
+
+ @staticmethod
+ def vpp_get_nat_static_mappings(node):
+ """Get NAT static mappings from VPP node.
+
+ :param node: VPP node.
+ :type node: dict
+ :returns: List of static mappings.
+ :rtype: list
+ :raises RuntimeError: If the output is not as expected.
+ """
+
+ vat = VatExecutor()
+ # JSON output not supported for this command
+ vat.execute_script('snat/snat_mapping_dump.vat', node, json_out=False)
+
+ stdout = vat.get_script_stdout()
+ lines = stdout.split("\n")
+
+ data = []
+ # lines[0,1] are table and column headers
+ for line in lines[2::]:
+ items = line.split(" ")
+ while "" in items:
+ items.remove("")
+ if len(items) == 0:
+ continue
+ elif len(items) == 3:
+ # no ports were returned
+ data.append({
+ "local_address": items[0],
+ "remote_address": items[1],
+ "vrf": items[2]
+ })
+ elif len(items) == 5:
+ data.append({
+ "local_address": items[0],
+ "local_port": items[1],
+ "remote_address": items[2],
+ "remote_port": items[3],
+ "vrf": items[4]
+ })
+ else:
+ raise RuntimeError("Unexpected output from span_mapping_dump.")
+
+ return data
+
+ @staticmethod
+ def vpp_get_nat_interfaces(node):
+ """Get list of interfaces configured with NAT from VPP node.
+
+ :param node: VPP node.
+ :type node: dict
+ :returns: List of interfaces on the node that are configured with NAT.
+ :rtype: list
+ :raises RuntimeError: If the output is not as expected.
+ """
+
+ vat = VatExecutor()
+ # JSON output not supported for this command
+ vat.execute_script('snat/snat_interface_dump.vat', node,
+ json_out=False)
+
+ stdout = vat.get_script_stdout()
+ lines = stdout.split("\n")
+
+ data = []
+ for line in lines:
+ items = line.split(" ")
+ while "" in items:
+ items.remove("")
+ if len(items) == 0:
+ continue
+ elif len(items) == 3:
+ data.append({
+ # items[0] is the table header - "sw_if_index"
+ "sw_if_index": items[1],
+ "direction": items[2]
+ })
+ else:
+ raise RuntimeError(
+ "Unexpected output from span_interface_dump.")
+
+ return data
diff --git a/resources/libraries/python/honeycomb/NAT.py b/resources/libraries/python/honeycomb/NAT.py
new file mode 100644
index 0000000000..1fb066d10c
--- /dev/null
+++ b/resources/libraries/python/honeycomb/NAT.py
@@ -0,0 +1,143 @@
+# 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.
+
+"""Keywords to manipulate NAT configuration using Honeycomb REST API."""
+
+from resources.libraries.python.topology import Topology
+from resources.libraries.python.HTTPRequest import HTTPCodes
+from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError
+from resources.libraries.python.honeycomb.HoneycombUtil \
+ import DataRepresentation
+from resources.libraries.python.honeycomb.HoneycombUtil \
+ import HoneycombUtil as HcUtil
+
+
+class NATKeywords(object):
+ """Keywords for NAT configuration."""
+
+ def __init__(self):
+ pass
+
+ @staticmethod
+ def _set_nat_properties(node, path, data=None):
+ """Set NAT properties and check the return code.
+
+ :param node: Honeycomb node.
+ :param path: Path which is added to the base path to identify the data.
+ :param data: The new data to be set. If None, the item will be removed.
+ :type node: dict
+ :type path: str
+ :type data: dict
+ :returns: Content of response.
+ :rtype: bytearray
+ :raises HoneycombError: If the status code in response to PUT is not
+ OK or ACCEPTED.
+ """
+
+ if data:
+ status_code, resp = HcUtil. \
+ put_honeycomb_data(node, "config_nat", data, path,
+ data_representation=DataRepresentation.JSON)
+ else:
+ status_code, resp = HcUtil. \
+ delete_honeycomb_data(node, "config_nat", path)
+
+ if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED):
+ raise HoneycombError(
+ "The configuration of NAT was not successful. "
+ "Status code: {0}.".format(status_code))
+ return resp
+
+ @staticmethod
+ def get_nat_oper_data(node):
+ """Read NAT operational data.
+
+ :param node: Honeycomb node.
+ :type node: dict
+ :returns: Content of response.
+ :rtype: bytearray
+ :raises HoneycombError: If the operation fails or the response
+ is not as expected.
+ """
+
+ status_code, resp = HcUtil.get_honeycomb_data(node, "oper_nat")
+
+ if status_code != HTTPCodes.OK:
+ raise HoneycombError("Could not retrieve NAT operational data.")
+
+ if "nat-state" not in resp.keys():
+ raise HoneycombError(
+ "Unexpected format, response does not contain nat-state.")
+ return resp['nat-state']
+
+ @staticmethod
+ def configure_nat_entries(node, data, instance=0, entry=1):
+ """Configure NAT entries on node.
+
+ :param node: Honeycomb node.
+ :param data: Data to be configured on node.
+ :param instance: NAT instance ID.
+ :param entry: NAT entry index.
+ :type node: dict
+ :type data: dict
+ :type instance: int
+ :type entry: int
+ :returns: Content of response.
+ :rtype: bytearray
+ """
+
+ return NATKeywords._set_nat_properties(
+ node,
+ '/nat-instances/nat-instance/{0}/'
+ 'mapping-table/mapping-entry/{1}/'.format(instance, entry),
+ data)
+
+ @staticmethod
+ def configure_nat_on_interface(node, interface, direction, delete=False):
+ """Configure NAT on the specified interface.
+
+ :param node: Honeycomb node.
+ :param interface: Name of an interface on the node.
+ :param direction: NAT direction, outbound or inbound.
+ :param delete: Delete an existing interface NAT configuration.
+ :type node: dict
+ :type interface: str
+ :type direction: str
+ :type delete: bool
+ :returns: Content of response.
+ :rtype: bytearray
+ :raises HoneycombError: If the operation fails.
+ """
+
+ interface = Topology.convert_interface_reference(
+ node, interface, "name")
+
+ interface = interface.replace("/", "%2F")
+ path = "/interface/{0}/interface-nat:nat/{1}".format(
+ interface, direction)
+
+ data = {direction: {}}
+
+ if delete:
+ status_code, resp = HcUtil.delete_honeycomb_data(
+ node, "config_vpp_interfaces", path)
+ else:
+ status_code, resp = HcUtil.put_honeycomb_data(
+ node, "config_vpp_interfaces", data, path)
+
+ if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED):
+ raise HoneycombError(
+ "Could not configure NAT on interface. "
+ "Status code: {0}.".format(status_code))
+
+ return resp
diff --git a/resources/libraries/robot/honeycomb/nat.robot b/resources/libraries/robot/honeycomb/nat.robot
new file mode 100644
index 0000000000..af24d56e37
--- /dev/null
+++ b/resources/libraries/robot/honeycomb/nat.robot
@@ -0,0 +1,174 @@
+# 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.
+
+*** Settings ***
+| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
+| Library | resources.libraries.python.honeycomb.NAT.NATKeywords
+| Library | resources.libraries.python.NAT.NATUtil
+| Documentation | Keywords used to test Honeycomb NAT node.
+
+*** Keywords ***
+| NAT configuration from Honeycomb should be empty
+| | [Documentation] | Uses Honeycomb API to retrieve NAT operational data\
+| | ... | and expects to find only default values.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - default_settings - NAT default settings. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| NAT configuration from Honeycomb should be empty \
+| | ... | \| ${nodes['DUT1']} \| ${default_settings} \|
+| | [Arguments] | ${node} | ${default_settings}
+| | ${data}= | Get NAT Oper data | ${node}
+| | Compare data structures | ${data} | ${default_settings}
+
+| Honeycomb configures NAT entry
+| | [Documentation] | Uses Honeycomb API to configure a static NAT entry.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - data - NAT entry to configure. Type: dictionary
+| | ... | - instance - NAT instance on VPP node. Type: integer
+| | ... | - index - Index of NAT entry. Type: integer
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb configures NAT entry \| ${nodes['DUT1']} \| ${data} \
+| | ... | \| ${0} \| ${1} \|
+| | [Arguments] | ${node} | ${data} | ${instance}=0 | ${index}=1
+| | Configure NAT entries | ${node} | ${data} | ${instance} | ${index}
+
+| NAT entries from Honeycomb should be
+| | [Documentation] | Uses Honeycomb API to retrieve NAT operational data\
+| | ... | and compares against expected settings.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - settings - NAT entry to expect. Type: dictionary
+| | ... | - instance - NAT instance on VPP node. Type: integer
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| NAT entries from Honeycomb should be \| ${nodes['DUT1']} \
+| | ... | \| ${settings} \| ${0} \|
+| | [Arguments] | ${node} | ${settings} | ${instance}=0
+| | ${data}= | Get NAT Oper data | ${node}
+| | ${data}= | Set Variable
+| | ... | ${data['nat-instances']['nat-instance'][${instance}]['mapping-table']}
+| | Compare data structures | ${data} | ${settings}
+
+| NAT entries from VAT should be
+| | [Documentation] | Uses VPP test API to retrieve NAT entries\
+| | ... | and compares against expected settings.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - settings - NAT entry to expect. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| NAT entries from VAT should be \| ${nodes['DUT1']} \
+| | ... | \| ${settings} \|
+| | [Arguments] | ${node} | ${settings}
+| | ${data}= | VPP get NAT static mappings | ${node}
+| | Compare data structures | ${data} | ${settings}
+
+| Honeycomb configures NAT on interface
+| | [Documentation] | Uses Honeycomb API to configure NAT on an interface.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - interface - name of an interface on the node. Type: string
+| | ... | - direction - NAT direction parameter, inbound or outbound.\
+| | ... | Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb configures NAT on interface \| ${nodes['DUT1']} \
+| | ... | \| GigabitEthernet0/8/0 \| outbound \|
+| | [Arguments] | ${node} | ${interface} | ${direction}
+| | Configure NAT on interface
+| | ... | ${node} | ${interface} | ${direction}
+
+| Honeycomb removes NAT interface configuration
+| | [Documentation] | Uses Honeycomb API to remove an existing NAT interface\
+| | ... | configuration.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - interface - name of an interface on the node. Type: string
+| | ... | - direction - NAT direction parameter, inbound or outbound.\
+| | ... | Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb removes NAT interface configuration \| ${nodes['DUT1']} \
+| | ... | \| GigabitEthernet0/8/0 \| outbound \|
+| | [Arguments] | ${node} | ${interface} | ${direction}
+| | Configure NAT on interface
+| | ... | ${node} | ${interface} | ${direction} | ${True}
+
+| NAT interface configuration from Honeycomb should be
+| | [Documentation] | Uses Honeycomb API to retrieve interface operational data\
+| | ... | and compares the NAT section against expected settings.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - interface - name of an interface on the node. Type: string
+| | ... | - direction - NAT direction parameter, inbound or outbound.\
+| | ... | Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| NAT interface configuration from Honeycomb should be \
+| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| outbound \|
+| | [Arguments] | ${node} | ${interface} | ${direction}
+| | ${data}= | Get interface oper data | ${node} | ${interface}
+| | Variable should exist | ${data['interface-nat:nat']['${direction}']}
+
+| NAT interface configuration from Honeycomb should be empty
+| | [Documentation] | Uses Honeycomb API to retrieve interface operational data\
+| | ... | and expects to find no data for the given direction.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - interface - name of an interface on the node. Type: string
+| | ... | - direction - NAT direction parameter, inbound or outbound.\
+| | ... | Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| NAT interface configuration from Honeycomb should be empty \
+| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| outbound \|
+| | [Arguments] | ${node} | ${interface} | ${direction}
+| | ${data}= | Get interface oper data | ${node} | ${interface}
+| | Variable should not exist | ${data['interface-nat:nat']['${direction}']}
+
+| NAT interface configuration from VAT should be
+| | [Documentation] | Uses Honeycomb API to retrieve NAT configured interfaces\
+| | ... | and compares with expected settings.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - settings - settings to expect. Type: dictionary
+| | ... | Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| NAT interface configuration from VAT should be \
+| | ... | \| ${nodes['DUT1']} \| ${settings} \|
+| | [Arguments] | ${node} | ${settings}
+| | ${data}= | VPP get NAT interfaces | ${node}
+| | Compare data structures | ${data[0]} | ${settings}
diff --git a/resources/templates/honeycomb/config_nat.url b/resources/templates/honeycomb/config_nat.url
new file mode 100644
index 0000000000..e323aedea9
--- /dev/null
+++ b/resources/templates/honeycomb/config_nat.url
@@ -0,0 +1 @@
+/restconf/config/ietf-nat:nat-config \ No newline at end of file
diff --git a/resources/templates/honeycomb/oper_nat.url b/resources/templates/honeycomb/oper_nat.url
new file mode 100644
index 0000000000..1445f4064b
--- /dev/null
+++ b/resources/templates/honeycomb/oper_nat.url
@@ -0,0 +1 @@
+/restconf/operational/ietf-nat:nat-state \ No newline at end of file
diff --git a/resources/templates/vat/snat/snat_interface_dump.vat b/resources/templates/vat/snat/snat_interface_dump.vat
new file mode 100644
index 0000000000..599c82d8d7
--- /dev/null
+++ b/resources/templates/vat/snat/snat_interface_dump.vat
@@ -0,0 +1 @@
+snat_interface_dump \ No newline at end of file
diff --git a/resources/templates/vat/snat/snat_mapping_dump.vat b/resources/templates/vat/snat/snat_mapping_dump.vat
new file mode 100644
index 0000000000..7ac763b4f3
--- /dev/null
+++ b/resources/templates/vat/snat/snat_mapping_dump.vat
@@ -0,0 +1 @@
+snat_static_mapping_dump \ No newline at end of file
diff --git a/resources/test_data/honeycomb/nat.py b/resources/test_data/honeycomb/nat.py
new file mode 100644
index 0000000000..d56fcfff56
--- /dev/null
+++ b/resources/test_data/honeycomb/nat.py
@@ -0,0 +1,99 @@
+# 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 NAT test suite."""
+
+from resources.libraries.python.topology import Topology
+
+
+def get_variables(node, interface):
+ """Create and return a dictionary of test variables.
+
+ :param node: Honeycomb node.
+ :param interface: Name, link name or sw_if_index of an interface.
+ :type node: dict
+ :type interface: str or int
+
+ :returns: Dictionary of test variables - settings for Honeycomb's
+ NAT node and expected operational data.
+ :rtype: dict
+ """
+ sw_if_index = Topology.convert_interface_reference(
+ node, interface, "sw_if_index")
+
+ variables = {
+ "nat_empty": {
+ 'nat-instances': {
+ 'nat-instance': [{
+ 'id': 0}]
+ }
+ },
+ "entry1": {
+ "mapping-entry": [{
+ "index": 1,
+ "type": "static",
+ "internal-src-address": "192.168.0.1",
+ "external-src-address": "192.168.1.1"
+ }]
+ },
+ "entry2": {
+ "mapping-entry": [{
+ "index": 2,
+ "type": "static",
+ "internal-src-address": "192.168.0.2",
+ "external-src-address": "192.168.1.2"
+ }]
+ },
+ "entry1_2_oper": {
+ "mapping-entry": [
+ {
+ "index": 1,
+ "type": "static",
+ "internal-src-address": "192.168.0.1",
+ "external-src-address": "192.168.1.1"
+ },
+ {
+ "index": 2,
+ "type": "static",
+ "internal-src-address": "192.168.0.2",
+ "external-src-address": "192.168.1.2"
+ }
+ ]
+ },
+ "entry1_vat": [{
+ "local_address": "192.168.0.1",
+ "remote_address": "192.168.1.1",
+ "vrf": "0"
+ }],
+ "entry1_2_vat": [
+ {
+ "local_address": "192.168.0.1",
+ "remote_address": "192.168.1.1",
+ "vrf": "0"
+ }, {
+ "local_address": "192.168.0.2",
+ "remote_address": "192.168.1.2",
+ "vrf": "0"
+ }
+ ],
+ "nat_interface_vat_in": [
+ {"sw_if_index": sw_if_index,
+ "direction": "in"}
+ ],
+ "nat_interface_vat_out": [
+ {"sw_if_index": sw_if_index,
+ "direction": "out"}
+ ]
+ }
+
+ return variables
diff --git a/tests/func/honeycomb/130_nat.robot b/tests/func/honeycomb/130_nat.robot
new file mode 100644
index 0000000000..d761cabe52
--- /dev/null
+++ b/tests/func/honeycomb/130_nat.robot
@@ -0,0 +1,104 @@
+# 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.
+
+*** Variables***
+| ${interface}= | ${node['interfaces']['port1']['name']}
+
+*** Settings ***
+| Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/honeycomb/nat.robot
+| Resource | resources/libraries/robot/honeycomb/honeycomb.robot
+| Variables | resources/test_data/honeycomb/nat.py | ${node} | ${interface}
+| Documentation | *Honeycomb NAT test suite.*
+| Suite Teardown | Run Keyword If Any Tests Failed
+| ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
+| Force Tags | honeycomb_sanity
+
+*** Test Cases ***
+| TC01: Honeycomb configures NAT entry
+| | [Documentation] | Honeycomb configures a static NAT entry.
+| | Given NAT configuration from Honeycomb should be empty
+| | ... | ${node} | ${nat_empty}
+| | When Honeycomb Configures NAT Entry | ${node} | ${entry1}
+| | Then NAT Entries From Honeycomb Should Be | ${node} | ${entry1}
+| | And NAT Entries From VAT Should Be | ${node} | ${entry1_vat}
+
+| TC02: Honeycomb removes NAT entry
+| | [Documentation] | Honeycomb removes a configured static NAT entry.
+| | Given NAT Entries From Honeycomb Should Be | ${node} | ${entry1}
+| | And NAT Entries From VAT Should Be | ${node} | ${entry1_vat}
+| | When Honeycomb Configures NAT Entry | ${node} | ${NONE}
+| | Then NAT configuration from Honeycomb should be empty
+| | ... | ${node} | ${nat_empty}
+
+| TC03: Honeycomb configures multiple NAT entries
+| | [Documentation] | Honeycomb configures two static NAT entries.
+| | [Teardown] | Honeycomb Configures NAT Entry | ${node} | ${NONE}
+| | Given NAT configuration from Honeycomb should be empty
+| | ... | ${node} | ${nat_empty}
+| | When Honeycomb Configures NAT Entry | ${node} | ${entry1} | ${0} | ${1}
+| | And Honeycomb Configures NAT Entry | ${node} | ${entry2} | ${0} | ${2}
+| | Then NAT Entries From Honeycomb Should Be
+| | ... | ${node} | ${entry1_2_oper} | ${0}
+| | And NAT Entries From VAT Should Be | ${node} | ${entry1_2_vat}
+
+| TC04: Honeycomb enables NAT on interface - inbound
+| | [Documentation] | Honeycomb configures NAT on an interface\
+| | ... | in inbound direction.
+# Interface config not visible in VAT - https://jira.fd.io/browse/HC2VPP-8
+| | [Tags] | EXPECTED_FAILING
+| | Given NAT Interface Configuration From Honeycomb Should Be Empty
+| | ... | ${node} | ${interface} | inbound
+| | And NAT Interface Configuration From Honeycomb Should Be Empty
+| | ... | ${node} | ${interface} | outbound
+| | When Honeycomb Configures NAT On Interface
+| | ... | ${node} | ${interface} | inbound
+| | Then NAT Interface Configuration From Honeycomb Should Be
+| | ... | ${node} | ${interface} | inbound
+| | And NAT Interface Configuration From VAT Should Be
+| | ... | ${node} | ${nat_interface_vat_in}
+| | And NAT Interface Configuration From Honeycomb Should be empty
+| | ... | ${node} | ${interface} | outbound
+
+| TC05: Honeycomb removes NAT interface configuration
+| | [Documentation] | Honeycomb removes NAT configuration from an interface.
+| | Given NAT Interface Configuration From Honeycomb Should Be
+| | ... | ${node} | ${interface} | inbound
+| | And NAT Interface Configuration From Honeycomb Should Be empty
+| | ... | ${node} | ${interface} | outbound
+| | When Honeycomb removes NAT interface configuration
+| | ... | ${node} | ${interface} | inbound
+| | Then NAT Interface Configuration From Honeycomb Should Be empty
+| | ... | ${node} | ${interface} | inbound
+| | And NAT Interface Configuration From Honeycomb Should Be empty
+| | ... | ${node} | ${interface} | outbound
+
+| TC06: Honeycomb enables NAT on interface - outbound
+| | [Documentation] | Honeycomb configures NAT on an interface\
+| | ... | in outbound direction.
+# Interface config not visible in VAT - https://jira.fd.io/browse/HC2VPP-8
+| | [Tags] | EXPECTED_FAILING
+| | [Teardown] | Honeycomb removes NAT interface configuration
+| | ... | ${node} | ${interface} | outbound
+| | Given NAT Interface Configuration From Honeycomb Should Be empty
+| | ... | ${node} | ${interface} | inbound
+| | And NAT Interface Configuration From Honeycomb Should Be empty
+| | ... | ${node} | ${interface} | outbound
+| | When Honeycomb Configures NAT on Interface
+| | ... | ${node} | ${interface} | outbound
+| | Then NAT Interface Configuration From Honeycomb Should Be empty
+| | ... | ${node} | ${interface} | inbound
+| | And NAT Interface Configuration From Honeycomb Should Be
+| | ... | ${node} | ${interface} | outbound
+| | And NAT Interface Configuration From VAT Should Be
+| | ... | ${node} | ${nat_interface_vat_out}