Log ${output}
[Return] ${output}
+Check For Elements On Karaf Command Output Message
+ [Arguments] ${cmd} ${elements} ${controller}=${ODL_SYSTEM_IP} ${karaf_port}=${KARAF_SHELL_PORT} ${timeout}=5
+ [Documentation] Will execute the command using Issue Command On Karaf Console then check for the given elements
+ ... in the command output message
+ ${output} Issue Command On Karaf Console ${cmd} ${controller} ${karaf_port} ${timeout}
+ : FOR ${i} IN @{elements}
+ \ Should Contain ${output} ${i}
+
Verify Bundle Is Installed
[Arguments] ${bundle_name} ${controller}=${ODL_SYSTEM_IP} ${karaf_port}=${KARAF_SHELL_PORT}
[Documentation] Will succeed if the given ${bundle name} is present in the output of "bundle:list -s "
--- /dev/null
+*** Settings ***
+Documentation Unimgr keywords defination that will be used in Unimgr suite.
+Library OperatingSystem
+Library SSHLibrary
+Library String
+Resource ../../../libraries/OVSDB.robot
+Resource ../../../libraries/Utils.robot
+Variables ../../../variables/Variables.py
+
+*** Variables ***
+${Bridge_Name} ovsbr0
+${UniMgr_Variables_DIR} ../variables/unimgr
+
+*** Keywords ***
+Setup Unimgr Test Environment
+ [Documentation] Establish the Opendayligh session and prepair the Mininet VMs
+ Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+ Prepair Unimgr Test Environment ${TOOLS_SYSTEM_IP}
+ Prepair Unimgr Test Environment ${TOOLS_SYSTEM_2_IP}
+
+Prepair Unimgr Test Environment
+ [Arguments] ${Mininet_IP}
+ [Documentation] delete the ovs bridge and manager then set the manager to a passive mode ptcp:6640.
+ Run Command On Remote System ${Mininet_IP} sudo ovs-vsctl del-manager
+ Run Command On Remote System ${Mininet_IP} sudo ovs-vsctl del-br ${Bridge_Name}
+ Run Command On Remote System ${Mininet_IP} sudo ovs-vsctl set-manager ptcp:${OVSDBPORT}
+ ${stdout}= Run Command On Remote System ${Mininet_IP} sudo ovs-vsctl show
+ Should Contain ${stdout} "ptcp:${OVSDBPORT}"
+
+Get Add Uni Json
+ [Arguments] ${IP-Address} ${MAC-Address}
+ [Documentation] read the add_uni.json file and replace the IPaddress and MACaddress with the give arguments.
+ ${json} OperatingSystem.Get File ${UniMgr_Variables_DIR}/add_uni.json
+ ${temp} Replace String ${json} {mac-address} ${MAC-Address}
+ ${uniJson} Replace String ${temp} {uni-ip} ${IP-Address}
+ [Return] ${uniJson}
+
+Get Add Evc Json
+ [Arguments] ${UNI1-IP} ${UNI2-IP}
+ [Documentation] read the add_evc.json file and replace the IP-address with the give arguments.
+ ${Json} OperatingSystem.Get File ${UniMgr_Variables_DIR}/add_evc.json
+ ${temp} Replace String ${Json} {uni1-ip} ${UNI1-IP}
+ ${evcJson} Replace String ${temp} {uni2-ip} ${UNI2-IP}
+ [Return] ${evcJson}
\ No newline at end of file
--- /dev/null
+*** Settings ***
+Documentation Test suite for all Uni Manager operations
+Suite Setup Setup Unimgr Test Environment
+Suite Teardown Delete All Sessions
+Library OperatingSystem
+Library String
+Library Collections
+Library SSHLibrary
+Library RequestsLibrary
+Library ../../../libraries/Common.py
+Variables ../../../variables/Variables.py
+Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/UnimgrKeywords.robot
+
+*** Variables ***
+${DEFAULT_LINUX_PROMPT}
+${Mininet1_IP} ${TOOLS_SYSTEM_IP}
+${Mininet2_IP} ${TOOLS_SYSTEM_2_IP}
+${UNI1_MAC} 68:5b:35:bb:f8:3e
+${UNI2_MAC} 52:7b:25:cb:a7:3c
+${Evc_topo_API} topology/unimgr:evc/link/evc:%2F%2F1
+${Uni_topo_API} topology/unimgr:uni/node/uni:%2F%2F
+${UniMgr_variables_DIR} ${CURDIR}/../../../variables/unimgr
+
+
+*** Test Cases ***
+Create source and destination UNIs at the OVS instances using Restconf API
+ [Documentation] Create source and destination UNIs
+ [Tags] UniMgr UNIs Create
+ ${uniSource} Get Add Uni Json ${Mininet1_IP} ${UNI1_MAC}
+ ${uniDest} Get Add Uni Json ${Mininet2_IP} ${UNI2_MAC}
+ ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP} data=${uniSource}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP} data=${uniDest}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${elements} Create List ${Mininet1_IP} ${Mininet2_IP}
+ Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}
+
+
+Update UNI Speed
+ [Documentation] Update the Unis source and destenation speed
+ [Tags] UniMgr UNIs Speed
+ ${speedJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/uni_speed.json
+ ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP}/cl-unimgr-mef:speed data=${speedJson}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP}/cl-unimgr-mef:speed data=${speedJson}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${elements} Create List speed-10G
+ Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}
+
+
+Create EVC tunnel between the Unis
+ [Documentation] Create EVC between Unis
+ [Tags] UniMgr EVC Create
+ ${evc} Get Add Evc Json ${Mininet1_IP} ${Mininet2_IP}
+ ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API} data=${evc}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${elements} Create List evc://1
+ Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:evc/ ${elements}
+
+Update EVC Ingress and Egress Speed
+ [Documentation] Update the EVC connection Ingress and Egress Speed
+ [Tags] UniMgr EVC Speed
+ ${ingressJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/evc_ingress_speed.json
+ ${egressJson} OperatingSystem.Get File ${UniMgr_variables_DIR}/evc_egress_speed.json
+ ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API}/cl-unimgr-mef:ingress-bw data=${ingressJson}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/${Evc_topo_API}/cl-unimgr-mef:egress-bw data=${egressJson}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${elements} Create List speed-1G
+ Wait Until Keyword Succeeds 16s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:evc/ ${elements}
+
+
+Delete EVC tunnel between the Unis
+ [Documentation] Delete EVC
+ [Tags] UniMgr EVC Delete
+ ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Evc_topo_API}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${elements} Create List evc://1
+ Wait Until Keyword Succeeds 16s 2s Check For Elements Not At URI ${CONFIG_TOPO_API}/topology/unimgr:evc/ ${elements}
+
+Delete UNIs source and destination
+ [Documentation] Delete both UNIs source and destination
+ [Tags] UniMgr UNI Delete
+ ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet1_IP}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/${Uni_topo_API}${Mininet2_IP}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${elements} Create List ${Mininet1_IP} ${Mininet2_IP}
+ Wait Until Keyword Succeeds 16s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/unimgr:uni/ ${elements}
--- /dev/null
+*** Settings ***
+Documentation Test suite for all Uni Manager operations
+Suite Setup Setup Unimgr Test Environment
+Suite Teardown Delete All Sessions
+Library OperatingSystem
+Library String
+Library Collections
+Library SSHLibrary
+Library RequestsLibrary
+Library ../../../libraries/Common.py
+Variables ../../../variables/Variables.py
+Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/KarafKeywords.robot
+Resource ../../../libraries/UnimgrKeywords.robot
+
+*** Variables ***
+${DEFAULT_LINUX_PROMPT}
+${Mininet1_IP} ${TOOLS_SYSTEM_IP}
+${Mininet2_IP} ${TOOLS_SYSTEM_2_IP}
+${UNI1_MAC} 68:5b:35:bb:f8:3e
+${UNI2_MAC} 52:7b:25:cb:a7:3c
+
+*** Test Cases ***
+Create source and destination UNIs at the OVS instances using Restconf API
+ [Documentation] Create source and destination UNIs
+ [Tags] UniMgr UNIs Create
+ ${elements} Create List ${Mininet1_IP}
+ Check For Elements On Karaf Command Output Message uni-add -ip ${Mininet1_IP} -ma ${UNI1_MAC} ${elements}
+ ${elements} Create List ${Mininet2_IP}
+ Check For Elements On Karaf Command Output Message uni-add -ip ${Mininet2_IP} -ma ${UNI2_MAC} ${elements}
+
+List All UNIs
+ [Documentation] List all existing UNIs in the config data store
+ [Tags] UniMgr
+ ${elements} Create List ${Mininet1_IP} ${Mininet2_IP}
+ Check For Elements On Karaf Command Output Message uni-list -c ${elements}
+
+Show UNI
+ [Documentation] Show the information of the created Unis from the operational data store
+ [Tags] UniMgr
+ ${elements} Create List ${Mininet1_IP}
+ Wait Until Keyword Succeeds 16s 2s Check For Elements On Karaf Command Output Message uni-show ${Mininet1_IP} ${elements}
+
+Update the Unis Speed
+ [Documentation] Update Created Unis speed
+ [Tags] UniMgr
+ ${elements} Create List ${Mininet1_IP} updated
+ Check For Elements On Karaf Command Output Message uni-update -ip ${Mininet1_IP} -ma ${UNI1_MAC} -s 10G ${elements}
+ ${element} Create List Speed10G
+ Wait Until Keyword Succeeds 16s 2s Check For Elements On Karaf Command Output Message uni-show ${Mininet1_IP} ${element}
+
+Delete UNIs source and destination
+ [Documentation] Delete both UNIs source and destination.
+ [Tags] UniMgr UNI Delete
+ ${elements} Create List Uni successfully removed
+ Check For Elements On Karaf Command Output Message uni-remove ${Mininet1_IP} ${elements}
+ Check For Elements On Karaf Command Output Message uni-remove ${Mininet2_IP} ${elements}
+ ${elements} Create List No uni found
+ Wait Until Keyword Succeeds 16s 2s Check For Elements On Karaf Command Output Message uni-show ${Mininet1_IP} ${elements}
+ Wait Until Keyword Succeeds 16s 2s Check For Elements On Karaf Command Output Message uni-show ${Mininet2_IP} ${elements}
\ No newline at end of file
--- /dev/null
+# Place the suites in run order:
+integration/test/csit/suites/unimgr/basic
+integration/test/csit/suites/unimgr/uni_operations
\ No newline at end of file
+++ /dev/null
-# Place the suites in run order:
-integration/test/csit/suites/unimgr/basic
\ No newline at end of file
--- /dev/null
+{
+ "link": [
+ {
+ "link-id": "evc://1",
+ "source": {
+ "source-node": "/network-topology/topology/node/uni://{uni1-ip}"
+ },
+ "destination": {
+ "dest-node": "/network-topology/topology/node/uni://{uni2-ip}"
+ },
+ "cl-unimgr-mef:uni-source": [
+ {
+ "order": "0",
+ "ip-address": "{uni1-ip}"
+ }
+ ],
+ "cl-unimgr-mef:uni-dest": [
+ {
+ "order": "0",
+ "ip-address": "{uni2-ip}"
+ }
+ ],
+ "cl-unimgr-mef:cos-id": "string",
+ "cl-unimgr-mef:ingress-bw": {
+ "speed-10G": {}
+ },
+ "cl-unimgr-mef:egress-bw": {
+ "speed-10G": {}
+ }
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+{
+ "network-topology:node": [
+ {
+ "node-id": "uni://{uni-ip}",
+ "speed": {
+ "speed-1G": 1
+ },
+ "uni:mac-layer": "IEEE 802.3-2005",
+ "uni:physical-medium": "UNI TypeFull Duplex 2 Physical Interface",
+ "uni:mtu-size": 0,
+ "uni:type": "",
+ "uni:mac-address": "{mac-address}",
+ "uni:ip-address": "{uni-ip}",
+ "uni:mode": "Full Duplex"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+{
+ "egress-bw": {
+ "speed-1G": {}
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "ingress-bw": {
+ "speed-1G": {}
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "speed": {
+ "speed-10G": {}
+ }
+}
\ No newline at end of file