From b9104248ef69a0bec4da434e8043e815f8e45986 Mon Sep 17 00:00:00 2001 From: benzelleroehr Date: Mon, 17 Mar 2025 13:57:56 +0100 Subject: [PATCH] Chore: Update deprecated Request syntax Change-Id: I5bac6121c5bd15ed69353d242744ae91c883f497 Issue-ID: INT-2303 Signed-off-by: benzelleroehr --- robot/resources/clamp_interface.robot | 4 ++-- robot/resources/consul_interface.robot | 4 ++-- robot/resources/dcae/deployment.robot | 6 +++--- robot/resources/dcae/ves_interface.robot | 2 +- robot/resources/dmaap/dr_interface.robot | 2 +- robot/resources/dmaap/mr_interface.robot | 16 ++++++++-------- robot/resources/holmes_interface.robot | 2 +- robot/resources/modeling_interface.robot | 2 +- robot/resources/multicloud_interface.robot | 2 +- robot/resources/nbi_interface.robot | 2 +- robot/resources/oof_interface.robot | 6 +++--- robot/resources/openstack/keystone_interface.robot | 2 +- robot/resources/portal-sdk/portalDef.robot | 2 +- robot/resources/sdnc_interface.robot | 2 +- robot/resources/so/direct_instantiate.robot | 2 +- robot/resources/test_templates/cmpv2.robot | 2 +- .../pnf_registration_without_SO_template.robot | 4 ++-- robot/resources/usecases/5gbulkpm_helm_interface.robot | 8 ++++---- robot/resources/vfc_interface.robot | 2 +- robot/resources/vnfsdk_interface.robot | 4 ++-- robot/testsuites/usecases/5gson.robot | 12 ++++++------ 21 files changed, 44 insertions(+), 44 deletions(-) diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot index bf236a7d..d3856cb8 100644 --- a/robot/resources/clamp_interface.robot +++ b/robot/resources/clamp_interface.robot @@ -84,7 +84,7 @@ Run CLAMP HTTPS Put Request @{client_certs}= Create List ${CLAMP_CLIENT_CERT} ${CLAMP_CLIENT_KEY} ${session}= Create Client Cert Session session ${CLAMP_ENDPOINT} client_certs=@{client_certs} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= Put Request session ${data_path} data=${data} headers=${headers} + ${resp}= Put On Session session ${data_path} data=${data} headers=${headers} Should Be Equal As Integers ${resp.status_code} 200 Log ${resp.json()} [Return] ${resp} @@ -94,7 +94,7 @@ Run CLAMP HTTPS Get Request [Arguments] ${data_path} @{client_certs}= Create List ${CLAMP_CLIENT_CERT} ${CLAMP_CLIENT_KEY} ${session}= Create Client Cert Session session ${CLAMP_ENDPOINT} client_certs=@{client_certs} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log ${resp.json()} [Return] ${resp} diff --git a/robot/resources/consul_interface.robot b/robot/resources/consul_interface.robot index ca0244b7..ae5e02d9 100644 --- a/robot/resources/consul_interface.robot +++ b/robot/resources/consul_interface.robot @@ -17,7 +17,7 @@ Run Consul Get Request [Arguments] ${data_path} ${session}= Create Session consul ${CONSUL_ENDPOINT} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= Get Request consul ${data_path} headers=${headers} + ${resp}= Get On Session consul ${data_path} headers=${headers} Log Received response from tcagen2 ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp} @@ -27,7 +27,7 @@ Run Consul Put Request [Arguments] ${data_path} ${data} ${session}= Create Session consul ${CONSUL_ENDPOINT} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= Put Request consul ${data_path} data=${data} headers=${headers} + ${resp}= Put On Session consul ${data_path} data=${data} headers=${headers} Log Received response from consul ${resp.text} [Return] ${resp} diff --git a/robot/resources/dcae/deployment.robot b/robot/resources/dcae/deployment.robot index 4c8098cd..a0466321 100644 --- a/robot/resources/dcae/deployment.robot +++ b/robot/resources/dcae/deployment.robot @@ -15,7 +15,7 @@ Deploy Service ${headers}= Create Dictionary content-type=application/json ${deployment_data}= Set Variable ${inputs} ${session}= Create Session deployment_session ${DEPLOYMENT_SERVER} - ${resp}= Put Request deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name} data=${deployment_data} headers=${headers} + ${resp}= Put On Session deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name} data=${deployment_data} headers=${headers} ${operationLink} Set Variable ${resp.json().get('links').get('status')} ${operationId} Fetch From Right ${operationLink} / Run Keyword If "${check_deployment_status}"=="true" Check Deployment Status ${deployment_name} ${operationId} ${wait_time} @@ -29,7 +29,7 @@ Deployment Status [Arguments] ${deployment_name} ${operationId} Disable Warnings ${session}= Create Session deployment_session ${DEPLOYMENT_SERVER} - ${resp}= Get Request deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name}/operation/${operationId} + ${resp}= Get On Session deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name}/operation/${operationId} ${status} Set Variable ${resp.json().get('status')} Should Be Equal As Strings ${status} succeeded [Return] ${status} @@ -38,5 +38,5 @@ Undeploy Service [Arguments] ${deployment_name} Disable Warnings ${session}= Create Session deployment_session ${DEPLOYMENT_SERVER} - ${resp}= Delete Request deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name} + ${resp}= Delete On Session deployment_session /${DEPLOYMENT_ENDPOINT}/${deployment_name} [Return] ${resp} diff --git a/robot/resources/dcae/ves_interface.robot b/robot/resources/dcae/ves_interface.robot index 89abbcdc..511b95d1 100644 --- a/robot/resources/dcae/ves_interface.robot +++ b/robot/resources/dcae/ves_interface.robot @@ -38,7 +38,7 @@ Send Event to VES Collector ${event_from_file}= OperatingSystem.Get File ${event} ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD} ${session}= Create Session ves ${VES_HEALTH_CHECK_PATH} auth=${auth} - ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${event_from_file} headers=${headers} + ${resp}= Post On Session ves ${VES_LISTENER_PATH} data=${event_from_file} headers=${headers} Should Be Equal As Strings ${resp.status_code} 202 Topic Validate diff --git a/robot/resources/dmaap/dr_interface.robot b/robot/resources/dmaap/dr_interface.robot index 510bc6f3..f136e876 100755 --- a/robot/resources/dmaap/dr_interface.robot +++ b/robot/resources/dmaap/dr_interface.robot @@ -19,5 +19,5 @@ Run DR Get Request [Documentation] Runs DR Get request [Arguments] ${data_path} ${session}= Create Session session ${DR_ENDPOINT} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} [Return] ${resp} diff --git a/robot/resources/dmaap/mr_interface.robot b/robot/resources/dmaap/mr_interface.robot index 59830892..2746eb7a 100644 --- a/robot/resources/dmaap/mr_interface.robot +++ b/robot/resources/dmaap/mr_interface.robot @@ -72,7 +72,7 @@ Run MR Auth Post Request ${xAuth}= Set Variable ${id_key}:${signature} ${headers}= Create Dictionary Content-Type=application/json X-CambriaAuth=${xAuth} X-CambriaDate=${time} ${session}= Create Session mr ${MR_ENDPOINT} - ${resp}= Post Request mr ${data_path} headers=${headers} data=${data} + ${resp}= Post On Session mr ${data_path} headers=${headers} data=${data} ${status_string}= Convert To String ${resp.status_code} Should Match Regexp ${status_string} ^(204|200)$ Log Received response from message router ${resp.text} @@ -90,7 +90,7 @@ Run MR Auth Put Request ${xAuth}= Set Variable ${id_key}:${signature} ${headers}= Create Dictionary Content-Type=application/json X-CambriaAuth=${xAuth} X-CambriaDate=${time} ${session}= Create Session mr ${MR_ENDPOINT} - ${resp}= Put Request mr ${data_path} headers=${headers} data=${data} + ${resp}= Put On Session mr ${data_path} headers=${headers} data=${data} Should Be Equal As Strings ${resp.status_code} 200 Log Received response from message router ${resp.text} [Return] ${resp} @@ -102,7 +102,7 @@ Run MR Auth Get Request ${session}= Create Session mr ${MR_ENDPOINT} auth=${auth} ${uuid}= Generate UUID4 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} - ${resp}= Get Request mr ${data_path} headers=${headers} + ${resp}= Get On Session mr ${data_path} headers=${headers} Log Received response from message router ${resp.text} [Return] ${resp} @@ -113,7 +113,7 @@ Run MR Auth Post Request (User And Pass) ${session}= Create Session mr ${MR_ENDPOINT} auth=${auth} ${uuid}= Generate UUID4 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} - ${resp}= Post Request mr ${data_path} headers=${headers} data=${data} + ${resp}= Post On Session mr ${data_path} headers=${headers} data=${data} ${status_string}= Convert To String ${resp.status_code} Should Match Regexp ${status_string} ^(204|200)$ Log Received response from message router ${resp.text} @@ -125,7 +125,7 @@ Run MR Get Request ${session}= Create Session mr ${MR_ENDPOINT} ${uuid}= Generate UUID4 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} - ${resp}= Get Request mr ${data_path} headers=${headers} + ${resp}= Get On Session mr ${data_path} headers=${headers} Log Received response from message router ${resp.text} [Return] ${resp} @@ -139,7 +139,7 @@ Run MR Post Request ${data}= Templating.Apply Template mr ${MR_PUBLISH_TEMPLATE} ${dict} ${uuid}= Generate UUID4 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} - ${resp}= Post Request mr ${data_path} data=${data} headers=${headers} + ${resp}= Post On Session mr ${data_path} data=${data} headers=${headers} Log Received response from message router ${resp.text} [Return] ${resp} @@ -149,6 +149,6 @@ Run MR Delete Request ${session}= Create Session mr ${MR_ENDPOINT} ${uuid}= Generate UUID4 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} - ${resp}= Delete Request mr ${data_path} headers=${headers} + ${resp}= Delete On Session mr ${data_path} headers=${headers} Log Received response from message router ${resp.status_code} - [Return] ${resp} \ No newline at end of file + [Return] ${resp} diff --git a/robot/resources/holmes_interface.robot b/robot/resources/holmes_interface.robot index 73dec481..c263efb4 100644 --- a/robot/resources/holmes_interface.robot +++ b/robot/resources/holmes_interface.robot @@ -24,7 +24,7 @@ Run Holmes Get Request [Arguments] ${endpoint} ${data_path} [Documentation] Runs Holmes Get request ${session}= Create Session holmes ${endpoint} - ${resp}= Get Request holmes ${data_path} + ${resp}= Get On Session holmes ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log Received response from server ${resp.text} [Return] ${resp} diff --git a/robot/resources/modeling_interface.robot b/robot/resources/modeling_interface.robot index 0d0b9171..74a53c1a 100644 --- a/robot/resources/modeling_interface.robot +++ b/robot/resources/modeling_interface.robot @@ -20,7 +20,7 @@ Run Modeling Get Request [Documentation] Runs Modeling Get request [Arguments] ${data_path} ${session}= Create Session session ${MODEL_PARSER_ENDPOINT} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log Received response from Modeling ${resp.text} [Return] ${resp} diff --git a/robot/resources/multicloud_interface.robot b/robot/resources/multicloud_interface.robot index a810e64d..e45b99f5 100644 --- a/robot/resources/multicloud_interface.robot +++ b/robot/resources/multicloud_interface.robot @@ -69,7 +69,7 @@ Run MultiCloud Get Request [Documentation] Runs MultiCloud Get request [Arguments] ${endpoint} ${data_path} ${session}= Create Session session ${endpoint} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log Received response from MultiCloud ${resp.text} [Return] ${resp} diff --git a/robot/resources/nbi_interface.robot b/robot/resources/nbi_interface.robot index c05e4c7c..a7dcf482 100644 --- a/robot/resources/nbi_interface.robot +++ b/robot/resources/nbi_interface.robot @@ -20,7 +20,7 @@ Run NBI Get Request [Documentation] Runs NBI Get request [Arguments] ${data_path} ${session}= Create Session session ${NBI_ENDPOINT} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log Received response from NBI ${resp.text} ${json}= Set Variable ${resp.json()} diff --git a/robot/resources/oof_interface.robot b/robot/resources/oof_interface.robot index cd235e5a..1147f993 100644 --- a/robot/resources/oof_interface.robot +++ b/robot/resources/oof_interface.robot @@ -33,7 +33,7 @@ Run OOF-Homing Get Request [Documentation] Runs OOF-Homing Get request [Arguments] ${data_path} ${session}= Create Session session ${OOF_HOMING_ENDPOINT} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log Received response from OOF-Homing ${resp.text} [Return] ${resp} @@ -45,7 +45,7 @@ RUN OOF-Homing SendPlanWithWrongVersion ${auth}= Create List ${GLOBAL_OOF_HOMING_USERNAME} ${GLOBAL_OOF_HOMING_PASSWORD} ${session}= Create Session session ${OOF_HOMING_ENDPOINT} auth=${auth} &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} + ${resp}= Post On Session optf-cond /v1/plans data=${data} headers=${headers} Log ********************* Log response = ${resp} Log body = ${resp.text} @@ -64,7 +64,7 @@ Run OOF-OSDF Get Request [Documentation] Runs OOF-OSDF Get request [Arguments] ${data_path} ${session}= Create Session session ${OOF_OSDF_ENDPOINT} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log Received response from OOF-OSDF ${resp.text} [Return] ${resp} diff --git a/robot/resources/openstack/keystone_interface.robot b/robot/resources/openstack/keystone_interface.robot index 487d8aff..f3285a8b 100644 --- a/robot/resources/openstack/keystone_interface.robot +++ b/robot/resources/openstack/keystone_interface.robot @@ -49,7 +49,7 @@ Get KeystoneAPIVersion ${session}= Create Session keystone ${url} verify=True ${uuid}= Generate UUID4 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= Get Request keystone / headers=${headers} + ${resp}= Get On Session keystone / headers=${headers} Log Received response from keystone ${resp.text} Should Be Equal As Strings ${resp.status_code} 300 ${versions}= Get From Dictionary ${resp.json()} versions diff --git a/robot/resources/portal-sdk/portalDef.robot b/robot/resources/portal-sdk/portalDef.robot index a2ea59e8..e3b8badd 100644 --- a/robot/resources/portal-sdk/portalDef.robot +++ b/robot/resources/portal-sdk/portalDef.robot @@ -714,7 +714,7 @@ Enhanced Notification on ONAP Portal [Arguments] ${data_path} ${data} ${session}= Create Session portal ${PORTAL_URL} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json Authorization=Basic amlyYTpfcGFzcw== username=jira password=_pass - ${resp}= Post Request portal ${data_path} data=${data} headers=${headers} + ${resp}= Post On Session portal ${data_path} data=${data} headers=${headers} [Return] ${resp} Notification on ONAP Portal diff --git a/robot/resources/sdnc_interface.robot b/robot/resources/sdnc_interface.robot index aac07468..56c7f93f 100644 --- a/robot/resources/sdnc_interface.robot +++ b/robot/resources/sdnc_interface.robot @@ -60,7 +60,7 @@ Run SDNC Delete Request Disable Warnings ${session}= Create Session SDNC ${SDNC_REST_ENDPOINT} auth=${GLOBAL_SDNC_AUTHENTICATION} ${headers}= Create Dictionary Accept=*/* Accept-Encoding=gzip, deflate, br Connection=keep-alive - ${resp}= Delete Request SDNC ${URL} data=${None} headers=${headers} + ${resp}= Delete On Session SDNC ${URL} data=${None} headers=${headers} [Return] ${resp} Preload Vcpe Networks diff --git a/robot/resources/so/direct_instantiate.robot b/robot/resources/so/direct_instantiate.robot index 3a8c6e74..f8d286d3 100755 --- a/robot/resources/so/direct_instantiate.robot +++ b/robot/resources/so/direct_instantiate.robot @@ -70,7 +70,7 @@ CDS Service Instantiate ${session}= Create Session cds ${GLOBAL_CCSDK_CDS_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CCSDK_CDS_BLUEPRINT_PROCESSOR_IP_ADDR}:${GLOBAL_CCSDK_CDS_HEALTH_SERVER_PORT} ${data}= Create Dictionary loadModelType=true loadResourceDictionary=true loadCBA=true ${headers}= Create Dictionary Content-Type=application/json Authorization=Basic ${GLOBAL_CDS_AUTH} - ${resp}= Post Request cds ${CDS_BOOTSTRAP_PATH} data=${data} headers=${headers} + ${resp}= Post On Session cds ${CDS_BOOTSTRAP_PATH} data=${data} headers=${headers} ${status_string}= Convert To String ${resp.status_code} Should Match Regexp ${status_string} ^(200|201|202)$ ${time_now}= Get Time diff --git a/robot/resources/test_templates/cmpv2.robot b/robot/resources/test_templates/cmpv2.robot index 0b317e9e..f9a2cb38 100644 --- a/robot/resources/test_templates/cmpv2.robot +++ b/robot/resources/test_templates/cmpv2.robot @@ -60,7 +60,7 @@ VES Client send single VES event ${data}= Templating.Apply Template pnf ${pnf_simulator_single_event} ${single_event} ${session}= Create Session pnf_sim ${pnf_sim_endpoint} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${post_resp}= Post Request pnf_sim ${single_event_data_path} data=${data} headers=${headers} + ${post_resp}= Post On Session pnf_sim ${single_event_data_path} data=${data} headers=${headers} Log PNF registration request ${data} Should Be Equal As Strings ${post_resp.status_code} ${http_reposnse_code} Log VES has accepted event with status code ${post_resp.status_code} diff --git a/robot/resources/test_templates/pnf_registration_without_SO_template.robot b/robot/resources/test_templates/pnf_registration_without_SO_template.robot index e3ecaaa4..4ea8bf50 100644 --- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot +++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot @@ -98,7 +98,7 @@ Run VES HTTP Post Request ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD} ${session}= Create Session ves ${VES_ENDPOINT} auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${post_resp}= Post Request ves ${VES_data_path} data=${data} headers=${headers} + ${post_resp}= Post On Session ves ${VES_data_path} data=${data} headers=${headers} Log PNF integration request ${data} Should Be Equal As Strings ${post_resp.status_code} 202 Log VES has accepted event with status code ${post_resp.status_code} @@ -145,4 +145,4 @@ Send and verify VES integration request in SO and A&AI Instantiate PNF_macro service Teardown [Arguments] ${catalog_service_id} ${catalog_resource_ids} ${PNF_entry_dict} Teardown Models ${catalog_service_id} ${catalog_resource_ids} - Cleanup PNF entry in A&AI ${PNF_entry_dict} \ No newline at end of file + Cleanup PNF entry in A&AI ${PNF_entry_dict} diff --git a/robot/resources/usecases/5gbulkpm_helm_interface.robot b/robot/resources/usecases/5gbulkpm_helm_interface.robot index e02f04dd..483d8369 100644 --- a/robot/resources/usecases/5gbulkpm_helm_interface.robot +++ b/robot/resources/usecases/5gbulkpm_helm_interface.robot @@ -79,10 +79,10 @@ Send File Ready Event to VES Collector ${fileready}= OperatingSystem.Get File ${JSON_DATA_FILE} ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD} ${session}= Create Session ves ${VES_HEALTH_CHECK_PATH} auth=${auth} - ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${fileready} headers=${headers} + ${resp}= Post On Session ves ${VES_LISTENER_PATH} data=${fileready} headers=${headers} Should Be Equal As Strings ${resp.status_code} 202 ${VES_FILE_READY_NOTIFICATION} Set Variable {"event":{"commonEventHeader":{"version":"4.0.1","vesEventListenerVersion":"7.0.1","domain":"notification","eventName":"Noti_RnNode-Ericsson_FileReady","eventId":"FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1","lastEpochMicrosec":8745745764578,"priority":"Normal","reportingEntityName":"otenb5309","sequence":0,"sourceName":"oteNB5309","startEpochMicrosec":8745745764578,"timeZoneOffset":"UTC+05.30"},"notificationFields":{"changeIdentifier":"PM_MEAS_FILES","changeType":"FileReady","notificationFieldsVersion":"2.0","arrayOfNamedHashMap":[{"name":"${pm_file}","hashMap":{"location":"sftp://bulkpm:bulkpm@${ONAP_HELM_RELEASE}-sftp:22/upload/${pm_file}","compression":"gzip","fileFormatType":"${file_format_type}","fileFormatVersion":"${file_format_version}"}}]}}} - ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers} + ${resp}= Post On Session ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers} Should Be Equal As Strings ${resp.status_code} 202 Upload PM Files to xNF SFTP Server @@ -233,7 +233,7 @@ Send File Ready Event to VES Collector for HTTPS Server ${headers}= Create Dictionary content-type=application/json ${auth}= Create List ${GLOBAL_DCAE_VES_USERNAME} ${GLOBAL_DCAE_VES_PASSWORD} ${session}= Create Session ves ${VES_HEALTH_CHECK_PATH} auth=${auth} - ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers} + ${resp}= Post On Session ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers} Should Be Equal As Strings ${resp.status_code} 202 @@ -253,6 +253,6 @@ Upload PM Files to xNF HTTPS Server Set to Dictionary ${fileParts} uploaded_file=${file_part} ${auth}= Create List demo demo123456! ${session}= Create Session https http://${https_server}:80 auth=${auth} - ${resp}= Post Request https /upload.php files=${fileParts} + ${resp}= Post On Session https /upload.php files=${fileParts} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${pm_file} diff --git a/robot/resources/vfc_interface.robot b/robot/resources/vfc_interface.robot index 35c6a6d5..9ef61d1f 100644 --- a/robot/resources/vfc_interface.robot +++ b/robot/resources/vfc_interface.robot @@ -62,7 +62,7 @@ Run VFC Get Request [Documentation] Runs VFC Get request [Arguments] ${endpoint} ${data_path} ${session}= Create Session session ${endpoint} - ${resp}= Get Request session ${data_path} + ${resp}= Get On Session session ${data_path} Should Be Equal As Integers ${resp.status_code} 200 Log Received response from MultiCloud ${resp.text} [Return] ${resp} diff --git a/robot/resources/vnfsdk_interface.robot b/robot/resources/vnfsdk_interface.robot index c54b330e..8d423625 100644 --- a/robot/resources/vnfsdk_interface.robot +++ b/robot/resources/vnfsdk_interface.robot @@ -18,7 +18,7 @@ Run VNFSDK Get Request [Documentation] Runs VNFSDK Get request [Arguments] ${data_path} ${session}= Create Session vnfsdk ${VNFSDK_ENDPOINT} - ${resp}= Get Request vnfsdk ${data_path} + ${resp}= Get On Session vnfsdk ${data_path} Log Received response from VNFSDK ${resp.text} [Return] ${resp} @@ -26,6 +26,6 @@ Run VNFSDK Post Request [Documentation] Runs VNFSDK Get request [Arguments] ${data_path} ${files} ${session}= Create Session vnfsdk ${VNFSDK_ENDPOINT} - ${resp}= Post Request vnfsdk ${data_path} files=${files} + ${resp}= Post On Session vnfsdk ${data_path} files=${files} Log Received response from VNFSDK ${resp} [Return] ${resp} diff --git a/robot/testsuites/usecases/5gson.robot b/robot/testsuites/usecases/5gson.robot index bf1b3b78..6b4275e6 100644 --- a/robot/testsuites/usecases/5gson.robot +++ b/robot/testsuites/usecases/5gson.robot @@ -80,13 +80,13 @@ Deploy SON Handler [Tags] 5gson ${headers}= Create Dictionary content-type=application/json ${session}= Create Session inv ${INVENTORY_SERVER} - ${resp}= Get Request inv ${INVENTORY_ENDPOINT}?typeName=k8s-sonhms + ${resp}= Get On Session inv ${INVENTORY_ENDPOINT}?typeName=k8s-sonhms ${json}= Set Variable ${resp.json()} ${serviceTypeId-sonhms} Set Variable ${json['items'][0]['typeId']} ${sonhms_inputs}= Get Binary File ${5GSON_RESOURCES_PATH}/sonhms_inputs.json ${deployment_data}= Set Variable {"serviceTypeId": "${serviceTypeId-sonhms}", "inputs": ${sonhms_inputs}} ${session}= Create Session deployment-son ${DEPLOYMENT_SERVER} - ${resp}= Put Request deployment-son /${DEPLOYMENT_ENDPOINT}/sonhms data=${deployment_data} headers=${headers} + ${resp}= Put On Session deployment-son /${DEPLOYMENT_ENDPOINT}/sonhms data=${deployment_data} headers=${headers} ${operationLink} Set Variable ${resp.json().get('links').get('status')} ${operationId} Fetch From Right ${operationLink} / Wait Until Keyword Succeeds 5 minute 20 sec Deployment Status ${DEPLOYMENT_SERVER} ${DEPLOYMENT_ENDPOINT} sonhms ${operationId} @@ -101,12 +101,12 @@ Deploy Config DB ${json_data} Convert JSON To String ${templatejson} ${headers}= Create Dictionary content-type=application/json ${session}= Create Session sftp ${INVENTORY_SERVER} - ${resp}= Post Request sftp ${INVENTORY_ENDPOINT} data=${json_data} headers=${headers} + ${resp}= Post On Session sftp ${INVENTORY_ENDPOINT} data=${json_data} headers=${headers} ${serviceTypeId-configdb}= Set Variable ${resp.json().get('typeId')} Set Global Variable ${serviceTypeId-configdb} ${deployment_data}= Set Variable {"serviceTypeId": "${serviceTypeId-configdb}" } ${session}= Create Session deployment-configdb ${DEPLOYMENT_SERVER} - ${resp}= Put Request deployment-configdb /${DEPLOYMENT_ENDPOINT}/configdb data=${deployment_data} headers=${headers} + ${resp}= Put On Session deployment-configdb /${DEPLOYMENT_ENDPOINT}/configdb data=${deployment_data} headers=${headers} ${operationLink}= Set Variable ${resp.json().get('links').get('status')} ${operationId} Fetch From Right ${operationLink} / Wait Until Keyword Succeeds 2 minute 5 sec Deployment Status ${DEPLOYMENT_SERVER} ${DEPLOYMENT_ENDPOINT} configdb ${operationId} @@ -117,7 +117,7 @@ Load Data to Config DB ${initial_dump} Get Binary File ${5GSON_RESOURCES_PATH}/dump_file.json ${headers}= Create Dictionary content-type=application/json ${session}= Create Session configdb http://configdb.onap:8080 - ${resp}= Put Request configdb ${CONFIGDB_INSERT_PATH} data=${initial_dump} headers=${headers} + ${resp}= Put On Session configdb ${CONFIGDB_INSERT_PATH} data=${initial_dump} headers=${headers} Should Be Equal As Strings ${resp.status_code} 201 Post Fault Message to VES Collector @@ -126,7 +126,7 @@ Post Fault Message to VES Collector ${headers}= Create Dictionary content-type=application/json FOR ${NBR} IN @{NEW_NBRS} ${nbr_obj} Set Variable {"targetCellId": "${NBR}", "ho": true} - ${resp} Put Request configdb ${CONFIGDB_CREATENBR_PATH}/Chn0005 headers=${headers} data=${nbr_obj} + ${resp} Put On Session configdb ${CONFIGDB_CREATENBR_PATH}/Chn0005 headers=${headers} data=${nbr_obj} Should Be Equal As Strings ${resp.status_code} 201 END ${fault_event}= Set Variable ${5GSON_RESOURCES_PATH}/son_fault.json -- 2.16.6