From: Tomas Cechvala Date: Tue, 16 Feb 2016 14:47:04 +0000 (+0100) Subject: Editing rest calls in GBP demos X-Git-Tag: release/beryllium-sr1~88 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=e37094d84d71b61c17208a893b6e12926213da77 Editing rest calls in GBP demos - added verification - depricated methods replaced Change-Id: I74d4de26f7bce54201afdc1edff0979f80497788 Signed-off-by: Tomas Cechvala --- diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot index a629afbb87..e704ce9428 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp1/001_set_odl.robot @@ -18,8 +18,7 @@ Put Tunnels ${edited_json} Replace String ${json_to_edit} _CLASSIFIER1 ${GBP1} ${edited_json} Replace String ${edited_json} _CLASSIFIER2 ${GBP2} ${edited_json} Replace String ${edited_json} _CLASSIFIER3 ${GBP3} - ${resp} RequestsLibrary.Put Request session ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON} - Should Be Equal As Strings ${resp.status_code} 200 + Add Elements To URI And Verify ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON} Register Endpoints [Documentation] Endpoints registration diff --git a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot index 009f61556d..4d30e8d039 100644 --- a/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot +++ b/csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/001_set_odl.robot @@ -18,8 +18,7 @@ Put Tunnels ${edited_json} Replace String ${json_to_edit} _CLASSIFIER1 ${GBP1} ${edited_json} Replace String ${edited_json} _CLASSIFIER2 ${GBP2} ${edited_json} Replace String ${edited_json} _CLASSIFIER3 ${GBP3} - ${resp} RequestsLibrary.Put Request session ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON} - Should Be Equal As Strings ${resp.status_code} 200 + Add Elements To URI And Verify ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON} Register Endpoints [Documentation] Endpoints registration diff --git a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot index 243b1fad18..cb18cb6175 100644 --- a/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot +++ b/csit/suites/groupbasedpolicy/GBPSFC/6-node/demo-asymmetric-chain/010_set_odl.robot @@ -15,16 +15,16 @@ Put Service Functions ${json_to_edit} OperatingSystem.Get File ${SF_FILE} ${edited_json} Replace String ${json_to_edit} _SF1 ${GBPSFC3} ${edited_json} Replace String ${edited_json} _SF2 ${GBPSFC5} - ${resp} RequestsLibrary.Put Request session ${SF_PATH} ${edited_json} ${HEADERS_YANG_JSON} - Should Be Equal As Strings ${resp.status_code} 200 + Add Elements To URI And Verify ${SF_PATH} ${edited_json} ${HEADERS_YANG_JSON} + + Put Service Function Forwarders [Documentation] Register Service Function Forwarders to ODL ${json_to_edit} OperatingSystem.Get File ${SFF_FILE} ${edited_json} Replace String ${json_to_edit} _SFF1 ${GBPSFC2} ${edited_json} Replace String ${edited_json} _SFF2 ${GBPSFC4} - ${resp} RequestsLibrary.Put Request session ${SFF_PATH} ${edited_json} ${HEADERS_YANG_JSON} - Should Be Equal As Strings ${resp.status_code} 200 + Add Elements To URI And Verify ${SFF_PATH} ${edited_json} ${HEADERS_YANG_JSON} Wait For Manager and Switch Connected on GBPSFC2 [Documentation] Making sure that manager is connected for further processing. @@ -42,26 +42,27 @@ Wait For Manager and Switch Connected on GBPSFC4 Put Service Function Chains [Documentation] Register Service Function Chains to ODL - Add Elements To URI From File ${SFC_PATH} ${SFC_ASYMM_FILE} ${HEADERS_YANG_JSON} + Add Elements To URI From File And Verify ${SFC_PATH} ${SFC_ASYMM_FILE} ${HEADERS_YANG_JSON} Put Service Function Paths [Documentation] Register Service Function Paths to ODL - Add Elements To URI From File ${SFP_PATH} ${SFP_ASYMM_FILE} ${HEADERS_YANG_JSON} + Add Elements To URI From File And Verify ${SFP_PATH} ${SFP_ASYMM_FILE} ${HEADERS_YANG_JSON} Put Tunnels [Documentation] Send tunnel augmentation to ODL ${json_to_edit} OperatingSystem.Get File ${TUNNELS_FILE} ${edited_json} Replace String ${json_to_edit} _CLASSIFIER1 ${GBPSFC1} ${edited_json} Replace String ${edited_json} _CLASSIFIER2 ${GBPSFC6} - ${resp} RequestsLibrary.Put Request session ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON} - Should Be Equal As Strings ${resp.status_code} 200 + Add Elements To URI And Verify ${TUNNELS_PATH} ${edited_json} ${HEADERS_YANG_JSON} Put Tenant [Documentation] Send Tenant Data to ODL - Add Elements To URI From File ${TENANT_PATH} ${TENANT_ASYMM_FILE} ${HEADERS_YANG_JSON} + Add Elements To URI From File And Verify ${TENANT_PATH} ${TENANT_ASYMM_FILE} ${HEADERS_YANG_JSON} Register Endpoints [Documentation] Endpoints registration @{endpoint_files} = OperatingSystem.List Files In Directory ${ENDPOINTS_ASYMM_DIR} vethl*.*json absolute : FOR ${endpoint_file} IN @{endpoint_files} \ Post Elements To URI From File ${ENDPOINT_REG_PATH} ${endpoint_file} ${HEADERS_YANG_JSON} + ${resp} RequestsLibrary.Get Request session ${ENDPOINTS_OPER_PATH} + Log ${resp.content} \ No newline at end of file