aboutsummaryrefslogtreecommitdiffstats
path: root/tests/func/honeycomb
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2017-05-18 18:07:46 +0200
committerTibor Frank <tifrank@cisco.com>2017-06-05 11:25:06 +0000
commit54021405af918f9b6ee2fc8c0d531903f579e930 (patch)
treee4365e3a627753095c58641e6fed699b746c975a /tests/func/honeycomb
parentb92b5be7d4bbbf523812f774bb2e539ab2081cf6 (diff)
CSIT-610 HC Test: add test cases for unnumbered interface
- add interface and sub-interface tests with unnumbered config - modify interface IPv4 address assignment to handle custom interfaces and sub-interfaces - pylint and style fixes Change-Id: Ic39df1655b4d44f0025a2acef9f7f968929aeff5 Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'tests/func/honeycomb')
-rw-r--r--tests/func/honeycomb/__init__.robot2
-rw-r--r--tests/func/honeycomb/mgmt-cfg-int-subint-apihc-apivat-func.robot77
-rw-r--r--tests/func/honeycomb/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot47
3 files changed, 122 insertions, 4 deletions
diff --git a/tests/func/honeycomb/__init__.robot b/tests/func/honeycomb/__init__.robot
index e247180b25..128f19f6a0 100644
--- a/tests/func/honeycomb/__init__.robot
+++ b/tests/func/honeycomb/__init__.robot
@@ -43,6 +43,6 @@
| | Run Keyword If | '${use_odl_client}' != '${NONE}'
| | ... | Run Keywords
| | ... | Set Global Variable | ${use_odl_client} | AND
-| | ... | Setup ODL Client Service On DUT | ${node} | ${use_odl_client}
+| | ... | Configure ODL Client Service On DUT | ${node} | ${use_odl_client}
| | ... | ELSE | Log | Variable HC_ODL is not present. Not using ODL.
| | ... | level=INFO
diff --git a/tests/func/honeycomb/mgmt-cfg-int-subint-apihc-apivat-func.robot b/tests/func/honeycomb/mgmt-cfg-int-subint-apihc-apivat-func.robot
index 9fb858ad25..c7e0737a6b 100644
--- a/tests/func/honeycomb/mgmt-cfg-int-subint-apihc-apivat-func.robot
+++ b/tests/func/honeycomb/mgmt-cfg-int-subint-apihc-apivat-func.robot
@@ -18,6 +18,7 @@
| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
| Resource | resources/libraries/robot/honeycomb/interfaces.robot
| Variables | resources/test_data/honeycomb/sub_interfaces.py
+| Suite Setup | Add Interface local0 To Topology | ${node}
| Suite Teardown
| ... | Restart Honeycomb and VPP | ${node}
| Force Tags | HC_FUNC
@@ -458,6 +459,82 @@
| | ... | ${node} | ${sub_if_name}
| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']}
+| TC22: Honeycomb can configure unnumbered sub-interface
+| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\
+| | ... | on a sub-interface, borrowing the IP address of 'local0'.
+| | Given sub-interface ipv4 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv4 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+| | And Honeycomb sets interface ipv4 address | ${node}
+| | ... | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | When Honeycomb adds unnumbered configuration to interface
+| | ... | ${node} | ${super_if}.${sub_if_id} | local0
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And sub-interface ipv4 address from VAT should be
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+
+| TC23: Honeycomb removes sub-interface unnumbered configuration
+| | [Documentation] | Check if Honeycomb can remove unnumbered configuration\
+| | ... | from a sub-interface.
+| | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
+| | ... | local0
+| | Given IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And sub-interface ipv4 address from VAT should be
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | When Honeycomb removes unnumbered configuration from interface
+| | ... | ${node} | ${super_if}.${sub_if_id}
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv4 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+
+| TC24: Honeycomb can configure unnumbered interface using a sub-interface
+| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\
+| | ... | on an interface, borrowing the IP address of a sub-interface.
+| | Given IPv4 address from Honeycomb should be empty | ${node} | local0
+| | And ipv4 address from VAT should be empty | ${node} | local0
+| | And sub-interface ipv4 address from Honeycomb should be empty
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | And sub-interface ipv4 address from VAT should be empty
+| | ... | ${node} | ${sub_if_name}
+| | And Honeycomb sets sub-interface ipv4 address
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | When Honeycomb adds unnumbered configuration to interface
+| | ... | ${node} | local0 | ${super_if}.${sub_if_id}
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']}
+| | And sub-interface ipv4 address from Honeycomb should be
+| | ... | ${node} | ${super_if} | ${sub_if_id}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
+| | And sub-interface ipv4 address from VAT should be
+| | ... | ${node} | ${sub_if_name}
+| | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
*** Keywords ***
| Set super and sub interfaces up
diff --git a/tests/func/honeycomb/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot b/tests/func/honeycomb/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot
index 1d2b4ae7de..edc1713824 100644
--- a/tests/func/honeycomb/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot
+++ b/tests/func/honeycomb/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot
@@ -198,7 +198,7 @@
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
-TC11: Honeycomb fails to configure two IPv4 addresses from the same subnet
+| TC11: Honeycomb fails to configure two IPv4 addresses from the same subnet
| | [Documentation] | Check if Honeycomb can configure two IPv4 addresses in\
| | ... | the same subnet onto a single interface. It should not be possible.
| | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
@@ -212,7 +212,7 @@ TC11: Honeycomb fails to configure two IPv4 addresses from the same subnet
| | And Honeycomb fails to add interface ipv4 address
| | ... | ${node} | ${interface} | 192.232.0.2 | ${9}
-TC12: Honeycomb fails to configure two IPv6 addresses from the same subnet
+| TC12: Honeycomb fails to configure two IPv6 addresses from the same subnet
| | [Documentation] | Check if Honeycomb can configure two IPv6 addresses in\
| | ... | the same subnet onto a single interface. It should not be possible.
| | [Tags] | EXPECTED_FAILING
@@ -224,4 +224,45 @@ TC12: Honeycomb fails to configure two IPv6 addresses from the same subnet
| | Then Honeycomb fails to add interface ipv6 address
| | ... | ${node} | ${interface} | 10::FF11 | ${64}
| | And Honeycomb fails to add interface ipv6 address
-| | ... | ${node} | ${interface} | 10::FFFF | ${64} \ No newline at end of file
+| | ... | ${node} | ${interface} | 10::FFFF | ${64}
+
+| TC13: Honeycomb can configure unnumbered interface
+| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\
+| | ... | on a physical interface, borrowing the IP address of 'local0'.
+| | Given Honeycomb sets interface ipv4 address | ${node}
+| | ... | local0 | ${ipv4_address} | ${ipv4_prefix}
+| | When Honeycomb adds unnumbered configuration to interface
+| | ... | ${node} | ${interface} | local0
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4_address} | ${ipv4_prefix}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0 | ${ipv4_address}
+| | ... | ${ipv4_prefix} | ${ipv4_mask}
+| | And IPv4 address from Honeycomb should be
+| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | ${interface} | ${ipv4_address}
+| | ... | ${ipv4_prefix} | ${ipv4_mask}
+
+| TC14: Honeycomb removes interface unnumbered configuration
+| | [Documentation] | Check if Honeycomb can remove unnumbered configuration\
+| | ... | from an interface.
+| | Given IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4_address} | ${ipv4_prefix}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0 | ${ipv4_address}
+| | ... | ${ipv4_prefix} | ${ipv4_mask}
+| | And IPv4 address from Honeycomb should be
+| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | ${interface} | ${ipv4_address}
+| | ... | ${ipv4_prefix} | ${ipv4_mask}
+| | When Honeycomb removes unnumbered configuration from interface
+| | ... | ${node} | ${interface}
+| | Then IPv4 address from Honeycomb should be
+| | ... | ${node} | local0 | ${ipv4_address} | ${ipv4_prefix}
+| | And IPv4 address from VAT should be
+| | ... | ${node} | local0 | ${ipv4_address}
+| | ... | ${ipv4_prefix} | ${ipv4_mask}
+| | And IPv4 address from Honeycomb should be empty | ${node} | ${interface}
+| | And ipv4 address from VAT should be empty | ${node} | ${interface}