Removed testplans and suites for vpnservice project.
JIRA: INTTEST-140
Change-Id: If537c4af19d015f484f1e77cb457d8846bee6d54
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
+++ /dev/null
-*** Settings ***
-Documentation Test Suite that, verifies the features and corresponding bundles are installed.
-
-Resource ../../libraries/KarafKeywords.robot
-
-
-*** Variables ***
-@{FEATURE_LIST}
-... odl-vpnservice-api
-... odl-vpnservice-impl
-... odl-vpnservice-impl-rest
-... odl-vpnservice-impl-ui
-... odl-vpnservice-core
-@{BUNDLE_LIST}
-... org.opendaylight.vpnservice.vpnmanager-impl
-... org.opendaylight.vpnservice.interfacemgr-impl
-... org.opendaylight.vpnservice.nexthopmgr-impl
-... org.opendaylight.vpnservice.idmanager-impl
-... org.opendaylight.vpnservice.fibmanager-impl
-... org.opendaylight.vpnservice.bgpmanager-impl
-... org.opendaylight.vpnservice.model-bgp
-@{MESSAGE_STRING_LIST}
-... VpnserviceProvider Session Initiated
-... InterfacemgrProvider Session Initiated
-... NexthopmgrProvider Session Initiated
-... IDManagerserviceProvider Session Initiated
-... FibManagerProvider Session Initiated
-... BgpManager Session Initiated
-
-
-*** Test Cases ***
-Verify if the VPN Service features are installed for vpnservice
- [Documentation] Executes command "feature list -i | grep <feature_name>" in karaf console and checks if output \ contain \ the specific features.
- [Tags] verify feature
- FOR ${feature} IN @{FEATURE_LIST}
- Verify Feature Is Installed ${feature}
- END
-
-Verify if the VPN Service bundles are loaded
- [Documentation] Executes command "bundle:list -s | grep <bundle name>" and checks in the output for the specific bundles
- [Tags] verify vpn bundles
- FOR ${bundle} IN @{BUNDLE_LIST}
- Verify Bundle Is Installed ${bundle}
- END
-
-Verify if the sessions for bundles got initiated
- [Documentation] Executes"log:display | grep vpnservice" command in karaf console and verifies the logs for session initiation
- [Tags] verify session
- Wait Until Keyword Succeeds
- ... 240 seconds
- ... 30 seconds
- ... Check Karaf Log Has Messages
- ... vpnservice
- ... @{MESSAGE_STRING_LIST}
+++ /dev/null
-*** Settings ***
-Documentation Test Suite for vpn instance
-
-Library OperatingSystem
-Library String
-Library RequestsLibrary
-Variables ../../variables/Variables.py
-Library Collections
-Resource CompareStream.robot
-
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-
-
-*** Variables ***
-${REST_CON} /restconf/config/
-@{vpn_inst_values} testVpn1 1000:1 1000:1,2000:1 3000:1,4000:1
-@{vm_int_values} s1-eth1 l2vlan openflow:1:1
-@{vm_vpnint_values} s1-eth1 testVpn1 10.0.0.1 12:f8:57:a8:b9:a1
-${VPN_CONFIG_DIR} ${CURDIR}/../../variables/vpnservice
-
-
-*** Test Cases ***
-Create VPN Instance
- [Documentation] Creates VPN Instance through restconf
- [Tags] post
- ${body} OperatingSystem.Get File ${VPN_CONFIG_DIR}/vpn_instance.json
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}l3vpn:vpn-instances/
- ... data=${body}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-instances/
- ... data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Verify VPN instance
- [Documentation] Verifies the vpn instance is created
- [Tags] get
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}l3vpn:vpn-instances/vpn-instance/${vpn_inst_values[0]}/
- ... headers=${ACCEPT_XML}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-instances/vpn-instance/${vpn_inst_values[0]}/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- FOR ${value} IN @{vpn_inst_values}
- Should Contain ${resp.content} ${value}
- END
-
-Create ietf vm interface
- [Documentation] Creates ietf interface through the restconf
- [Tags] post
- ${body} OperatingSystem.Get File ${VPN_CONFIG_DIR}/vm_interface.json
- ${resp} RequestsLibrary.Post Request session ${REST_CON}ietf-interfaces:interfaces/ data=${body}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Verify ietf vm interface
- [Documentation] Verifies ietf interface created
- [Tags] get
- ${resp} RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}ietf-interfaces:interfaces/interface/${vm_int_values[0]}/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- FOR ${value} IN @{vm_int_values}
- Should Contain ${resp.content} ${value}
- END
-
-Create VPN interface
- [Documentation] Creates vpn interface for the corresponding ietf interface
- [Tags] post
- ${body} OperatingSystem.Get File ${VPN_CONFIG_DIR}/vm_vpninterface.json
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}l3vpn:vpn-interfaces/
- ... data=${body}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-interfaces/
- ... data=${body}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Verify VPN interface
- [Documentation] Verifies the vpn interface created
- [Tags] get
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}l3vpn:vpn-interfaces/
- ... headers=${ACCEPT_XML}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-interfaces/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- FOR ${value} IN @{vm_vpnint_values}
- Should Contain ${resp.content} ${value}
- END
-
-Verify FIB entry after create
- [Documentation] Verifies the fib entry for the corresponding vpn interface
- [Tags] get
- Wait Until Keyword Succeeds 5s 1s Ensure The Fib Entry Is Present ${vm_vpnint_values[2]}
-
-Delete vm vpn interface
- [Documentation] Deletes the vpn interface
- [Tags] delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}l3vpn:vpn-interfaces/
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-interfaces/
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleteing vm vpn interface
- [Documentation] Verifies vpn interface after delete
- [Tags] verify after delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}l3vpn:vpn-interfaces/
- ... headers=${ACCEPT_XML}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-interfaces/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Delete VPN Instance
- [Documentation] Deletes the VPN Instance
- [Tags] delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}l3vpn:vpn-instances/vpn-instance/${vpn_inst_values[0]}/
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Requestt
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-instances/vpn-instance/${vpn_inst_values[0]}/
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting the vpn instance
- [Documentation] Verifies after deleting the vpn instance
- [Tags] verfiy after delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}l3vpn:vpn-instances/vpn-instance/${vpn_inst_values[0]}/
- ... headers=${ACCEPT_XML}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}l3vpn-instances-interfaces:vpn-instances/vpn-instance/${vpn_inst_values[0]}/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Delete vm ietf interface
- [Documentation] Deletes the ietf interface
- [Tags] delete
- ${resp} RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}ietf-interfaces:interfaces/interface/${vm_int_values[0]}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting vm ietf interface
- [Documentation] Verifies ietf interface after delete
- [Tags] verify after delete
- ${resp} RequestsLibrary.Get Request
- ... session
- ... ${REST_CON}ietf-interfaces:interfaces/interface/${vm_int_values[0]}
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Verify FIB entry after delete
- [Documentation] Verifies the fib entry is deleted for the corresponding vpn interface
- [Tags] get
- Wait Until Keyword Succeeds 5s 1s Ensure The Fib Entry Is Removed ${vm_vpnint_values[2]}
-
-
-*** Keywords ***
-Ensure The Fib Entry Is Present
- [Documentation] Will succeed if the fib entry is present for the vpn
- [Arguments] ${prefix}
- ${resp} RequestsLibrary.Get Request
- ... session
- ... /restconf/operational/odl-fib:fibEntries/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain ${resp.content} ${prefix}
- Should Contain ${resp.content} label
-
-Ensure the Fib Entry Is Removed
- [Documentation] Will succeed if the fib entry is removed for the vpn
- [Arguments] ${prefix}
- ${resp} RequestsLibrary.Get Request
- ... session
- ... /restconf/operational/odl-fib:fibEntries/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Not Contain ${resp.content} ${prefix}
+++ /dev/null
-*** Settings ***
-Documentation Test Suite for vpn instance
-
-Variables ../../variables/vpnservice/configureSwitches.py ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP}
-Library SSHLibrary
-Variables ../../variables/Variables.py
-Resource ../../libraries/Utils.robot
-Library RequestsLibrary
-
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-
-
-*** Variables ***
-${REST_CON} /restconf/config
-@{vpn_inst_values} testVpn1 100:1 200:1 300:1 testVpn2 400:1 500:1
-... 600:1
-@{ietf_int_values} s1-eth1 s1-eth2 s1-gre1 s2-eth1 s2-eth2 s2-gre1
-@{vpn_int_values}
-... s1-eth1
-... testVpn1
-... 10.0.0.1
-... 00:00:00:00:00:01
-... s1-eth2
-... 10.0.0.2
-... 00:00:00:00:00:02
-... s2-eth1
-... 10.0.0.3
-... 00:00:00:00:00:03
-... testVpn2
-... s2-eth2
-... 10.0.0.4
-... 00:00:00:00:00:04
-${REST_OPER} /restconf/operational
-@{NODE_ELEMENTS}
-... openflow:1
-... openflow:1:1
-... openflow:1:2
-... openflow:1:3
-... openflow:2
-... openflow:2:1
-... openflow:2:2
-... openflow:2:3
-
-
-*** Test Cases ***
-Veirfy The Switches
- [Documentation] Verifies if the switches and node connectors data is available to the controller
- Check For Elements At URI ${REST_OPER}/opendaylight-inventory:nodes/ ${NODE_ELEMENTS}
-
-Create VPN Instances
- [Documentation] Creates VPN Instances through restconf
- [Tags] post
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}/l3vpn:vpn-instances/
- ... data=${vpn_instances}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-instances/
- ... data=${vpn_instances}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Verify VPN instances
- [Documentation] Verifies the vpn instances in the datastores
- [Tags] get
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_CON}/l3vpn:vpn-instances/
- ... ${vpn_inst_values}
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_OPER}/l3vpn:vpn-instances/
- ... ${vpn_inst_values}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-instances/
- ... ${vpn_inst_values}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_OPER}/l3vpn-instances-interfaces:vpn-instances/
- ... ${vpn_inst_values}
-
-Create ietf interfaces
- [Documentation] Creates ietf interfaces through the restconf
- [Tags] post
- ${resp}= RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}/ietf-interfaces:interfaces/
- ... data=${ietf_interfaces}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Verify ietf interfaces
- [Documentation] Verifies ietf interfaces created in datastores
- [Tags] get
- Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_CON}/ietf-interfaces:interfaces/
- ... ${ietf_int_values}
- Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_OPER}/ietf-interfaces:interfaces-state/
- ... ${ietf_int_values}
- @{state}= Create List down
- Wait Until Keyword Succeeds
- ... 2s
- ... 1s
- ... Check For Elements Not At URI
- ... ${REST_OPER}/ietf-interfaces:interfaces-state/
- ... ${state}
-
-Create VPN interfaces
- [Documentation] Creates vpn interface for the corresponding ietf interface
- [Tags] post
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}/l3vpn:vpn-interfaces/
- ... data=${vpn_instances}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Post Request
- ... session
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-interfaces/
- ... data=${vpn_instances}
- Should Be Equal As Strings ${resp.status_code} 204
-
-Verify VPN interfaces
- [Documentation] Verifies the vpn interfaces created in datastores
- [Tags] get
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... Wait Until Keyword Succeeds
- ... 3s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_CON}/l3vpn:vpn-interfaces/
- ... ${vpn_int_values}
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... Wait Until Keyword Succeeds
- ... 3s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_OPER}/l3vpn:vpn-interfaces/
- ... ${vpn_int_values}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... Wait Until Keyword Succeeds
- ... 3s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-interfaces/
- ... ${vpn_int_values}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... Wait Until Keyword Succeeds
- ... 3s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_OPER}/l3vpn-instances-interfaces:vpn-interfaces/
- ... ${vpn_int_values}
-
-Verify FIB entries after create
- [Documentation] Verifies the fib entries in the operational DS for the corresponding vpn interfaces
- [Tags] get
- @{fib_entries1}= Create List ${vpn_int_values[2]} ${vpn_int_values[8]}
- @{fib_entries2}= Create List ${vpn_int_values[5]} ${vpn_int_values[12]}
- Wait Until Keyword Succeeds
- ... 3s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_OPER}/odl-fib:fibEntries/vrfTables/${vpn_inst_values[1]}
- ... ${fib_entries1}
- Wait Until Keyword Succeeds
- ... 3s
- ... 1s
- ... Check For Elements At URI
- ... ${REST_OPER}/odl-fib:fibEntries/vrfTables/${vpn_inst_values[5]}
- ... ${fib_entries2}
-
-Verify flows
- [Documentation] Verify flows in the switches
- [Tags] verify in switch
- @{flow_elements}= Create List
- ... ${vpn_int_values[2]}
- ... ${vpn_int_values[5]}
- ... ${vpn_int_values[8]}
- ... ${vpn_int_values[12]}
- Wait Until Keyword Succeeds 6s 2s Ensure Flows Are Present ${mininet1_conn_id_1} ${flow_elements}
- Wait Until Keyword Succeeds 6s 2s Ensure Flows Are Present ${mininet2_conn_id_1} ${flow_elements}
-
-Verify groups
- [Documentation] Verify groups in the switches
- [Tags] verify in switch
- @{group_elements1}= Create List ${vpn_int_values[3]} ${vpn_int_values[6]}
- @{group_elements2}= Create List ${vpn_int_values[9]} ${vpn_int_values[13]}
- Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Ensure Groups Are Present
- ... ${mininet1_conn_id_1}
- ... ${group_elements1}
- ... 3
- Wait Until Keyword Succeeds
- ... 5s
- ... 1s
- ... Ensure Groups Are Present
- ... ${mininet2_conn_id_1}
- ... ${group_elements2}
- ... 3
-
-Verify ping
- [Documentation] Verifies the ping between the two hosts. Ping should succeed between hosts in same vpn, (h1,h3) and (h2,h4).Ping between hosts in different vpns should fail (h1,h2) & (h3,h4). The commented out section is to be uncommented when ovs supports mpls over gre in datapath
- [Tags] verify in switch
- Switch Connection ${mininet1_conn_id_1}
- Write h1 ping h2 -c 5
- ${result}= Read Until mininet>
- Log ${result}
- Should Contain ${result} 100% packet loss
-
-Delete vpn interfaces
- [Documentation] Deletes the vpn interfaces
- [Tags] delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}/l3vpn:vpn-interfaces/
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-interfaces/
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting vpn interfaces
- [Documentation] Verifies if vpn interfaces are deleted
- [Tags] verify after delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.get Request
- ... session
- ... ${REST_CON}/l3vpn:vpn-interfaces/
- ... headers=${ACCEPT_XML}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.get Request
- ... session
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-interfaces/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Delete ietf interfaces
- [Documentation] Deletes the ietf interfaces
- [Tags] delete
- ${resp}= RequestsLibrary.Delete Request session ${REST_CON}/ietf-interfaces:interfaces/
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting ietf interfaces
- [Documentation] Verifies if ietf interfaces are deleted
- [Tags] verify after delete
- ${resp}= RequestsLibrary.get Request
- ... session
- ... ${REST_CON}/ietf-interfaces:interfaces/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Delete VPN Instances
- [Documentation] Deletes the VPN Instances
- [Tags] delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}/l3vpn:vpn-instances/
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.Delete Request
- ... session
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-instances/
- Should Be Equal As Strings ${resp.status_code} 200
-
-Verify after deleting the vpn instances
- [Documentation] Verifies after deleting the vpn instances
- [Tags] verfiy after delete
- CompareStream.Run_Keyword_If_Less_Than_Magnesium
- ... ${resp}
- ... RequestsLibrary.get Request
- ... session
- ... ${REST_CON}/l3vpn:vpn-instances/
- ... headers=${ACCEPT_XML}
- CompareStream.Run_Keyword_If_At_Least_Magnesium
- ... ${resp}
- ... RequestsLibrary.get Request
- ... session
- ... ${REST_CON}/l3vpn-instances-interfaces:vpn-instances/
- ... headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Verify FIB entries after delete
- [Documentation] Verifies if the fib entries are deleted in the operational DS
- [Tags] get
- @{fib_entries}= Create List
- ... ${vpn_int_values[2]}
- ... ${vpn_int_values[5]}
- ... ${vpn_int_values[8]}
- ... ${vpn_int_values[12]}
- Wait Until Keyword Succeeds
- ... 3s
- ... 1s
- ... Check For Elements Not At URI
- ... ${REST_OPER}/odl-fib:fibEntries/
- ... ${fib_entries}
-
-Verify flows after delete
- [Documentation] Verify if the flows are deleted from the switch
- [Tags] verify in switch
- [Template] ${EMPTY}
- Wait Until Keyword Succeeds 12s 2s Ensure Flows Are Removed ${mininet1_conn_id_1}
- Wait Until Keyword Succeeds 12s 2s Ensure Flows Are Removed ${mininet2_conn_id_1}
-
-
-*** Keywords ***
-Ensure Flows Are Present
- [Documentation] Succeeds if the flows for vpn service are present
- [Arguments] ${conn_id} ${flow_elements}
- Switch Connection ${conn_id}
- Write dpctl dump-flows -O OpenFlow13
- ${output}= Read Until mininet>
- Log ${output}
- Should Contain ${output} goto_table:20
- Should Contain X Times ${output} goto_table:21 2
- Should Contain X Times ${output} table=20 2
- Should Contain X Times ${output} table=21 4
- FOR ${i} IN @{flow_elements}
- Should Contain ${output} ${i}
- END
-
-Ensure Groups Are Present
- [Documentation] Succeeds if the groups for the vpn service are present
- [Arguments] ${conn_id} ${group_elements} ${gre_port_id}
- Switch Connection ${conn_id}
- Write dpctl dump-groups -O OpenFlow13
- ${output}= Read Until mininet>
- Log ${output}
- Should Contain X Times ${output} actions=output:${gre_port_id} 1
- FOR ${i} IN @{group_elements}
- Should Contain ${output} actions=pop_mpls:0x0800,set_field:${i}
- END
-
-Ensure Flows Are Removed
- [Documentation] Succeeds if the flows are removed from the switch
- [Arguments] ${conn_id}
- Switch Connection ${conn_id}
- Write dpctl dump-flows -O OpenFlow13
- ${output}= Read Until mininet>
- Log ${output}
- Should Not contain ${output} goto_table:20
- Should Not contain ${output} goto_table:21
- Should Not contain ${output} table=20
- Should Not contain ${output} table=21
-
-Ensure Groups Are Removed
- [Documentation] Succeeds if the group entries are removed from switch
- [Arguments] ${conn_id}
- Switch Connection ${conn_id}
- Write dpctl dump-groups -O OpenFlow13
- ${output}= Read Until mininet>
- Log ${output}
- Should Not Contain ${output} actions=output:
- Should Not Contain ${output} actions=pop_mpls:0x0800
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Inventory Scalability
-
-Library SSHLibrary
-Library ../../libraries/Common.py
-Variables ../../variables/Variables.py
-Resource ../../libraries/Utils.robot
-
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-
-
-*** Variables ***
-${start1}
-... sudo mn \ --controller=remote,ip=${ODL_SYSTEM_IP} --custom custom.py --topo Switch1 --switch ovsk,protocols=OpenFlow13
-${start2}
-... sudo mn \ --controller=remote,ip=${ODL_SYSTEM_IP} --custom custom.py --topo Switch2 --switch ovsk,protocols=OpenFlow13
-
-
-*** Keywords ***
-Start Suite
- [Documentation] Test suit for vpn service using mininet OF13 and OVS 2.3.1
- Log Start the tests
- Clean Mininet System
- ${mininet1_conn_id_1}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
- Set Global Variable ${mininet1_conn_id_1}
- Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- Execute Command sudo ovs-vsctl set-manager ptcp:6644
- Put File ${CURDIR}/custom.py
- Write ${start1}
- Read Until mininet>
- ${mininet1_conn_id_2}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout= 30s
- Set Global Variable ${mininet1_conn_id_2}
- Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- Execute Command
- ... sudo ovs-vsctl add-port s1 s1-gre1 -- set interface s1-gre1 type=gre options:remote_ip=${TOOLS_SYSTEM_2_IP} options:local_ip=${TOOLS_SYSTEM_IP}
- ${output}= Execute Command sudo ovs-vsctl show
- Log ${output}
- Execute Command sudo ovs-ofctl add-flow s1 -O OpenFlow13 arp,actions=FLOOD
- ${mininet2_conn_id_1}= Open Connection ${TOOLS_SYSTEM_2_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
- Set Global Variable ${mininet2_conn_id_1}
- Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- Execute Command sudo ovs-vsctl set-manager ptcp:6644
- Put File ${CURDIR}/custom.py
- Write ${start2}
- Read Until mininet>
- ${mininet2_conn_id_2}= Open Connection ${TOOLS_SYSTEM_2_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout= 30s
- Set Global Variable ${mininet2_conn_id_2}
- Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
- Execute Command
- ... sudo ovs-vsctl add-port s2 s2-gre1 -- set interface s2-gre1 type=gre options:remote_ip=${TOOLS_SYSTEM_IP} options:local_ip=${TOOLS_SYSTEM_2_IP}
- ${output}= Execute Command sudo ovs-vsctl show
- Log ${output}
- Execute Command sudo ovs-ofctl add-flow s2 -O OpenFlow13 arp,actions=FLOOD
-
-Stop Suite
- Log Stop the tests
- Switch Connection ${mininet1_conn_id_1}
- Read
- Write exit
- Read Until ${DEFAULT_LINUX_PROMPT}
- Close Connection
- Switch Connection ${mininet1_conn_id_2}
- Close Connection
- Switch Connection ${mininet2_conn_id_1}
- Read
- Write exit
- Read Until ${DEFAULT_LINUX_PROMPT}
- Close Connection
- Switch Connection ${mininet2_conn_id_2}
- Close Connection
+++ /dev/null
-"""Topology description for configuring vpnservice for hosts on 2 switches
-
- MININET MININET1
- ------------- gre -------------
- | h1-----s1 |------------| s2------h3|
- | | | | | |
- | | | | | |
- | h2 | | h4 |
- ------------- -------------
-1)The topology consits of switch s1 in one VM connected to hosts h1,h2.Switch s2 in another VM connected to hosts h3,h4.
-2)GRE tunnel is configured between s1 and s2 using ovs-vsctl commands.
-3)h1 and h3 will be configured for vpn instance testVpn1 and h2,h4 for testVpn2.
-"""
-
-from mininet.topo import Topo
-
-
-class Switch1(Topo):
- """Single switch s1 connected to n=2 hosts."""
-
- def __init__(self):
- Topo.__init__(self)
- switch = self.addSwitch("s1")
- n = 2
- for h in range(n):
- host = self.addHost(
- "h%s" % (h + 1),
- mac="00:00:00:00:00:0" + str(h + 1),
- ip="10.0.0." + str(h + 1),
- )
- self.addLink(host, switch)
-
-
-class Switch2(Topo):
- """Single switch s2 connected to n=2 hosts."""
-
- def __init__(self):
- Topo.__init__(self)
- switch = self.addSwitch("s2")
- n = 2
- for h in range(n):
- host = self.addHost(
- "h%s" % (h + 3),
- mac="00:00:00:00:00:0" + str(h + 3),
- ip="10.0.0." + str(h + 3),
- )
- self.addLink(host, switch)
-
-
-topos = {"Switch1": (lambda: Switch1()), "Switch2": (lambda: Switch2())}
+++ /dev/null
-# Place the suites in run order:
-integration/test/csit/suites/vpnservice/
+++ /dev/null
-# Place the suites in run order:
-integration/test/csit/suites/vpnservice/