From: Sangwook Ha Date: Tue, 28 Sep 2021 01:50:12 +0000 (-0700) Subject: Replace Bierman02 with RFC8040 for OpenFlow Plugin X-Git-Tag: pre-potassium~85 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=a24488972a386c12e4c49ec883ef60974a019ed3 Replace Bierman02 with RFC8040 for OpenFlow Plugin Create new variables for RFC8040 topology & inventory API URLs for OpenFlow Plugin test suites and replace RESTCONF APIs based on Bierman02 with the ones for RFC8040. Some of the common libraries in 'csit/libraries' used by OpenFlow Plugin test suites are also updated. This requires additional changes in other test suites using the updated libraries. HEADERS_YANG_JSON variable is temporarily changed from 'application/yang.data+json' to 'application/json' to make it compatible for both Bierman02 & RFC8040 - the former is not accepted by RFC8040 URLs. Add a step to break out of request loop in ScaleClient.py if there are many request timeout exceptions (more than 10) and a step to check if there is RuntimeException in the controller log after checking NPE in WorflowsOpenFlow.robot and WorflowsL2switch.robot - using RFC8040 triggered RuntimeException because of the circuit breaker timeout issue (CONTROLLER-2026) making overall test fail to complete (or take too long). Signed-off-by: Sangwook Ha Signed-off-by: Sandhiya Selvaraj Change-Id: I25625598e5eb7aedac7d5a0b536af8ac26a9ebf7 --- diff --git a/csit/libraries/BulkomaticKeywords.robot b/csit/libraries/BulkomaticKeywords.robot index 8bb8864473..6b37c65d4d 100644 --- a/csit/libraries/BulkomaticKeywords.robot +++ b/csit/libraries/BulkomaticKeywords.robot @@ -6,9 +6,9 @@ Resource Utils.robot Variables ../variables/Variables.py *** Variables *** -${ADD_BULK_CONFIG_NODES_API} /restconf/operations/sal-bulk-flow:flow-test -${GET_BULK_CONFIG_NODES_API} /restconf/operations/sal-bulk-flow:read-flow-test -${ADD_TABLE_NODEs_API} /restconf/operations/sal-bulk-flow:table-test +${ADD_BULK_CONFIG_NODES_API} /rests/operations/sal-bulk-flow:flow-test +${GET_BULK_CONFIG_NODES_API} /rests/operations/sal-bulk-flow:read-flow-test +${ADD_TABLE_NODEs_API} /rests/operations/sal-bulk-flow:table-test ${jolokia_write_op_status} /jolokia/read/org.opendaylight.openflowplugin.applications.bulk.o.matic:type=FlowCounter/WriteOpStatus ${jolokia_read_op_status} /jolokia/read/org.opendaylight.openflowplugin.applications.bulk.o.matic:type=FlowCounter/ReadOpStatus ${jolokia_flow_count_status} /jolokia/read/org.opendaylight.openflowplugin.applications.bulk.o.matic:type=FlowCounter/FlowCount diff --git a/csit/libraries/ClusterManagement.robot b/csit/libraries/ClusterManagement.robot index 7a9d2a82a0..77da92ab61 100644 --- a/csit/libraries/ClusterManagement.robot +++ b/csit/libraries/ClusterManagement.robot @@ -41,7 +41,6 @@ Resource ${CURDIR}/Utils.robot # for Run_Command_On_Controller Resource ../variables/Variables.robot *** Variables *** -${ENTITY_OWNER_URI} restconf/operational/entity-owners:entity-owners ${RESTCONF_URI} rests ${GC_LOG_PATH} ${KARAF_HOME}/data/log ${JAVA_HOME} ${EMPTY} # releng/builder scripts should provide correct value @@ -675,6 +674,15 @@ Put_As_Json_And_Check_Member_List_Or_All Wait Until Keyword Succeeds 5s 1s Check_Json_Member_List_Or_All uri=${uri} expected_data=${data} member_index_list=${member_index_list} [Return] ${response_text} +Put_As_Json_And_Check_Member_List_Or_All_RFC8040 + # FIXME: merge this keyword with Bierman02 version above when OVSDB test is migrated to RFC8040 + [Arguments] ${uri} ${data} ${member_index} ${member_index_list}=${EMPTY} + [Documentation] Send a PUT with the supplied uri ${uri} and body ${data} to member ${member_index}. + ... Then check data is replicated in all or some members defined in ${member_index_list}. + ${response_text} = Put_As_Json_To_Member uri=${uri} data=${data} member_index=${member_index} + Wait Until Keyword Succeeds 5s 1s Check_Json_Member_List_Or_All uri=${uri}?content=config expected_data=${data} member_index_list=${member_index_list} + [Return] ${response_text} + Put_As_Json_To_Member [Arguments] ${uri} ${data} ${member_index} [Documentation] Send a PUT with the supplied uri and data to member ${member_index}. diff --git a/csit/libraries/ClusterOpenFlow.robot b/csit/libraries/ClusterOpenFlow.robot index ac214ecefa..38c034494a 100644 --- a/csit/libraries/ClusterOpenFlow.robot +++ b/csit/libraries/ClusterOpenFlow.robot @@ -8,13 +8,14 @@ Resource CompareStream.robot Resource MininetKeywords.robot Resource Utils.robot Variables ../variables/Variables.py +Resource ../variables/openflowplugin/Variables.robot *** Variables *** @{SHARD_OPER_LIST} inventory topology default entity-ownership @{SHARD_CONF_LIST} inventory topology default -${config_table_0} ${CONFIG_NODES_API}/node/openflow:1/table/0 -${operational_table_0} ${OPERATIONAL_NODES_API}/node/openflow:1/table/0 -${operational_port_1} ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 +${config_table_0} ${RFC8040_NODES_API}/node=openflow%3A1/table=0 +${operational_table_0} ${RFC8040_NODES_API}/node=openflow%3A1/table=0?${RFC8040_OPERATIONAL_CONTENT} +${operational_port_1} ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} *** Keywords *** Get InventoryConfig Shard Status @@ -57,7 +58,7 @@ Check OpenFlow Network Operational Information For Sample Topology ... Inventory should show 1x node_id per device 1x node_id per connector. Topology should show 2x node_id per device + 3x node_id per connector ... + 5x node_id per link termination. TODO: A Keyword that can calculate this based on mininet topology. ${dictionary} Create Dictionary openflow:1=4 openflow:2=5 openflow:3=5 - Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${OPERATIONAL_NODES_API} dictionary=${dictionary} member_index_list=${controller_index_list} + Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${RFC8040_OPERATIONAL_NODES_API} dictionary=${dictionary} member_index_list=${controller_index_list} ${dictionary} Create Dictionary openflow:1=21 openflow:2=19 openflow:3=19 Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${OPERATIONAL_TOPO_API} dictionary=${dictionary} member_index_list=${controller_index_list} @@ -65,11 +66,11 @@ Check No OpenFlow Network Operational Information [Arguments] ${controller_index_list}=${EMPTY} [Documentation] Check device is not in operational inventory or topology in all cluster instances in ${controller_index_list}. ${dictionary} Create Dictionary openflow=0 - CompareStream.Run_Keyword_If_At_Least_Neon Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_No_Content_Member_List_Or_All uri=${OPERATIONAL_NODES_API} member_index_list=${controller_index_list} - CompareStream.Run_Keyword_If_At_Most_Fluorine Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${OPERATIONAL_NODES_API} dictionary=${dictionary} + CompareStream.Run_Keyword_If_At_Least_Neon Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_No_Content_Member_List_Or_All uri=${RFC8040_OPERATIONAL_NODES_API} member_index_list=${controller_index_list} + CompareStream.Run_Keyword_If_At_Most_Fluorine Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${RFC8040_OPERATIONAL_NODES_API} dictionary=${dictionary} ... member_index_list=${controller_index_list} ${dictionary} Create Dictionary openflow=0 - Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${OPERATIONAL_TOPO_API} dictionary=${dictionary} member_index_list=${controller_index_list} + Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${RFC8040_OPERATIONAL_TOPO_API} dictionary=${dictionary} member_index_list=${controller_index_list} Add Sample Flow And Verify [Arguments] ${controller_index} ${controller_index_list}=${EMPTY} @@ -79,7 +80,7 @@ Add Sample Flow And Verify # replicating some of the matches in the flows section. Same comment applies for further keywords. Run Keyword If '${ODL_OF_PLUGIN}' == 'helium' Set Test Variable &{dictionary} 10.0.1.0/24=2 "output-node-connector":"1"=1 Run Keyword If '${ODL_OF_PLUGIN}' == 'lithium' Set Test Variable &{dictionary} 10.0.1.0/24=1 "output-node-connector":"1"=1 - ClusterManagement.Put_As_Json_And_Check_Member_List_Or_All ${config_table_0}/flow/1 ${body} ${controller_index} ${controller_index_list} + ClusterManagement.Put_As_Json_And_Check_Member_List_Or_All_RFC8040 ${config_table_0}/flow=1 ${body} ${controller_index} ${controller_index_list} Wait Until Keyword Succeeds 15s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${operational_table_0} dictionary=${dictionary} member_index_list=${controller_index_list} Verify Sample Flow @@ -97,14 +98,14 @@ Modify Sample Flow And Verify ${body}= OperatingSystem.Get File ${CURDIR}/../variables/openflowplugin/sample_flow_2.json Run Keyword If '${ODL_OF_PLUGIN}' == 'helium' Set Test Variable &{dictionary} 10.0.1.0/24=2 "output-node-connector":"2"=1 Run Keyword If '${ODL_OF_PLUGIN}' == 'lithium' Set Test Variable &{dictionary} 10.0.1.0/24=1 "output-node-connector":"2"=1 - ClusterManagement.Put_As_Json_And_Check_Member_List_Or_All ${config_table_0}/flow/1 ${body} ${controller_index} ${controller_index_list} + ClusterManagement.Put_As_Json_And_Check_Member_List_Or_All_RFC8040 ${config_table_0}/flow=1 ${body} ${controller_index} ${controller_index_list} Wait Until Keyword Succeeds 15s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${operational_table_0} dictionary=${dictionary} member_index_list=${controller_index_list} Delete Sample Flow And Verify [Arguments] ${controller_index} ${controller_index_list}=${EMPTY} [Documentation] Delete sample flow in Owner and verify it gets removed from all instances. ${dictionary}= Create Dictionary 10.0.1.0/24=0 - ClusterManagement.Delete_And_Check_Member_List_Or_All ${config_table_0}/flow/1 ${controller_index} ${controller_index_list} + ClusterManagement.Delete_And_Check_Member_List_Or_All ${config_table_0}/flow=1 ${controller_index} ${controller_index_list} Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${operational_table_0} dictionary=${dictionary} member_index_list=${controller_index_list} Send RPC Add Sample Flow And Verify @@ -113,7 +114,7 @@ Send RPC Add Sample Flow And Verify ${body}= OperatingSystem.Get File ${CURDIR}/../variables/openflowplugin/add_flow_rpc.json Run Keyword If '${ODL_OF_PLUGIN}' == 'helium' Set Test Variable &{dictionary} 10.0.1.0/24=2 Run Keyword If '${ODL_OF_PLUGIN}' == 'lithium' Set Test Variable &{dictionary} 10.0.1.0/24=1 - ClusterManagement.Post_As_Json_To_Member uri=/restconf/operations/sal-flow:add-flow data=${body} member_index=${controller_index} + ClusterManagement.Post_As_Json_To_Member uri=/rests/operations/sal-flow:add-flow data=${body} member_index=${controller_index} Wait Until Keyword Succeeds 15s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${operational_table_0} dictionary=${dictionary} member_index_list=${controller_index_list} Send RPC Delete Sample Flow And Verify @@ -121,7 +122,7 @@ Send RPC Delete Sample Flow And Verify [Documentation] Delete sample flow in ${controller_index} and verify it gets removed from all instances in ${controller_index_list}. ${body}= OperatingSystem.Get File ${CURDIR}/../variables/openflowplugin/delete_flow_rpc.json ${dictionary}= Create Dictionary 10.0.1.0/24=0 - ClusterManagement.Post_As_Json_To_Member uri=/restconf/operations/sal-flow:remove-flow data=${body} member_index=${controller_index} + ClusterManagement.Post_As_Json_To_Member uri=/rests/operations/sal-flow:remove-flow data=${body} member_index=${controller_index} Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${operational_table_0} dictionary=${dictionary} member_index_list=${controller_index_list} Take OpenFlow Device Link Down and Verify @@ -158,7 +159,7 @@ Check Linear Topology On Member [Arguments] ${switches} ${member_index}=1 [Documentation] Check Linear topology. ${session} = Resolve_Http_Session_For_Member member_index=${member_index} - ${resp} RequestsLibrary.Get Request ${session} ${OPERATIONAL_TOPO_API} + ${resp} RequestsLibrary.Get Request ${session} ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 FOR ${switch} IN RANGE 1 ${switches+1} @@ -177,7 +178,7 @@ Check No Switches On Member [Arguments] ${switches} ${member_index}=1 [Documentation] Check no switch is in topology ${session} = Resolve_Http_Session_For_Member member_index=${member_index} - ${resp} RequestsLibrary.Get Request ${session} ${OPERATIONAL_TOPO_API} + ${resp} RequestsLibrary.Get Request ${session} ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 FOR ${switch} IN RANGE 1 ${switches+1} @@ -188,7 +189,7 @@ Check Number Of Flows On Member [Arguments] ${flows} ${member_index}=1 [Documentation] Check number of flows in the inventory. ${session} = Resolve_Http_Session_For_Member member_index=${member_index} - ${resp}= RequestsLibrary.Get Request ${session} ${OPERATIONAL_NODES_API} + ${resp}= RequestsLibrary.Get Request ${session} ${RFC8040_OPERATIONAL_NODES_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${count}= Get Count ${resp.text} "priority" @@ -198,7 +199,7 @@ Check Number Of Groups On Member [Arguments] ${groups} ${member_index}=1 [Documentation] Check number of groups in the inventory. ${session} = Resolve_Http_Session_For_Member member_index=${member_index} - ${resp}= RequestsLibrary.Get Request ${session} ${OPERATIONAL_NODES_API} + ${resp}= RequestsLibrary.Get Request ${session} ${RFC8040_OPERATIONAL_NODES_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${group_count}= Get Count ${resp.text} "group-type" diff --git a/csit/libraries/DIDMKeywords.robot b/csit/libraries/DIDMKeywords.robot index 881d9d0b42..a42e047ccc 100644 --- a/csit/libraries/DIDMKeywords.robot +++ b/csit/libraries/DIDMKeywords.robot @@ -5,11 +5,12 @@ Library Collections Library RequestsLibrary Variables ../variables/Variables.py Resource ./Utils.robot +Resource ../variables/openflowplugin/Variables.robot *** Keywords *** Check DIDM Registered With Device [Documentation] Check for DIDM registered with the device - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API} Should Be Equal As Strings ${resp.status_code} 200 Log ${resp.text} Should Contain ${resp.text} didm diff --git a/csit/libraries/DataModels.robot b/csit/libraries/DataModels.robot index 871b8137ed..f9df0cfa6e 100644 --- a/csit/libraries/DataModels.robot +++ b/csit/libraries/DataModels.robot @@ -9,7 +9,7 @@ Resource ../variables/netvirt/Variables.robot *** Keywords *** Get Model Dump - [Arguments] ${controller_ip} ${data_models}=@{internal_data_models} + [Arguments] ${controller_ip} ${data_models}=@{internal_data_models} ${restconf_root}=restconf [Documentation] Will output a list of mdsal models using ${data_models} list # while feature request in bug 7892 is not done, we will quickly timeout and not retry the model dump get # request. This is because when it's done in a failed cluster state, it could take 20s for the reesponse to @@ -18,7 +18,7 @@ Get Model Dump # pass a timeout to restconf Create Session model_dump_session http://${controller_ip}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} timeout=1 max_retries=0 FOR ${model} IN @{data_models} - ${resp}= RequestsLibrary.Get Request model_dump_session restconf/${model} + ${resp}= RequestsLibrary.Get Request model_dump_session ${restconf_root}/${model} ${pretty_output}= To Json ${resp.text} pretty_print=True Log ${pretty_output} END diff --git a/csit/libraries/FlowLib.robot b/csit/libraries/FlowLib.robot index b7b832dc9b..819f99db6f 100644 --- a/csit/libraries/FlowLib.robot +++ b/csit/libraries/FlowLib.robot @@ -11,12 +11,13 @@ Library FlowLib.py Library XmlComparator.py Library Common.py Variables ../variables/Variables.py +Resource ../variables/openflowplugin/Variables.robot *** Keywords *** Check No Switches In Inventory [Arguments] ${switches} [Documentation] Check no switch is in inventory - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API} Log ${resp.text} FOR ${switch} IN RANGE 1 ${switches+1} Should Not Contain ${resp.text} "openflow:${switch}" @@ -25,7 +26,7 @@ Check No Switches In Inventory Check No Switches In Topology [Arguments] ${switches} [Documentation] Check no switch is in topology - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 FOR ${switch} IN RANGE 1 ${switches+1} @@ -36,7 +37,7 @@ Check Switches In Inventory [Arguments] ${switches} [Documentation] Check all switches and stats in operational inventory FOR ${switch} IN RANGE 1 ${switches+1} - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/openflow:${switch} + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${switch} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} flow-capable-node-connector-statistics @@ -46,7 +47,7 @@ Check Switches In Inventory Check Switches In Topology [Arguments] ${switches} [Documentation] Check switches are in the topology. - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${count}= Get Count ${resp.text} "node-id":"openflow: @@ -55,7 +56,7 @@ Check Switches In Topology Check Number Of Links [Arguments] ${links} [Documentation] Check number of links in the topolgy. - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${count}= Get Count ${resp.text} "link-id":"openflow: @@ -64,7 +65,7 @@ Check Number Of Links Check Linear Topology [Arguments] ${switches} [Documentation] Check Linear topology. - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 FOR ${switch} IN RANGE 1 ${switches+1} @@ -88,7 +89,7 @@ Check Flows Operational Datastore Check Number Of Flows [Arguments] ${flows} [Documentation] Check number of flows in the inventory. - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${count}= Get Count ${resp.text} "priority" @@ -97,7 +98,7 @@ Check Number Of Flows Check Number Of Groups [Arguments] ${groups} [Documentation] Check number of groups in the inventory. - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${group_count}= Get Count ${resp.text} "group-type" @@ -105,8 +106,8 @@ Check Number Of Groups Check Flow Stats Are Available [Arguments] ${node_id} ${flows} - [Documentation] A GET on the /node/${node_id} inventory API is made and flow stats string is checked for existence. - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/${node_id}/table/2 + [Documentation] A GET on the /node=${node_id} inventory API is made and flow stats string is checked for existence. + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=${node_id}/table=2 Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Should Contain X Times ${resp.text} priority ${flows} @@ -114,7 +115,7 @@ Check Flow Stats Are Available Check Number Of Hosts [Arguments] ${hosts} [Documentation] Check number of hosts in topology - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${count}= Get Count ${resp.text} "node-id":"host: @@ -122,7 +123,7 @@ Check Number Of Hosts Check No Hosts [Documentation] Check if all hosts are deleted from inventory - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Should Be Equal As Strings ${resp.status_code} 200 Should Not Contain ${resp.text} "node-id":"host: @@ -132,7 +133,7 @@ Add Table Miss Flows ${switches}= Convert To Integer ${switches} ${data}= OperatingSystem.Get File ${CURDIR}/../variables/openflowplugin/table_miss_flow.json FOR ${switch} IN RANGE 1 ${switches+1} - TemplatedRequests.Put As Json To Uri ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/default ${data} session + TemplatedRequests.Put As Json To Uri ${RFC8040_NODES_API}/node=openflow%3A${switch}/table=0/flow=default ${data} session END Check Table Miss Flows @@ -140,7 +141,7 @@ Check Table Miss Flows [Documentation] Check table miss flows in switches. ${switches}= Convert To Integer ${switches} FOR ${switch} IN RANGE 1 ${switches+1} - TemplatedRequests.Get As Json From Uri ${OPERATIONAL_NODES_API}/node/openflow:${switch}/table/0/flow/default session + TemplatedRequests.Get As Json From Uri ${RFC8040_NODES_API}/node=openflow%3A${switch}/table=0/flow=default session END Create Inventory Flow @@ -274,10 +275,10 @@ Remove Flow XML Element Add Group To Controller And Verify [Arguments] ${group_body} ${node_id} ${group_id} [Documentation] Push group through REST-API and verify in data-store - ${resp} RequestsLibrary.Put Request session ${CONFIG_NODES_API}/node/${node_id}/group/${group_id} headers=${HEADERS_XML} data=${group_body} + ${resp} RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=${node_id}/group=${group_id} headers=${HEADERS_XML} data=${group_body} Log ${resp.text} BuiltIn.Should_Match "${resp.status_code}" "20?" - ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/${node_id}/group/${group_id} headers=${ACCEPT_XML} + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=${node_id}/group=${group_id}?content=config headers=${ACCEPT_XML} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Compare Xml ${group_body} ${resp.text} @@ -285,10 +286,10 @@ Add Group To Controller And Verify Add Flow To Controller And Verify [Arguments] ${flow_body} ${node_id} ${table_id} ${flow_id} [Documentation] Push flow through REST-API and verify in data-store - ${resp} RequestsLibrary.Put Request session ${CONFIG_NODES_API}/node/${node_id}/table/${table_id}/flow/${flow_id} headers=${HEADERS_XML} data=${flow_body} + ${resp} RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=${node_id}/table=${table_id}/flow=${flow_id} headers=${HEADERS_XML} data=${flow_body} Log ${resp.text} BuiltIn.Should_Match "${resp.status_code}" "20?" - ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/${node_id}/table/${table_id}/flow/${flow_id} headers=${ACCEPT_XML} + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=${node_id}/table=${table_id}/flow=${flow_id}?content=config headers=${ACCEPT_XML} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Compare Xml ${flow_body} ${resp.text} @@ -306,10 +307,10 @@ Verify Flow On Mininet Switch Remove Group From Controller And Verify [Arguments] ${node_id} ${group_id} [Documentation] Remove group and verify - ${resp} RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/${node_id}/group/${group_id} + ${resp} RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=${node_id}/group=${group_id} Log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 200 - ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/${node_id}/group/${group_id} + Should Be Equal As Strings ${resp.status_code} 204 + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=${node_id}/group=${group_id}?content=config Builtin.Return_From_Keyword_If ${resp.status_code} == 404 or ${resp.status_code} == 409 Builtin.Log ${resp.text} Builtin.Fail The request failed with code ${resp.status_code} @@ -317,10 +318,10 @@ Remove Group From Controller And Verify Remove Flow From Controller And Verify [Arguments] ${node_id} ${table_id} ${flow_id} [Documentation] Remove flow and verify - ${resp} RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/${node_id}/table/${table_id}/flow/${flow_id} + ${resp} RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=${node_id}/table=${table_id}/flow=${flow_id} Log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 200 - ${resp} RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/${node_id}/table/${table_id}/flow/${flow_id} + Should Be Equal As Strings ${resp.status_code} 204 + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=${node_id}/table=${table_id}/flow=${flow_id}?content=config Builtin.Return_From_Keyword_If ${resp.status_code} == 404 or ${resp.status_code} == 409 Builtin.Log ${resp.text} Builtin.Fail The request failed with code ${resp.status_code} @@ -348,11 +349,11 @@ Remove Default Flows Log Flow XML is ${flow.xml} write dpctl dump-flows -O OpenFlow13 ${switchoutput} Read Until > - ${headers}= Create Dictionary Content-Type=application/yang.data+xml - ${resp} RequestsLibrary.Post Request session restconf/operations/sal-flow:remove-flow data=${flow.xml} headers=${headers} + ${headers}= Create Dictionary Content-Type=application/yang-data+xml + ${resp} RequestsLibrary.Post Request session rests/operations/sal-flow:remove-flow data=${flow.xml} headers=${headers} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API} Log ${resp.text} Should Not Contain ${resp.text} "output-node-connector": "CONTROLLER", ${strings_to_check_for}= Create List CONTROLLER @@ -390,7 +391,7 @@ Flow Presence In Config Store [Documentation] Checks the config store for given flow. Returns True if present, otherwise returns False ... This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx} ${headers}= Create Dictionary Accept=application/xml - ${resp}= RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${headers} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id}?content=config headers=${headers} Log ${resp} Log ${resp.text} Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY} @@ -403,7 +404,7 @@ Flow Presence In Operational Store [Documentation] Checks the operational store for given flow. Returns True if present, otherwise returns False ... This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx} ${headers}= Create Dictionary Accept=application/xml - ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id} headers=${headers} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id} headers=${headers} Log ${resp} Log ${resp.text} Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY} @@ -449,7 +450,7 @@ Add Flow Via RPC Set Element Attribute ${nodeelm} xmlns:inv urn:opendaylight:inventory Log Element ${req} ${strxml}= Element To String ${req} - ${resp}= RequestsLibrary.Post Request session /restconf/operations/sal-flow:add-flow data=${strxml} + ${resp}= RequestsLibrary.Post Request session /rests/operations/sal-flow:add-flow data=${strxml} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 @@ -457,10 +458,10 @@ Add Flow Via Restconf [Arguments] ${node_id} ${table_id} ${flow_body} [Documentation] Configures a flow specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using POST method Log ${flow_body} - ${resp}= RequestsLibrary.Post Request session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id} data=${flow_body} + ${resp}= RequestsLibrary.Post Request session ${RFC8040_NODES_API}/node=openflow%3A${node_id}/table=${table_id} data=${flow_body} Log ${resp.text} - ${msg}= Set Variable Adding flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id} failed, http response ${resp.status_code} received. - Should Be Equal As Strings ${resp.status_code} 204 msg=${msg} + ${msg}= Set Variable Adding flow for ${RFC8040_NODES_API}/node=openflow%3A${node_id}/table=${table_id} failed, http response ${resp.status_code} received. + Should Be Equal As Strings ${resp.status_code} 201 msg=${msg} Update Flow Via RPC [Arguments] ${node_id} ${configured_flow_body} ${updating_flow_body} @@ -485,7 +486,7 @@ Update Flow Via RPC Set Element Attribute ${nodeelm} xmlns:inv urn:opendaylight:inventory Log Element ${xml} ${strxml}= Element To String ${xml} - ${resp}= RequestsLibrary.Post Request session /restconf/operations/sal-flow:update-flow data=${strxml} + ${resp}= RequestsLibrary.Post Request session /rests/operations/sal-flow:update-flow data=${strxml} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 @@ -493,10 +494,10 @@ Update Flow Via Restconf [Arguments] ${node_id} ${table_id} ${flow_id} ${flow_body} [Documentation] Updates a flow configuration by given flow details (${node_id}, ${table_id}, ${flow_body}) using PUT method Log ${flow_body} - ${resp}= RequestsLibrary.Put Request session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} data=${flow_body} + ${resp}= RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=openflow%3A${node_id}/table=${table_id}/flow=${flow_id} data=${flow_body} Log ${resp.text} - ${msg}= Set Variable Updating flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. - Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} + ${msg}= Set Variable Updating flow for ${RFC8040_NODES_API}/node=openflow%3A${node_id}/table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. + Should Be Equal As Strings ${resp.status_code} 204 msg=${msg} Delete Flow Via RPC [Arguments] ${node_id} ${xmlroot} @@ -511,22 +512,22 @@ Delete Flow Via RPC Set Element Attribute ${nodeelm} xmlns:inv urn:opendaylight:inventory Log Element ${req} ${strxml}= Element To String ${req} - ${resp}= RequestsLibrary.Post Request session /restconf/operations/sal-flow:remove-flow data=${strxml} + ${resp}= RequestsLibrary.Post Request session /rests/operations/sal-flow:remove-flow data=${strxml} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Delete Flow Via Restconf [Arguments] ${node_id} ${table_id} ${flow_id} [Documentation] Deletes a flow from configuration datastore specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using DELETE method - ${resp}= RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} + ${resp}= RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${node_id}/table=${table_id}/flow=${flow_id} Log ${resp.text} - ${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${node_id}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. - Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} + ${msg}= Set Variable Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${node_id}/table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. + Should Be Equal As Strings ${resp.status_code} 204 msg=${msg} Get Flow Id [Arguments] ${dpnid} ${table_id} ${flow_element} [Documentation] This verifies specific flow-id for particular table-id matching from the flow element - ${resp} = RequestsLibrary.Get Request session ${CONFIG_NODES_API}/node/openflow:${dpnid}/table/${table_id} + ${resp} = RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${dpnid}/table=${table_id}?content=config BuiltIn.Log ${resp.text} @{flow_id} = String.Get Regexp Matches ${resp.text} id\":\"(\\d+${flow_element}) 1 [Return] @{flow_id}[0] diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index d2600c9951..a89820d170 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -17,6 +17,7 @@ Resource SSHKeywords.robot Resource Tcpdump.robot Resource Utils.robot Resource ../variables/Variables.robot +Resource ../variables/openflowplugin/Variables.robot Resource ../variables/netvirt/Variables.robot Variables ../variables/netvirt/Modules.py @@ -1348,7 +1349,7 @@ Verify Expected Default Tunnels Verify Expected Default Tables On Nodes [Arguments] ${node_ips}=@{OS_ALL_IPS} [Documentation] Verify if Default Table Entries are programmed on all Nodes - ${resp} = RequestsLibrary.Get Request session ${CONFIG_NODES_API} + ${resp} = RequestsLibrary.Get Request session ${RFC8040_CONFIG_NODES_API} Utils.Log Content ${resp.text} ${failed_node_list} = BuiltIn.Create List FOR ${node_ip} IN @{node_ips} diff --git a/csit/libraries/ScaleClient.py b/csit/libraries/ScaleClient.py index 612d38ae4f..bcaea64758 100644 --- a/csit/libraries/ScaleClient.py +++ b/csit/libraries/ScaleClient.py @@ -32,29 +32,27 @@ class Counter(object): _spreads = ["gauss", "linear", "first"] # possible defined spreads at the moment _default_flow_template_json = { # templease used for config datastore - u"flow": [ + "flow": [ { - u"hard-timeout": 65000, - u"idle-timeout": 65000, - u"cookie_mask": 4294967295, - u"flow-name": u"FLOW-NAME-TEMPLATE", - u"priority": 2, - u"strict": False, - u"cookie": 0, - u"table_id": 0, - u"installHw": False, - u"id": u"FLOW-ID-TEMPLATE", - u"match": { - u"ipv4-destination": u"0.0.0.0/32", - u"ethernet-match": {u"ethernet-type": {u"type": 2048}}, + "hard-timeout": 65000, + "idle-timeout": 65000, + "cookie_mask": 4294967295, + "flow-name": "FLOW-NAME-TEMPLATE", + "priority": 2, + "strict": False, + "cookie": 0, + "table_id": 0, + "installHw": False, + "id": "FLOW-ID-TEMPLATE", + "match": { + "ipv4-destination": "0.0.0.0/32", + "ethernet-match": {"ethernet-type": {"type": 2048}}, }, - u"instructions": { - u"instruction": [ + "instructions": { + "instruction": [ { - u"order": 0, - u"apply-actions": { - u"action": [{u"drop-action": {}, u"order": 0}] - }, + "order": 0, + "apply-actions": {"action": [{"drop-action": {}, "order": 0}]}, } ] }, @@ -171,8 +169,8 @@ def _prepare_add(cntl, method, flows, template=None): fl1 = flows[0] sw, tab, fl, ip = fl1 url = "http://" + cntl + ":" + "8181" - url += "/restconf/config/opendaylight-inventory:nodes/node/openflow:" + str(sw) - url += "/table/" + str(tab) + "/flow/" + str(fl) + url += "/rests/data/opendaylight-inventory:nodes/node=openflow%3A" + str(sw) + url += "/table=" + str(tab) + "/flow=" + str(fl) flow = copy.deepcopy(template["flow"][0]) flow["cookie"] = fl flow["flow-name"] = "TestFlow-%d" % fl @@ -185,7 +183,7 @@ def _prepare_add(cntl, method, flows, template=None): req = requests.Request( "PUT", url, - headers={"Content-Type": "application/json"}, + headers={"Content-Type": "application/yang-data+json"}, data=req_data, auth=("admin", "admin"), ) @@ -211,9 +209,9 @@ def _prepare_table_add(cntl, method, flows, template=None): sw, tab, fl, ip = fl1 url = "http://" + cntl + ":" + "8181" url += ( - "/restconf/config/opendaylight-inventory:nodes/node/openflow:" + "/rests/data/opendaylight-inventory:nodes/node=openflow%3A" + str(sw) - + "/table/" + + "/table=" + str(tab) ) fdets = [] @@ -231,7 +229,7 @@ def _prepare_table_add(cntl, method, flows, template=None): req = requests.Request( "POST", url, - headers={"Content-Type": "application/json"}, + headers={"Content-Type": "application/yang-data+json"}, data=req_data, auth=("admin", "admin"), ) @@ -256,12 +254,12 @@ def _prepare_delete(cntl, method, flows, template=None): fl1 = flows[0] sw, tab, fl, ip = fl1 url = "http://" + cntl + ":" + "8181" - url += "/restconf/config/opendaylight-inventory:nodes/node/openflow:" + str(sw) - url += "/table/" + str(tab) + "/flow/" + str(fl) + url += "/rests/data/opendaylight-inventory:nodes/node=openflow%3A" + str(sw) + url += "/table=" + str(tab) + "/flow=" + str(fl) req = requests.Request( "DELETE", url, - headers={"Content-Type": "application/json"}, + headers={"Content-Type": "application/yang-data+json"}, auth=("admin", "admin"), ) return req @@ -284,7 +282,7 @@ def _prepare_rpc_item(cntl, method, flows, template=None): """ f1 = flows[0] sw, tab, fl, ip = f1 - url = "http://" + cntl + ":" + "8181/restconf/operations/sal-bulk-flow:" + method + url = "http://" + cntl + ":" + "8181/rests/operations/sal-bulk-flow:" + method fdets = [] for sw, tab, fl, ip in flows: flow = copy.deepcopy(template["input"]["bulk-flow-item"][0]) @@ -300,7 +298,7 @@ def _prepare_rpc_item(cntl, method, flows, template=None): req = requests.Request( "POST", url, - headers={"Content-Type": "application/json"}, + headers={"Content-Type": "application/yang-data+json"}, data=req_data, auth=("admin", "admin"), ) @@ -326,7 +324,7 @@ def _prepare_ds_item(cntl, method, flows, template=None): """ f1 = flows[0] sw, tab, fl, ip = f1 - url = "http://" + cntl + ":" + "8181/restconf/operations/sal-bulk-flow:" + method + url = "http://" + cntl + ":" + "8181/rests/operations/sal-bulk-flow:" + method fdets = [] for sw, tab, fl, ip in flows: flow = copy.deepcopy(template["input"]["bulk-flow-item"][0]) @@ -344,7 +342,7 @@ def _prepare_ds_item(cntl, method, flows, template=None): req = requests.Request( "POST", url, - headers={"Content-Type": "application/json"}, + headers={"Content-Type": "application/yang-data+json"}, data=req_data, auth=("admin", "admin"), ) @@ -407,8 +405,17 @@ def _wt_request_sender( try: rsp = ses.send(prep, timeout=5) except requests.exceptions.Timeout: + print(f"*WARN* Timeout: {req.method} {req.url}") counter[99] += 1 + if counter[99] > 10: + print("*ERROR* Too many timeouts.") + break continue + else: + if rsp.status_code not in [200, 201, 204]: + print( + f"*WARN* Status code {rsp.status_code}: {req.method} {req.url}\n{rsp.text}" + ) counter[rsp.status_code] += 1 res = {} for i, v in enumerate(counter): @@ -686,22 +693,22 @@ def _get_operational_inventory_of_switches(controller): url = ( "http://" + controller - + ":8181/restconf/operational/opendaylight-inventory:nodes" + + ":8181/rests/data/opendaylight-inventory:nodes?content=nonconfig" ) rsp = requests.get( url, - headers={"Accept": "application/json"}, + headers={"Accept": "application/yang-data+json"}, stream=False, auth=("admin", "admin"), ) if rsp.status_code != 200: return None inv = json.loads(rsp.content) - if "nodes" not in inv: + if "opendaylight-inventory:nodes" not in inv: return None - if "node" not in inv["nodes"]: + if "node" not in inv["opendaylight-inventory:nodes"]: return [] - inv = inv["nodes"]["node"] + inv = inv["opendaylight-inventory:nodes"]["node"] switches = [sw for sw in inv if "openflow:" in sw["id"]] return switches diff --git a/csit/libraries/Utils.robot b/csit/libraries/Utils.robot index 88611e6523..1a5016b7a4 100644 --- a/csit/libraries/Utils.robot +++ b/csit/libraries/Utils.robot @@ -11,6 +11,7 @@ Library ${CURDIR}/UtilLibrary.py Resource ${CURDIR}/SSHKeywords.robot Resource ${CURDIR}/TemplatedRequests.robot Resource ${CURDIR}/../variables/Variables.robot +Resource ${CURDIR}/../variables/openflowplugin/Variables.robot *** Variables *** # TODO: Introduce ${tree_size} and use instead of 1 in the next line. @@ -85,7 +86,7 @@ Check Nodes Stats [Arguments] ${node} ${session}=session [Documentation] A GET on the /node/${node} API is made and specific flow stat ... strings are checked for existence. - ${resp} RequestsLibrary.Get Request ${session} ${OPERATIONAL_NODES_API}/node/${node} + ${resp} RequestsLibrary.Get Request ${session} ${RFC8040_NODES_API}/node=${node}?${RFC8040_OPERATIONAL_CONTENT} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} flow-capable-node-connector-statistics Should Contain ${resp.text} flow-table-statistics @@ -270,6 +271,11 @@ Verify Controller Has No Null Pointer Exceptions [Documentation] Will execute any tests to verify the controller is not having any null pointer eceptions. Check Karaf Log File Does Not Have Messages ${controller_ip} java.lang.NullPointerException +Verify Controller Has No Runtime Exceptions + [Arguments] ${controller_ip}=${ODL_SYSTEM_IP} + [Documentation] Will execute any tests to verify the controller is not having any runtime eceptions. + Check Karaf Log File Does Not Have Messages ${controller_ip} java.lang.RuntimeException + Get Epoch Time [Arguments] ${time} [Documentation] Get the Epoc time from MM/DD/YYYY HH:MM:SS diff --git a/csit/libraries/VsctlListParser.py b/csit/libraries/VsctlListParser.py index 509eed6d2c..5b7c58246c 100644 --- a/csit/libraries/VsctlListParser.py +++ b/csit/libraries/VsctlListParser.py @@ -15,7 +15,7 @@ import traceback def _parse_stdout(stdout): - """ Transforms stdout to dict """ + """Transforms stdout to dict""" text = stdout.replace(" ", "") text = text.replace("\r", "") pat = re.compile(r"(?P\w+):(?P.+)") diff --git a/csit/libraries/WorkflowsL2switch.robot b/csit/libraries/WorkflowsL2switch.robot index ef71212b4d..63b33c9296 100644 --- a/csit/libraries/WorkflowsL2switch.robot +++ b/csit/libraries/WorkflowsL2switch.robot @@ -36,6 +36,8 @@ Workflow Single Switch Multiple Hosts Return From Keyword If '${status}' == 'FAIL' ${status} Controller is dead ${host_discover_time} ${status} ${result} BuiltIn.Run Keyword And Ignore Error Utils.Verify Controller Has No Null Pointer Exceptions ${ODL_SYSTEM_IP} Return From Keyword If '${status}' == 'FAIL' ${status} Controller has NPE ${host_discover_time} + ${status} ${result} BuiltIn.Run Keyword And Ignore Error Utils.Verify Controller Has No Runtime Exceptions ${ODL_SYSTEM_IP} + Return From Keyword If '${status}' == 'FAIL' ${status} Controller has RuntimeException ${topology_discover_time} Log To Console Check number of hosts in topology is ${hosts} ${status} ${result} BuiltIn.Run Keyword And Ignore Error Wait Until Keyword Succeeds ${hosts} 2s FlowLib.Check Number Of Hosts ... ${hosts} diff --git a/csit/libraries/WorkflowsOpenFlow.robot b/csit/libraries/WorkflowsOpenFlow.robot index 6946862856..50ec659d44 100644 --- a/csit/libraries/WorkflowsOpenFlow.robot +++ b/csit/libraries/WorkflowsOpenFlow.robot @@ -11,6 +11,7 @@ Resource CompareStream.robot Resource MininetKeywords.robot Resource KarafKeywords.robot Resource ../variables/Variables.robot +Resource ../variables/openflowplugin/Variables.robot *** Variables *** ${log_level} ERROR @@ -46,6 +47,8 @@ Workflow Linear Topology Return From Keyword If '${status}' == 'FAIL' ${status} Controller is dead ${topology_discover_time} ${status} ${result} Run Keyword And Ignore Error Utils.Verify Controller Has No Null Pointer Exceptions ${ODL_SYSTEM_IP} Return From Keyword If '${status}' == 'FAIL' ${status} Controller has NPE ${topology_discover_time} + ${status} ${result} Run Keyword And Ignore Error Utils.Verify Controller Has No Runtime Exceptions ${ODL_SYSTEM_IP} + Return From Keyword If '${status}' == 'FAIL' ${status} Controller has RuntimeException ${topology_discover_time} Log To Console Checking ${switches} switches ${status} ${result} Run Keyword And Ignore Error Wait Until Keyword Succeeds ${switches*2} 2s FlowLib.Check Switches In Inventory ... ${switches} @@ -126,6 +129,8 @@ Workflow Full Mesh Topology Return From Keyword If '${status}' == 'FAIL' ${status} Controller is dead ${topology_discover_time} ${status} ${result} Run Keyword And Ignore Error Utils.Verify Controller Has No Null Pointer Exceptions ${ODL_SYSTEM_IP} Return From Keyword If '${status}' == 'FAIL' ${status} Controller has NPE ${topology_discover_time} + ${status} ${result} Run Keyword And Ignore Error Utils.Verify Controller Has No Runtime Exceptions ${ODL_SYSTEM_IP} + Return From Keyword If '${status}' == 'FAIL' ${status} Controller has RuntimeException ${topology_discover_time} Log To Console Checking ${switches} switches ${status} ${result} Run Keyword And Ignore Error Wait Until Keyword Succeeds 30s 2s FlowLib.Check Switches In Inventory ... ${switches} @@ -178,6 +183,6 @@ Workflow Setup Workflow Teardown [Documentation] Cleanup when workflow is interrupt - Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} Utils.Clean Mininet System RequestsLibrary.Delete All Sessions diff --git a/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot b/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot index 6347371de5..d3c9edd019 100644 --- a/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot +++ b/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot @@ -4,6 +4,7 @@ Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCON Suite Teardown Delete All Sessions Library RequestsLibrary Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot Variables ../../../variables/Variables.py *** Variables *** @@ -14,20 +15,20 @@ ${IP_3} "10.0.0.3" *** Test Cases *** Check Stats for node 1 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:1 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A1 Check Stats for node 2 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:2 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A2 Check Stats for node 3 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:3 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A3 Check No Host Is Present [Documentation] Get the invnetory, should not contain any host address @{list} Create List ${IP_1} ${IP_2} ${IP_3} - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} Ping All [Documentation] Pingall, verify no packet loss @@ -36,20 +37,20 @@ Ping All Check node 1 addresses [Documentation] Get the address observations for node 1 @{list} Create List ${IP_2} ${IP_3} - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1 ${IP_1} 1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:1 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1?content=nonconfig ${IP_1} 1 + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_NODES_API}/node=openflow%3A1?content=nonconfig ${list} Check node 2 addresses [Documentation] Get the address observations for node 2 @{list} Create List ${IP_1} ${IP_3} - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:2 ${IP_2} 1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:2 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2?content=nonconfig ${IP_2} 1 + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_NODES_API}/node=openflow%3A2?content=nonconfig ${list} Check node 3 addresses [Documentation] Get the address observations for node 3 @{list} Create List ${IP_1} ${IP_2} - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:3 ${IP_3} 1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:3 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_NODES_API}/node=openflow%3A3?content=nonconfig ${IP_3} 1 + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_NODES_API}/node=openflow%3A3?content=nonconfig ${list} *** Keywords *** Ping All Works Good diff --git a/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot b/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot index aff53fdcd6..04dc4bd12a 100644 --- a/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot +++ b/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot @@ -5,6 +5,7 @@ Suite Teardown Delete All Sessions Library Collections Library RequestsLibrary Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot Variables ../../../variables/Variables.py *** Variables *** @@ -12,19 +13,19 @@ Variables ../../../variables/Variables.py *** Test Cases *** Check Stats for node 1 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:1 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A1 Check Stats for node 2 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:2 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A2 Check Stats for node 3 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:3 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A3 Check Flows [Documentation] Check all flows are present - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} "output-node-connector" 21 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} "output-node-connector" 21 Ping All Test [Documentation] Ping all, verify no packet loss or duplicates diff --git a/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot b/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot index 2e9c809321..00ebcc9926 100644 --- a/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot +++ b/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot @@ -4,6 +4,7 @@ Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCON Suite Teardown Delete All Sessions Library RequestsLibrary Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot Variables ../../../variables/Variables.py *** Variables *** @@ -17,15 +18,15 @@ ${IP_3} 10.0.0.3 *** Test Cases *** Check Stats for node 1 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:1 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A1 Check Stats for node 2 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:2 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A2 Check Stats for node 3 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:3 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A3 Check Switch Links [Documentation] Get the topology and check links @@ -63,7 +64,7 @@ Link Down Write link s1 h1 down Read Until mininet> @{list} Create List "link-down":true - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?content=nonconfig ${list} @{list} Create List ${MAC_1} Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list} @@ -73,7 +74,7 @@ Link Up Write link s1 h1 up Read Until mininet> @{list} Create List "link-down":false - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?content=nonconfig ${list} Write pingall Read Until mininet> Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_1}" 1 @@ -92,7 +93,7 @@ Add Port Write sh ovs-vsctl add-port s1 s1-eth1 -- set interface s1-eth1 ofport=1 Read Until mininet> @{list} Create List "link-down":false - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?content=nonconfig ${list} Write pingall Read Until mininet> Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_1}" 1 diff --git a/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot b/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot index a9a3c5574b..4ba5ea3036 100644 --- a/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot +++ b/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot @@ -4,6 +4,7 @@ Suite Setup Start Suite Suite Teardown Utils.Stop Mininet Library RequestsLibrary Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot Variables ../../../variables/Variables.py *** Variables *** @@ -13,31 +14,31 @@ ${DISCARD} "stp-status-aware-node-connector:status":"discarding" *** Test Cases *** Check Stats for node 1 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:1 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A1 Check Stats for node 2 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:2 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A2 Check Stats for node 3 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:3 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A3 Check Ports [Documentation] Check all ports are present @{list} Create List openflow:1:1 openflow:1:2 openflow:1:3 openflow:2:1 openflow:2:2 ... openflow:2:3 openflow:3:1 openflow:3:2 openflow:3:3 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} Check Ports STP status [Documentation] Check the stp status of the ports (forwarding/discarding) - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${FORWARD} 4 - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${DISCARD} 2 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${FORWARD} 4 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${DISCARD} 2 Check Flows [Documentation] Check all flows are present [Tags] bug 6984 bug - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} "output-node-connector" 16 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} "output-node-connector" 16 [Teardown] Report_Failure_Due_To_Bug 6984 Ping Test @@ -50,7 +51,7 @@ Link Down Write link s1 s2 down Read Until mininet> @{list} Create List ${DISCARD} - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} Wait Until Keyword Succeeds 10s 2s Ping Works Good Link Up @@ -58,8 +59,8 @@ Link Up [Tags] exclude Write link s1 s2 up Read Until mininet> - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${FORWARD} 4 - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${DISCARD} 2 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${FORWARD} 4 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${DISCARD} 2 # This sleep is needed because if the ping in the below WUKS is launched before the STP effectively removes the link, # it produces a packet storm in mininet that makes the test unresponsive. Sleep 1 @@ -77,8 +78,8 @@ Add Port [Tags] exclude Write sh ovs-vsctl add-port s1 s1-eth2 -- set interface s1-eth2 ofport=2 Read Until mininet> - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${FORWARD} 4 - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${DISCARD} 2 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${FORWARD} 4 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${DISCARD} 2 # This sleep is needed because if the ping in the below WUKS is launched before the STP effectively removes the link, # it produces a packet storm in mininet that makes the test unresponsive. Sleep 1 diff --git a/csit/suites/openflowplugin/Bug_Validation/6917.robot b/csit/suites/openflowplugin/Bug_Validation/6917.robot index beb7a06a50..4c3ac1c73a 100644 --- a/csit/suites/openflowplugin/Bug_Validation/6917.robot +++ b/csit/suites/openflowplugin/Bug_Validation/6917.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Resource ../../../libraries/MininetKeywords.robot Resource ../../../libraries/FlowLib.robot Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${XmlsDir} ${CURDIR}/../../../variables/xmls @@ -66,4 +67,4 @@ Add Flow BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True} ... ${False} ${True} Sleep 8 - [Teardown] BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + [Teardown] BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} diff --git a/csit/suites/openflowplugin/Bug_Validation/7258.robot b/csit/suites/openflowplugin/Bug_Validation/7258.robot index 3d93737d60..a43a2b1ed2 100644 --- a/csit/suites/openflowplugin/Bug_Validation/7258.robot +++ b/csit/suites/openflowplugin/Bug_Validation/7258.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Resource ../../../libraries/MininetKeywords.robot Resource ../../../libraries/FlowLib.robot Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${XmlsDir} ${CURDIR}/../../../variables/xmls @@ -33,6 +34,6 @@ Initialization Phase Final Phase [Documentation] Stops mininet. - BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} MininetKeywords.Stop Mininet And Exit ${mininet_conn_id} RequestsLibrary.Delete All Sessions diff --git a/csit/suites/openflowplugin/Bug_Validation/7335.robot b/csit/suites/openflowplugin/Bug_Validation/7335.robot index 65ecb45c77..9c473e75bf 100644 --- a/csit/suites/openflowplugin/Bug_Validation/7335.robot +++ b/csit/suites/openflowplugin/Bug_Validation/7335.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Resource ../../../libraries/MininetKeywords.robot Resource ../../../libraries/FlowLib.robot Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${XmlsDir} ${CURDIR}/../../../variables/xmls @@ -28,7 +29,8 @@ Update Flow With Invalid Match And Check It Is Not In Operational DS FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile2} FlowLib.Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${data} FlowLib.Check Config Flow ${True} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s Utils.No Content From URI session ${OPERATIONAL_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} + BuiltIn.Wait Until Keyword Succeeds 10s 1s Utils.No Content From URI session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id}?content=nonconfig [Teardown] Report_Failure_Due_To_Bug 7335 *** Keywords *** @@ -41,6 +43,6 @@ Initialization Phase Final Phase [Documentation] Stops mininet. - BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} MininetKeywords.Stop Mininet And Exit ${mininet_conn_id} RequestsLibrary.Delete All Sessions diff --git a/csit/suites/openflowplugin/Bug_Validation/7349.robot b/csit/suites/openflowplugin/Bug_Validation/7349.robot index 73b0f37f5b..8a9d6dd102 100644 --- a/csit/suites/openflowplugin/Bug_Validation/7349.robot +++ b/csit/suites/openflowplugin/Bug_Validation/7349.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Resource ../../../libraries/MininetKeywords.robot Resource ../../../libraries/FlowLib.robot Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${XmlsDir} ${CURDIR}/../../../variables/xmls @@ -42,6 +43,6 @@ Initialization Phase Final Phase [Documentation] Stops mininet. - BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} MininetKeywords.Stop Mininet And Exit ${mininet_conn_id} RequestsLibrary.Delete All Sessions diff --git a/csit/suites/openflowplugin/Bug_Validation/8723.robot b/csit/suites/openflowplugin/Bug_Validation/8723.robot index 31092c7c1d..8dd96ef2f8 100644 --- a/csit/suites/openflowplugin/Bug_Validation/8723.robot +++ b/csit/suites/openflowplugin/Bug_Validation/8723.robot @@ -10,6 +10,7 @@ Resource ../../../libraries/MininetKeywords.robot Resource ../../../libraries/FlowLib.robot Resource ../../../libraries/OVSDB.robot Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${ODL_OF_PORT1} 6653 @@ -46,7 +47,7 @@ Initialization Phase Final Phase [Documentation] Stops mininet. - BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} MininetKeywords.Stop Mininet And Exit ${mininet_conn_id} RequestsLibrary.Delete All Sessions diff --git a/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot b/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot index e76ed9ba7b..51238730bd 100644 --- a/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot +++ b/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot @@ -11,6 +11,7 @@ Resource ../../../libraries/FlowLib.robot Resource ../../../variables/Variables.robot Resource ../../../variables/netvirt/Variables.robot Resource ../../../libraries/DataModels.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${XMLSDIR} ${CURDIR}/../../../../csit/variables/openflowplugin @@ -19,7 +20,7 @@ ${XMLSDIR} ${CURDIR}/../../../../csit/variables/openflowplugin @{GROUP_ID} 1 2 3 ${FLAG_MSG} "bundle-based-reconciliation-enabled configuration property was changed to 'true'" ${STATIC_FLOW} table=91 -@{DATA_MODELS} config/opendaylight-inventory:nodes operational/opendaylight-inventory:nodes +@{DATA_MODELS} data/opendaylight-inventory:nodes?${RFC8040_CONFIG_CONTENT} data/opendaylight-inventory:nodes?${RFC8040_OPERATIONAL_CONTENT} *** Test Cases *** TC01_Reconciliation check after switch restart @@ -80,7 +81,7 @@ Start Suite End Suite [Documentation] Run at end of the suite - RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + RequestsLibrary.Delete Request session ${RFC8040_NODES_API} KarafKeywords.Issue_Command_On_Karaf_Console log:set INFO org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeReconciliationImpl SSHLibrary.Close All Connections @@ -91,7 +92,7 @@ Configure DPN Utils.Run Command On Remote System ${ip} sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640 Utils.Run Command On Remote System ${ip} sudo ovs-vsctl set-controller ${INTEGRATION_BRIDGE} tcp:${ODL_SYSTEM_IP}:6653 Utils.Run Command On Remote System ${ip} sudo ovs-vsctl set bridge ${INTEGRATION_BRIDGE} protocols=OpenFlow13 - Wait Until Keyword Succeeds 20s 2s DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${DATA_MODELS} + Wait Until Keyword Succeeds 20s 2s DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${DATA_MODELS} ${RFC8040_RESTCONF_ROOT} Push Static Flow [Arguments] ${ip} @@ -111,7 +112,7 @@ Push Flow Via Restcall Push Groups Via Restcall [Arguments] ${switch_idx} ${index} ${GROUP_BODY} OperatingSystem.Get File ${XMLSDIR}/${GROUPFILE[${index}]} - ${node_id} BuiltIn.Set Variable openflow:${switch_idx} + ${node_id} BuiltIn.Set Variable openflow%3A${switch_idx} ${group_id} BuiltIn.Set Variable ${GROUP_ID[${index}]} FlowLib.Add Group To Controller And Verify ${GROUP_BODY} ${node_id} ${group_id} - Wait Until Keyword Succeeds 5s 1s Utils.Get URI And Verify ${OPERATIONAL_NODES_API}/node/${node_id}/group/${group_id} + Wait Until Keyword Succeeds 5s 1s Utils.Get URI And Verify ${RFC8040_NODES_API}/node=${node_id}/group=${group_id}?content=nonconfig diff --git a/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot b/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot index 795d7d5c21..830736df87 100644 --- a/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot +++ b/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot @@ -13,6 +13,7 @@ Resource ../../../libraries/MininetKeywords.robot Resource ../../../libraries/Utils.robot Resource ../../../libraries/OvsManager.robot Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${SWITCHES} 3 @@ -375,7 +376,7 @@ Final Phase [Documentation] Delete all sessions. ${command} = BuiltIn.Set Variable sudo iptables -v -F BuiltIn.Run Keyword And Ignore Error ClusterManagement.Run_Bash_Command_On_List_Or_All ${command} - BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${CONFIG_NODES_API} + BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} RequestsLibrary.Delete All Sessions Add Groups And Flows On Member @@ -398,9 +399,9 @@ Remove Single Group And Flow On Member [Documentation] Remove 1 group 1&2 and 1 flow in every switch. ${session} = Resolve_Http_Session_For_Member member_index=${member_index} FOR ${switch} IN RANGE 1 ${switches+1} - RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/table/0/flow/1 - RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/group/1 - RequestsLibrary.Delete Request ${session} ${CONFIG_NODES_API}/node/openflow:${switch}/group/1000 + RequestsLibrary.Delete Request ${session} ${RFC8040_NODES_API}/node=openflow%3A${switch}/table=0/flow=1 + RequestsLibrary.Delete Request ${session} ${RFC8040_NODES_API}/node=openflow%3A${switch}/group=1 + RequestsLibrary.Delete Request ${session} ${RFC8040_NODES_API}/node=openflow%3A${switch}/group=1000 END Check Flow Stats Are Not Frozen @@ -417,7 +418,7 @@ Extract Flow Duration [Arguments] ${member_index} [Documentation] Extract duration for flow 1 in switch 1. ${session} = Resolve_Http_Session_For_Member member_index=${member_index} - ${resp} RequestsLibrary.Get Request ${session} ${OPERATIONAL_NODES_API}/node/openflow:1/table/0/flow/1 headers=${headers} + ${resp} RequestsLibrary.Get Request ${session} ${RFC8040_NODES_API}/node=openflow%3A1/table=0/flow=1?content=nonconfig headers=${headers} Log ${resp.content} ${json_resp} = RequestsLibrary.To_Json ${resp.content} ${flow_list} = Collections.Get_From_Dictionary ${json_resp} flow-node-inventory:flow diff --git a/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot b/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot index f2c6ffbe68..4214ddcde4 100644 --- a/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot +++ b/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot @@ -20,6 +20,7 @@ ${SWITCHES} 1 ${START_CMD} sudo mn --topo linear,${SWITCHES} @{CONTROLLER_NODES} ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} @{cntls_idx_list} ${1} ${2} ${3} +${ENTITY_OWNER_URI} rests/data/entity-owners:entity-owners *** Test Cases *** Start Mininet To All Nodes @@ -158,6 +159,7 @@ Isolate Controller From The Cluster Check No Device Owners In Controller [Documentation] Check there is no owners in controllers ${session} = Resolve_Http_Session_For_Member member_index=${active_member} + # FIXME: The URI only works for Silicon & earlier versions. This should be replaced with new RPC calls for Phosphorus. ${data} = TemplatedRequests.Get_As_Json_From_Uri uri=${ENTITY_OWNER_URI} session=${session} #ofp-topology-manager entity is introduced in the OPNFLWPLUG-1022 bug fix, and this entity will #always be present in the EOS output. All 3 controller nodes will be candidate, so EOS output will diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot index 1b18c6bd9d..fee03a0ba0 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot @@ -10,8 +10,8 @@ Resource ../../../libraries/FlowLib.robot Variables ../../../variables/ofplugin/RpcVariables.py *** Variables *** -${send_barrier_url} /restconf/operations/flow-capable-transaction:send-barrier -${send_echo_url} /restconf/operations/sal-echo:send-echo +${send_barrier_url} /rests/operations/flow-capable-transaction:send-barrier +${send_echo_url} /rests/operations/sal-echo:send-echo *** Test Cases *** Sending Barrier diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot index d186e8960b..e5df8165fc 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot @@ -10,7 +10,7 @@ Resource ../../../libraries/FlowLib.robot Variables ../../../variables/ofplugin/RpcVariables.py *** Variables *** -${send_update_table_url} /restconf/operations/sal-table:update-table +${send_update_table_url} /rests/operations/sal-table:update-table ${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch user *** Test Cases *** diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot index 090f699c68..3ed3b61ac7 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot @@ -9,6 +9,7 @@ Library RequestsLibrary Library SSHLibrary Resource ../../../libraries/Utils.robot Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/openflowplugin/Variables.robot Variables ../../../variables/Variables.py Library ../../../libraries/XmlComparator.py @@ -53,7 +54,7 @@ Final Phase Delete Flow [Documentation] Removes used flow - ${resp}= RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} + ${resp}= RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id} Log ${resp.content} - ${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. + ${msg}= Set Variable Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot index 3dcdc6ad5b..227621ee28 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot @@ -40,7 +40,7 @@ Test Add Flows Group 0 # Lets wait for ofp to collect stats END ${flows}= Get Length ${flowlist0} - Wait Until Keyword Succeeds 30s 2s FlowLib.Check Flow Stats Are Available openflow:1 ${flows} + Wait Until Keyword Succeeds 30s 2s FlowLib.Check Flow Stats Are Available openflow%3A1 ${flows} # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot index fc18e17222..57024f6620 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot @@ -39,7 +39,7 @@ Test Add Flows Group 0 # Lets wait for ofp to collect stats END ${flows}= Get Length ${flowlist0} - Wait Until Keyword Succeeds 30s 2s FlowLib.Check Flow Stats Are Available openflow:1 ${flows} + Wait Until Keyword Succeeds 30s 2s FlowLib.Check Flow Stats Are Available openflow%3A1 ${flows} # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> diff --git a/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot b/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot index 0569e32435..25f3b73f1c 100644 --- a/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot +++ b/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot @@ -6,9 +6,10 @@ Library OperatingSystem Library Collections Library XML Library ../../../libraries/XmlComparator.py -Variables ../../../variables/Variables.py Library RequestsLibrary Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${XmlsDir} ${CURDIR}/../../../variables/xmls @@ -216,7 +217,7 @@ Check Config Flow Presence Flow Presence Config Flow ${headers}= Create Dictionary Accept=application/xml - ${resp}= RequestsLibrary.Get Request session /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${headers} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id} headers=${headers} Log ${resp} Log ${resp.content} Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY} @@ -236,7 +237,7 @@ Check Operational Table Presence Flow Presence Operational Table ${headers}= Create Dictionary Accept=application/xml - ${resp}= RequestsLibrary.Get Request session /restconf/operational/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id} headers=${headers} + ${resp}= RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}?${RFC8040_OPERATIONAL_CONTENT} headers=${headers} Log ${resp} Log ${resp.content} Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY} @@ -246,13 +247,13 @@ Flow Presence Operational Table Add Flow Log ${data} - ${resp}= RequestsLibrary.Put Request session /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} headers=${HEADERS_XML} data=${data} - ${msg}= Set Variable Adding flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. + ${resp}= RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id} headers=${HEADERS_XML} data=${data} + ${msg}= Set Variable Adding flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} Delete Flow - ${resp}= RequestsLibrary.Delete Request session /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} - ${msg}= Set Variable Delete flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received. + ${resp}= RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id} + ${msg}= Set Variable Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} Delete All Flows diff --git a/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot b/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot index b9b507ae25..4aa0189096 100644 --- a/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot +++ b/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot @@ -8,12 +8,11 @@ Library OperatingSystem Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot Resource ../../../libraries/Utils.robot *** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes/ -${REST_CONTEXT_CF} /restconf/config/opendaylight-inventory:nodes/node/openflow:1 -${REST_CONTEXT_OP} /restconf/operational/opendaylight-inventory:nodes/node/openflow:1 +${REST_CONTEXT} ${RFC8040_NODES_API}/node=openflow%3A1 ${GROUP} ${CURDIR}/../../../variables/xmls/g4.xml ${FLOW} ${CURDIR}/../../../variables/xmls/f50.xml ${GROUP_NAME} Foo @@ -23,20 +22,20 @@ ${FLOW_NAME} forward Get list of nodes [Documentation] Get the inventory to make sure openflow:1 comes up ${node_list}= Create List openflow:1 - Wait Until Keyword Succeeds 90s 1s Check For Elements At URI ${REST_CONTEXT_OP} ${node_list} + Wait Until Keyword Succeeds 90s 1s Check For Elements At URI ${REST_CONTEXT}?${RFC8040_OPERATIONAL_CONTENT} ${node_list} Add a group [Documentation] Add a group using RESTCONF [Tags] Push ${body} OperatingSystem.Get File ${GROUP} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT_CF}/group/1 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/group=1 headers=${HEADERS_XML} data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding group config [Documentation] Get the group stat in config - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/group/1 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/group=1?${RFC8040_CONFIG_CONTENT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${GROUP_NAME} @@ -45,21 +44,21 @@ Verify after adding group operational [Documentation] Get the group stat in operational ${elements}= Create List group-statistics ref-count packet-count byte-count buckets ... weight group-select - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT_OP}/group/1 ${elements} + Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/group=1?${RFC8040_OPERATIONAL_CONTENT} ${elements} Add a flow that includes a group [Documentation] Push a flow through RESTCONF [Tags] Push ${body} OperatingSystem.Get File ${FLOW} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT_CF}/table/0/flow/1 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/table=0/flow=1 headers=${HEADERS_XML} data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding flow config [Documentation] Verify the flow [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/table/0/flow/1 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/table=0/flow=1?${RFC8040_CONFIG_CONTENT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${FLOW_NAME} @@ -67,28 +66,28 @@ Verify after adding flow config Verify after adding flow operational [Documentation] Verify the flow ${elements}= Create List group-action group-id - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT_OP}/table/0/flow/1 ${elements} + Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/table=0/flow=1?${RFC8040_OPERATIONAL_CONTENT} ${elements} Remove the flow [Documentation] Remove the flow - ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT_CF}/table/0/flow/1 + ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT}/table=0/flow=1 Should Be Equal As Strings ${resp.status_code} 200 Verify after deleting flow [Documentation] Verify the flow removal [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/table/0/flow/1 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/table=0/flow=1?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${FLOW_NAME} Delete the group [Documentation] Remove the group [Tags] Delete - ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT_CF}/group/1 + ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT}/group=1 Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Verify after deleting group [Documentation] Verify the flow removal [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/group/1 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/group=1?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${GROUP_NAME} diff --git a/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot b/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot index 0726eac85d..40152def47 100644 --- a/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot +++ b/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot @@ -8,12 +8,11 @@ Library OperatingSystem Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot Resource ../../../libraries/Utils.robot *** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes/ -${REST_CONTEXT_CF} /restconf/config/opendaylight-inventory:nodes/node/openflow:1 -${REST_CONTEXT_OP} /restconf/operational/opendaylight-inventory:nodes/node/openflow:1 +${REST_CONTEXT} ${RFC8040_NODES_API}/node=openflow%3A1 ${METER} ${CURDIR}/../../../variables/xmls/m4.xml ${FLOW} ${CURDIR}/../../../variables/xmls/f51.xml ${METER_NAME} Foo @@ -23,20 +22,20 @@ ${FLOW_NAME} forward Get list of nodes [Documentation] Get the inventory to make sure openflow:1 comes up ${node_list}= Create List openflow:1 - Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${REST_CONTEXT_OP} ${node_list} + Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${REST_CONTEXT}?${RFC8040_OPERATIONAL_CONTENT} ${node_list} Add a meter [Documentation] Add a meter using RESTCONF [Tags] Push ${body} OperatingSystem.Get File ${METER} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT_CF}/meter/1 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/meter=1 headers=${HEADERS_XML} data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding meter config [Documentation] Get the meter stat in config - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/meter/1 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/meter=1?${RFC8040_CONFIG_CONTENT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${METER_NAME} @@ -45,21 +44,21 @@ Verify after adding meter operational [Documentation] Get the meter stat in operational ${elements}= Create List meter-statistics meter-kbps flow-count packet-in-count byte-in-count ... meter-band-stats meter-band-headers - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT_OP}/meter/1 ${elements} + Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/meter=1?${RFC8040_OPERATIONAL_CONTENT} ${elements} Add a flow that includes a meter [Documentation] Push a flow through RESTCONF [Tags] Push ${body} OperatingSystem.Get File ${FLOW} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT_CF}/table/0/flow/2 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/table=0/flow=2 headers=${HEADERS_XML} data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding flow config [Documentation] Verify the flow [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/table/0/flow/2 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/table=0/flow=2?${RFC8040_CONFIG_CONTENT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${FLOW_NAME} @@ -67,28 +66,28 @@ Verify after adding flow config Verify after adding flow operational [Documentation] Verify the flow ${elements}= Create List meter-id flow - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT_OP}/table/0/flow/2 ${elements} + Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/table=0/flow=2?${RFC8040_OPERATIONAL_CONTENT} ${elements} Remove the flow [Documentation] Remove the flow - ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT_CF}/table/0/flow/2 + ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT}/table=0/flow=2 Should Be Equal As Strings ${resp.status_code} 200 Verify after deleting flow [Documentation] Verify the flow removal [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/table/0/flow/2 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/table=0/flow=2?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${FLOW_NAME} Delete the meter [Documentation] Remove the meter [Tags] Delete - ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT_CF}/meter/1 + ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT}/meter=1 Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Verify after deleting meter [Documentation] Verify the flow removal [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT_CF}/meter/1 + ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/meter=1?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${METER_NAME} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot index 8e0d927874..90855427ec 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot @@ -6,9 +6,9 @@ Library Collections Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes *** Test Cases *** Get list of nodes @@ -21,7 +21,7 @@ Get list of nodes Get nodeconnector for the root node [Documentation] Get the inventory for the root node ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:1 + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.text} @@ -43,7 +43,7 @@ Get Stats for a node *** Keywords *** Check Every Nodes [Arguments] ${numnodes} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API} Should Be Equal As Strings ${resp.status_code} 200 FOR ${IND} IN RANGE 1 ${numnodes+1} Should Contain ${resp.text} openflow:${IND} @@ -52,7 +52,7 @@ Check Every Nodes Check Every Nodes Stats [Arguments] ${numnodes} FOR ${IND} IN RANGE 1 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND} + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} flow-capable-node-connector-statistics @@ -62,7 +62,7 @@ Check Every Nodes Stats Check Every Nodes Nodeconnector [Arguments] ${numnodes} FOR ${IND} IN RANGE 2 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND} + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.text} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot index 512ebaac18..e570e5bdab 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot @@ -7,9 +7,9 @@ Library XML Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** -${REST_CONTEXT} /restconf/operational/network-topology:network-topology/topology/flow:1 *** Test Cases *** Get Nodes Count @@ -17,7 +17,7 @@ Get Nodes Count ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${REST_CONTEXT} node ${numnodes} + Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} node ${numnodes} Get Links Count [Documentation] Checks the number of links @@ -25,12 +25,12 @@ Get Links Count ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} ${numlinks} Evaluate (${numnodes}-1)*2 - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${REST_CONTEXT} link ${numlinks} + Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} link ${numlinks} *** Keywords *** Verify Element Count [Arguments] ${URI} ${xpath_location} ${expected_count} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT} headers=${ACCEPT_XML} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${count}= Get Element Count ${resp.text} xpath=${xpath_location} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot index 8e0d927874..90855427ec 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot @@ -6,9 +6,9 @@ Library Collections Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes *** Test Cases *** Get list of nodes @@ -21,7 +21,7 @@ Get list of nodes Get nodeconnector for the root node [Documentation] Get the inventory for the root node ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:1 + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.text} @@ -43,7 +43,7 @@ Get Stats for a node *** Keywords *** Check Every Nodes [Arguments] ${numnodes} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_NODES_API} Should Be Equal As Strings ${resp.status_code} 200 FOR ${IND} IN RANGE 1 ${numnodes+1} Should Contain ${resp.text} openflow:${IND} @@ -52,7 +52,7 @@ Check Every Nodes Check Every Nodes Stats [Arguments] ${numnodes} FOR ${IND} IN RANGE 1 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND} + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} flow-capable-node-connector-statistics @@ -62,7 +62,7 @@ Check Every Nodes Stats Check Every Nodes Nodeconnector [Arguments] ${numnodes} FOR ${IND} IN RANGE 2 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/node/openflow:${IND} + ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.text} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot index 512ebaac18..e570e5bdab 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot @@ -7,9 +7,9 @@ Library XML Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** -${REST_CONTEXT} /restconf/operational/network-topology:network-topology/topology/flow:1 *** Test Cases *** Get Nodes Count @@ -17,7 +17,7 @@ Get Nodes Count ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${REST_CONTEXT} node ${numnodes} + Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} node ${numnodes} Get Links Count [Documentation] Checks the number of links @@ -25,12 +25,12 @@ Get Links Count ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} ${numlinks} Evaluate (${numnodes}-1)*2 - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${REST_CONTEXT} link ${numlinks} + Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} link ${numlinks} *** Keywords *** Verify Element Count [Arguments] ${URI} ${xpath_location} ${expected_count} - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT} headers=${ACCEPT_XML} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${count}= Get Element Count ${resp.text} xpath=${xpath_location} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot index 46abaff755..13983dee8a 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${VENDOR} Nicira, Inc. @@ -20,46 +21,46 @@ ${SW_HARDWARE} "flow-node-inventory:hardware":"${HARDWARE}" *** Test Cases *** Get list of nodes [Documentation] Get the inventory - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API} ${node_list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${node_list} Check No Link Down [Documentation] Check there is no link down. We have 8 ports in total: s1=2, s2=3, s3=3. - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} "link-down":false 8 + Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} "link-down":false 8 [Teardown] Report_Failure_Due_To_Bug 6595 Get node 1 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:1:1 ... openflow:1:2 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} Get node 2 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:2:1 ... openflow:2:2 openflow:2:3 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:2 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2?${RFC8040_OPERATIONAL_CONTENT} ${list} Get node 3 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:3:1 ... openflow:3:2 openflow:3:3 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:3 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} Link Down [Documentation] Take link s1-s2 down Write link s1 s2 down Read Until mininet> @{list} Create List "link-down":true - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:3 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} Link Up [Documentation] Take link s1-s2 up Write link s1 s2 up Read Until mininet> @{list} Create List "link-down":false - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:3 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} Remove Port [Documentation] Remove port s2-eth1 @@ -67,7 +68,7 @@ Remove Port Write sh ovs-vsctl del-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} Add Port [Documentation] Add port s2-eth1, new id 4 @@ -75,4 +76,4 @@ Add Port Write sh ovs-vsctl add-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:4 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot index 85023db7d5..9d73911b3d 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot @@ -6,6 +6,7 @@ Library Collections Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot Resource ../../../libraries/Utils.robot *** Variables *** @@ -14,8 +15,8 @@ Resource ../../../libraries/Utils.robot *** Test Cases *** Get RESTCONF Topology [Documentation] Get RESTCONF Topology and validate the result. - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list} - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${node_list} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} List all the links @@ -69,7 +70,7 @@ Remove Port Write sh ovs-vsctl del-port s2 s2-eth2 Read Until mininet> @{list} Create List openflow:2:2 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} Add Port [Documentation] Add port s2-eth2, new id 5 @@ -77,17 +78,17 @@ Add Port Write sh ovs-vsctl add-port s2 s2-eth2 Read Until mininet> @{list} Create List openflow:2:5 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} *** Keywords *** Verify Links [Arguments] ${expected_links} - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.text} Log ${result} - ${content} Get From Dictionary ${result} topology + ${content} Get From Dictionary ${result} network-topology:topology ${topology} Get From List ${content} 0 ${links} Get From Dictionary ${topology} link FOR ${expected_link} IN @{expected_links} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot index 11f6c33fcb..e2d9162442 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** @{node_list} openflow:1 openflow:2 openflow:3 @@ -14,16 +15,16 @@ Resource ../../../libraries/Utils.robot *** Test Cases *** Get Stats for all nodes [Documentation] Get the stats for all nodes - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API} ${node_list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${node_list} Get Stats for node 1 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:1 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A1 Get Stats for node 2 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:2 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A2 Get Stats for node 3 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:3 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A3 diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot index 7c986052d1..7514ad5f49 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${BODY2} 2Foo204810.0.20.1/32152000openflow:1:1 @@ -14,28 +15,28 @@ ${BODY2} 2 @{list} Create List "link-down":true - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:3 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} Link Up [Documentation] Take link s1-s2 up Write link s1 s2 up Read Until mininet> @{list} Create List "link-down":false - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1/node-connector/openflow:1:1 ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:2/node-connector/openflow:2:3 ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} Remove Port [Documentation] Remove port s2-eth1 @@ -66,7 +67,7 @@ Remove Port Write sh ovs-vsctl del-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} Add Port [Documentation] Add port s2-eth1, new id 4 @@ -74,4 +75,4 @@ Add Port Write sh ovs-vsctl add-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:4 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot index 85023db7d5..78cedcbe9d 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot @@ -6,6 +6,7 @@ Library Collections Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot Resource ../../../libraries/Utils.robot *** Variables *** @@ -14,8 +15,8 @@ Resource ../../../libraries/Utils.robot *** Test Cases *** Get RESTCONF Topology [Documentation] Get RESTCONF Topology and validate the result. - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list} - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${node_list} + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} List all the links @@ -68,26 +69,26 @@ Remove Port [Tags] exclude Write sh ovs-vsctl del-port s2 s2-eth2 Read Until mininet> - @{list} Create List openflow:2:2 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list} + @{list} Create List openflow%3A2%3A2 + Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} Add Port [Documentation] Add port s2-eth2, new id 5 [Tags] exclude Write sh ovs-vsctl add-port s2 s2-eth2 Read Until mininet> - @{list} Create List openflow:2:5 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list} + @{list} Create List openflow%3A2%3A5 + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} *** Keywords *** Verify Links [Arguments] ${expected_links} - ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 + ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.text} Log ${result} - ${content} Get From Dictionary ${result} topology + ${content} Get From Dictionary ${result} network-topology:topology ${topology} Get From List ${content} 0 ${links} Get From Dictionary ${topology} link FOR ${expected_link} IN @{expected_links} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot index 11f6c33fcb..e2d9162442 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** @{node_list} openflow:1 openflow:2 openflow:3 @@ -14,16 +15,16 @@ Resource ../../../libraries/Utils.robot *** Test Cases *** Get Stats for all nodes [Documentation] Get the stats for all nodes - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${OPERATIONAL_NODES_API} ${node_list} + Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${node_list} Get Stats for node 1 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:1 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A1 Get Stats for node 2 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:2 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A2 Get Stats for node 3 [Documentation] Get the stats for a node - Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow:3 + Wait Until Keyword Succeeds 10s 2s Check Nodes Stats openflow%3A3 diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot index 7e3ae087cf..d7ecf80ffc 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot @@ -7,6 +7,7 @@ Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${BODY1} 2Foo204810.0.10.1/32139200 @@ -15,48 +16,48 @@ ${BODY2} 2 Check Flow 1 Not Configured On Controller1 - ${resp}= Get Controller Response session1 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/1 + ${resp}= Get Controller Response session1 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=1?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 1 Not Operational On Controller1 - ${resp}= Get Controller Response session1 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session1 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -278,12 +279,12 @@ Check Flow 1 Not Operational On Controller1 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 1 Not Configured On Controller2 - ${resp}= Get Controller Response session2 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/1 + ${resp}= Get Controller Response session2 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=1?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 1 Not Operational On Controller2 - ${resp}= Get Controller Response session2 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session2 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -291,12 +292,12 @@ Check Flow 1 Not Operational On Controller2 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 1 Not Configured On Controller3 - ${resp}= Get Controller Response session3 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/1 + ${resp}= Get Controller Response session3 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=1?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 1 Not Operational On Controller3 - ${resp}= Get Controller Response session3 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session3 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -304,12 +305,12 @@ Check Flow 1 Not Operational On Controller3 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 2 Not Configured On Controller1 - ${resp}= Get Controller Response session1 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/2 + ${resp}= Get Controller Response session1 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=2?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 2 Not Operational On Controller1 - ${resp}= Get Controller Response session1 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session1 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -317,12 +318,12 @@ Check Flow 2 Not Operational On Controller1 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 2 Not Configured On Controller2 - ${resp}= Get Controller Response session2 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/2 + ${resp}= Get Controller Response session2 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=2?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 2 Not Operational On Controller2 - ${resp}= Get Controller Response session2 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session2 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -330,12 +331,12 @@ Check Flow 2 Not Operational On Controller2 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 2 Not Configured On Controller3 - ${resp}= Get Controller Response session3 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/2 + ${resp}= Get Controller Response session3 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=2?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 2 Not Operational On Controller3 - ${resp}= Get Controller Response session3 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session3 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -343,12 +344,12 @@ Check Flow 2 Not Operational On Controller3 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 3 Not Configured On Controller1 - ${resp}= Get Controller Response session1 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/3 + ${resp}= Get Controller Response session1 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=3?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 3 Not Operational On Controller1 - ${resp}= Get Controller Response session1 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session1 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -356,12 +357,12 @@ Check Flow 3 Not Operational On Controller1 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 3 Not Configured On Controller2 - ${resp}= Get Controller Response session2 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/3 + ${resp}= Get Controller Response session2 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=3?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 3 Not Operational On Controller2 - ${resp}= Get Controller Response session2 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session2 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} @@ -369,12 +370,12 @@ Check Flow 3 Not Operational On Controller2 Should Be Equal ${False} ${pres} msg=${msg} Check Flow 3 Not Configured On Controller3 - ${resp}= Get Controller Response session3 ${CONFIG_NODES_API}/node/openflow:1/table/1/flow/3 + ${resp}= Get Controller Response session3 ${RFC8040_NODES_API}/node=openflow%3A1/table=1/flow=3?content=config Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 404 Check Flow 3 Not Operational On Controller3 - ${resp}= Get Controller Response session3 ${OPERATIONAL_NODES_API}/node/openflow:1/table/1 + ${resp}= Get Controller Response session3 ${RFC8040_NODES_API}/node=openflow%3A1/table=1?content=nonconfig Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} diff --git a/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot b/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot index 408ffca0c0..ba63894d93 100644 --- a/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot +++ b/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot @@ -5,19 +5,20 @@ Suite Teardown Switch Qualification Suite Teardown Test Timeout 5m Library Collections Library OperatingSystem -Resource ../../../libraries/SwitchUtils.robot -Resource ../../../libraries/Utils.robot Library RequestsLibrary Library ../../../libraries/Common.py Library ../../../libraries/SwitchClasses/${SWITCH_CLASS}.py Variables ../../../variables/Variables.py +Resource ../../../libraries/SwitchUtils.robot +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot *** Variables *** ${SWITCH_CLASS} Ovs ${SWITCH_IP} ${TOOLS_SYSTEM_IP} ${SWITCH_PROMPT} ${TOOLS_SYSTEM_PROMPT} ${ODL_SYSTEM_IP} null -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes +${REST_CONTEXT} ${RFC8040_NODES_API} *** Test Cases *** OF1.3 Connection Between Switch and Controller diff --git a/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot b/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot index dc4450cce4..73ffa98fb4 100644 --- a/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot +++ b/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot @@ -93,10 +93,10 @@ Create And Remove Flow Call Method ${test_switch} create_flow_match_elements ${flow.xml} Log ${test_switch.flow_validations} ${dpid_id}= Get Switch Datapath ID ${test_switch} - Wait Until Keyword Succeeds 3s 1s Add Flow To Controller And Verify ${flow.xml} openflow:${dpid_id} ${flow.table_id} + Wait Until Keyword Succeeds 3s 1s Add Flow To Controller And Verify ${flow.xml} openflow%3A${dpid_id} ${flow.table_id} ... ${flow.id} Wait Until Keyword Succeeds 3s 1s Validate Switch Output ${test_switch} ${test_switch.dump_all_flows} ${test_switch.flow_validations} - Wait Until Keyword Succeeds 3s 1s Remove Flow From Controller And Verify openflow:${dpid_id} ${flow.table_id} ${flow.id} + Wait Until Keyword Succeeds 3s 1s Remove Flow From Controller And Verify openflow%3A${dpid_id} ${flow.table_id} ${flow.id} Wait Until Keyword Succeeds 3s 1s Validate Switch Output ${test_switch} ${test_switch.dump_all_flows} ${test_switch.flow_validations} ... false diff --git a/csit/variables/Variables.py b/csit/variables/Variables.py index c5ba23c22e..9f519658f0 100644 --- a/csit/variables/Variables.py +++ b/csit/variables/Variables.py @@ -192,7 +192,10 @@ PASSWORD = "EMPTY" AUTH = [u"admin", u"admin"] SCOPE = "sdn" HEADERS = {"Content-Type": "application/json"} -HEADERS_YANG_JSON = {"Content-Type": "application/yang.data+json"} +# FIXME: keep it as 'application/json' to make it work for both Bierman02 +# and RFC8040 URLs. Change it to RFC8040 media type once RFC8040 migration +# is completed. +HEADERS_YANG_JSON = {"Content-Type": "application/json"} HEADERS_XML = {"Content-Type": "application/xml"} ACCEPT_XML = {"Accept": "application/xml"} ACCEPT_JSON = {"Accept": "application/json"} diff --git a/csit/variables/Variables.robot b/csit/variables/Variables.robot index 8e4ddd3f82..7f4621416c 100644 --- a/csit/variables/Variables.robot +++ b/csit/variables/Variables.robot @@ -91,7 +91,7 @@ ${GET_CONFIGURATION_URI} /restconf/operational/configuration:configurationRec ${GET_DASHBOARDRECORD} /restconf/operational/dashboardrule:dashboardRecord/ # FIXME: Move to a separate Centinel-related Resource and add description. ${GET_INTENTS_URI} /retconf/config/intent:intents # FIXME: Move to a separate Nemo-related Resource and add description. &{HEADERS} Content-Type=application/json # Deprecated. Sometimes conflicts with argument name. TODO: Migrate most suites to TemplatedRequests, then chose a more descriptive name. -&{HEADERS_YANG_JSON} Content-Type=application/yang.data+json # Content type for JSON data, used to work around Requests auto-serialization. TODO: Hide into more specific Resource if possible. +&{HEADERS_YANG_JSON} Content-Type=application/json # Content type for JSON data, used to work around Requests auto-serialization. FIXME: keep it as 'application/json' to make it work for both Bierman02 & RFC8040 URLs. Change it to RFC8040 media type once RFC8040 migration is completed. &{HEADERS_YANG_RFC8040_JSON} Content-Type=application/yang-data+json &{HEADERS_XML} Content-Type=application/xml # Content type for XML data. TODO: Hide into more specific Resource if possible. ${KARAF_PROMPT_LOGIN} opendaylight-user # This is used for karaf console login. diff --git a/csit/variables/openflowplugin/Variables.robot b/csit/variables/openflowplugin/Variables.robot new file mode 100644 index 0000000000..fbbd90cafb --- /dev/null +++ b/csit/variables/openflowplugin/Variables.robot @@ -0,0 +1,14 @@ +*** Settings *** +Documentation Resource file containing OpenFlow Plugin variables. + +*** Variables *** +${RFC8040_RESTCONF_ROOT} /rests +${RFC8040_DATA_RESOURCE} ${RFC8040_RESTCONF_ROOT}/data +${RFC8040_CONFIG_CONTENT} content=config +${RFC8040_OPERATIONAL_CONTENT} content=nonconfig +${RFC8040_NODES_API} ${RFC8040_DATA_RESOURCE}/opendaylight-inventory:nodes +${RFC8040_CONFIG_NODES_API} ${RFC8040_NODES_API}?${RFC8040_CONFIG_CONTENT} +${RFC8040_OPERATIONAL_NODES_API} ${RFC8040_NODES_API}?${RFC8040_OPERATIONAL_CONTENT} +${RFC8040_TOPO_API} ${RFC8040_DATA_RESOURCE}/network-topology:network-topology +${RFC8040_OPERATIONAL_TOPO_API} ${RFC8040_TOPO_API}?${RFC8040_OPERATIONAL_CONTENT} +${RFC8040_OPERATIONAL_TOPO_FLOW1_API} ${RFC8040_TOPO_API}/topology=flow%3A1?${RFC8040_OPERATIONAL_CONTENT}