+++ /dev/null
-*** Settings ***
-Documentation Test suite for Host Tracker
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${name} 10.0.1.4
-${key} hostConfig
-${REST_CONTEXT} /controller/nb/v2/hosttracker
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.1.4"
-
-*** Test Cases ***
-Add a host
- [Documentation] Add a host, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress
- ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
- ${resp} RequestsLibrary.Put session ${REST_CONTEXT}/${CONTAINER}/address/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/hosts/active
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
-
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] apps
- Sleep 30
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${FLOW} 3
-
-Remove a host
- [Documentation] Remove a host, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress
- ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
- ${resp} RequestsLibrary.Delete session ${REST_CONTEXT}/${CONTAINER}/address/${name}
- Should Be Equal As Strings ${resp.status_code} 204
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Not Contain Value ${content} ${body}
-
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] apps
- Sleep 30
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Static Route
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${name} test_route1
-${key} staticRoute
-${REST_CONTEXT} /controller/nb/v2/staticroute
-${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
-
-*** Test Cases ***
-Add a static route
- [Documentation] Add a static route, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
- ... 10.0.0.2
- ${resp} RequestsLibrary.Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/routes
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
- Sleep 30
- # This works locally but NOT in OpenDaylight
- #Check flow in flow stats
- # [Documentation] Show flow stats and validate result
- # [Tags] apps
- # ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- # Should Be Equal As Strings ${resp.status_code} 200
- # Log ${resp.content}
- # Should Contain X Times ${resp.content} 10.0.0.2 3
-
-Remove a static route
- [Documentation] Remove a static route, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
- ... 10.0.0.2
- ${resp} RequestsLibrary.Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name}
- Should Be Equal As Strings ${resp.status_code} 204
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/routes
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Not Contain Value ${content} ${body}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Subnet Gateway
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${name} test
-${key} subnetConfig
-${REST_CONTEXT} /controller/nb/v2/subnetservice
-${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
-
-*** Test Cases ***
-List Subnets
- [Documentation] List subnets and verify default is there
- [Tags] apps
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/subnets
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${subnet} Get From Dictionary ${result} ${key}
- ${content} Get From List ${subnet} 0
- Dictionary Should Contain Value ${content} 0.0.0.0/0
-
-Ping h1 to h4
- [Documentation] Ping h1 to h4, verify no packet loss
- [Tags] apps
- Write h1 ping -w 6 h4
- Sleep 6
- Write h4 ping -w 6 h1
- Sleep 6
- ${result} Read
- Should Contain ${result} 64 bytes
-
-List hosts
- [Documentation] List hosts and verify h1 and h4
- [Tags] apps
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT_HT}/${CONTAINER}/hosts/active
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.0.1
- Should Contain ${resp.content} 10.0.0.4
-
-Add a subnet
- [Documentation] Add a subnet, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} subnet 11.0.0.254/8
- ${resp} RequestsLibrary.Put session ${REST_CONTEXT}/${CONTAINER}/subnet/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/subnets
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
-
-Remove a subnet
- [Documentation] Remove a subnet, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} subnet 11.0.0.254/8
- ${resp} RequestsLibrary.Delete session ${REST_CONTEXT}/${CONTAINER}/subnet/${name}
- Should Be Equal As Strings ${resp.status_code} 204
- ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/subnets
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Not Contain Value ${content} ${body}
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL Applications
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-Resource ../../../libraries/Utils.txt
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2
-
-** Keywords ***
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Host Tracker
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${name} 10.0.1.4
-${key} hostConfig
-${REST_CONTEXT} /controller/nb/v2/hosttracker
-${REST_CONTEXT_ST} /controller/nb/v2/statistics
-${FLOW} "10.0.1.4"
-
-*** Test Cases ***
-Add a host
- [Documentation] Add a host, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress
- ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
- ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/address/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/active
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
-Check flow in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] apps
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Contain X Times ${resp.content} ${FLOW} 3
-Remove a host
- [Documentation] Remove a host, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
- ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress
- ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
- ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/address/${name}
- Should Be Equal As Strings ${resp.status_code} 204
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Not Contain Value ${content} ${body}
-Check flow is not in flow stats
- [Documentation] Show flow stats and validate result
- [Tags] apps
- Sleep 30
- ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
- Should Be Equal As Strings ${resp.status_code} 200
- Log ${resp.content}
- Should Not Contain ${resp.content} ${FLOW}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Static Route
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${name} test_route1
-${key} staticRoute
-${REST_CONTEXT} /controller/nb/v2/staticroute
-${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
-
-*** Test Cases ***
-Add a static route
- [Documentation] Add a static route, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
- ... 10.0.0.2
- ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
- Sleep 30
-# This works locally but NOT in OpenDaylight
-#Check flow in flow stats
-# [Documentation] Show flow stats and validate result
-# [Tags] apps
-# ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
-# Should Be Equal As Strings ${resp.status_code} 200
-# Log ${resp.content}
-# Should Contain X Times ${resp.content} 10.0.0.2 3
-Remove a static route
- [Documentation] Remove a static route, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
- ... 10.0.0.2
- ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name}
- Should Be Equal As Strings ${resp.status_code} 204
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Not Contain Value ${content} ${body}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Subnet Gateway
-Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library SSHLibrary
-Library Collections
-Library ../../../libraries/RequestsLibrary.py
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-
-*** Variables ***
-${name} test
-${key} subnetConfig
-${REST_CONTEXT} /controller/nb/v2/subnetservice
-${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
-
-*** Test Cases ***
-List Subnets
- [Documentation] List subnets and verify default is there
- [Tags] apps
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/subnets
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${subnet} Get From Dictionary ${result} ${key}
- ${content} Get From List ${subnet} 0
- Dictionary Should Contain Value ${content} 0.0.0.0/0
-Ping h1 to h4
- [Documentation] Ping h1 to h4, verify no packet loss
- [Tags] apps
- Write h1 ping -w 6 h4
- Sleep 6
- Write h4 ping -w 6 h1
- Sleep 6
- ${result} Read
- Should Contain ${result} 64 bytes
-List hosts
- [Documentation] List hosts and verify h1 and h4
- [Tags] apps
- ${resp} Get session ${REST_CONTEXT_HT}/${CONTAINER}/hosts/active
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} 10.0.0.1
- Should Contain ${resp.content} 10.0.0.4
-Add a subnet
- [Documentation] Add a subnet, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} subnet 11.0.0.254/8
- ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/subnet/${name} data=${body}
- Should Be Equal As Strings ${resp.status_code} 201
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/subnets
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Contain Value ${content} ${body}
-Remove a subnet
- [Documentation] Remove a subnet, list to validate the result.
- [Tags] apps
- ${body} Create Dictionary name ${name} subnet 11.0.0.254/8
- ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/subnet/${name}
- Should Be Equal As Strings ${resp.status_code} 204
- ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/subnets
- Should Be Equal As Strings ${resp.status_code} 200
- ${result} To JSON ${resp.content}
- ${content} Get From Dictionary ${result} ${key}
- List Should Not Contain Value ${content} ${body}
-
+++ /dev/null
-*** Settings ***
-Documentation Test suite for AD-SAL Applications mininet OF13
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
-Resource ../../../libraries/Utils.txt
-
-
-*** Variables ***
-${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo tree,2 --switch ovsk,protocols=OpenFlow13
-
-** Keywords ***