3 Library RequestsLibrary
4 Library OperatingSystem
8 Distribute Service Template
9 Create Session sdc_controller_session http://${REPO_IP}:8085
10 ${data}= Get Binary File ${CURDIR}${/}data${/}serviceBasicVfCnfnotification.json
11 &{headers}= Create Dictionary Authorization=Basic bXNvX2FkbWluOnBhc3N3b3JkMSQ= resource-location=/distribution-test-zip/unzipped/ Content-Type=application/json Accept=application/json
12 ${resp}= Post Request sdc_controller_session /test/treatNotification/v1 data=${data} headers=${headers}
13 Log To Console Received status code: ${resp.status_code}
14 Run Keyword If '${resp.status_code}' == '200' log to console \nexecuted with expected result
15 Should Be Equal As Strings '${resp.status_code}' '200'
19 Create Session api_handler_session http://${REPO_IP}:8080
20 ${data}= Get Binary File ${CURDIR}${/}data${/}macroflow.json
21 &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json
22 ${service_instantiation_request}= Post Request api_handler_session /onap/so/infra/serviceInstantiation/v7/serviceInstances data=${data} headers=${headers}
23 Log To Console Received status code: ${service_instantiation_request.status_code}
24 Run Keyword If '${service_instantiation_request.status_code}' == '202' log to console \nexecuted with expected result
25 Should Be Equal As Strings '${service_instantiation_request.status_code}' '202'