blob: 11bb6015eb04d6a489a359497a6f3900cdccf28b [file] [log] [blame]
Bartosz Gardziejewski64b0fe12020-10-06 08:12:12 +02001*** Settings ***
Bartosz Gardziejewskie8725132020-10-06 14:03:36 +02002Resource ./vnfsdk_properties.robot
3
Bartosz Gardziejewski64b0fe12020-10-06 08:12:12 +02004Library OperatingSystem
5Library Process
6Library String
7Library Collections
8Library RequestsLibrary
9Library json
10
Bartosz Gardziejewskie8725132020-10-06 14:03:36 +020011*** Keywords ***
Bartosz Gardziejewski64b0fe12020-10-06 08:12:12 +020012
Bartosz Gardziejewskie8725132020-10-06 14:03:36 +020013Validate CSAR usign Post request
14 [Documentation] Perform POST Request to vnfsdk marketplace with CSAR and execution options, in order to perfvorm CSAR validation
15 [Arguments] ${csar_name} ${execution_json}
16 ${response}= Run curl -s --location --request POST '${base_url}/vtp/executions' --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --form 'file=@${csarpath}/${csar_name}' --form 'executions=${execution_json}'
17 ${response}= String.Replace String ${response} \\n ${SPACE}
18 [Return] ${response}
Bartosz Gardziejewski64b0fe12020-10-06 08:12:12 +020019
Bartosz Gardziejewskie8725132020-10-06 14:03:36 +020020Get validation result using GET request
21 [Documentation] Perform GET request to vnfsdk marketplace with request id or execution id, in order to get that request/execution result
22 [Arguments] ${requestId}
23 ${response}= Run curl -s --location --request GET '${base_url}/vtp/executions?requestId=${requestId}' --header 'Accept: application/json'
24 ${response}= String.Replace String ${response} \\n ${SPACE}
25 [Return] ${response}