2 Suite Setup Run keywords Check k8splugin API Docker Container Created header Created session
3 Library OperatingSystem
4 Library RequestsLibrary
10 [Template] Post template
11 /v1/rb/definition create_rbdefinition.json
14 [Template] Get template
16 /v1/rb/definition/7eb09e38-4363-9942-1234-3beb2e95fd85
19 [Template] Delete template
20 /v1/rb/definition/7eb09e38-4363-9942-1234-3beb2e95fd85
24 Create Session multicloud_k8s_session http://${SERVICE_IP}:${SERVICE_PORT}
25 Set Suite Variable ${suite_multicloud_k8s_session} multicloud_k8s_session
28 ${headers}= Create Dictionary Content-Type=application/json Accept=application/json
29 Set Suite Variable ${suite_headers} ${headers}
32 [Documentation] Deletes from Definition
34 ${resp}= Delete Request ${suite_multicloud_k8s_session} ${topic} headers=${suite_headers}
35 Log To Console *********************
36 Log To Console response = ${resp}
37 Log To Console body = ${resp.text}
38 Should Be Equal As Integers ${resp.status_code} 204
41 [Documentation] Create A Definition
42 [Arguments] ${topic} ${file}
43 ${data} Get Binary File ${CURDIR}${/}data${/}${file}
44 ${resp}= Post Request ${suite_multicloud_k8s_session} ${topic} data=${data} headers=${suite_headers}
45 Log To Console *********************
46 Log To Console response = ${resp}
47 Log To Console body = ${resp.text}
48 Should Be Equal As Integers ${resp.status_code} 201
51 [Documentation] Gets from Definition
53 ${resp}= Get Request ${suite_multicloud_k8s_session} ${topic} headers=${suite_headers}
54 Log To Console *********************
55 Log To Console response = ${resp}
56 Log To Console body = ${resp.text}
57 Should Be Equal As Integers ${resp.status_code} 200
59 Check k8splugin API Docker Container
60 [Documentation] Checks if k8splugin docker container is running
61 ${rc} ${output}= Run and Return RC and Output docker ps
62 Log To Console *********************
63 Log To Console retrurn_code = ${rc}
64 Log To Console output = ${output}
65 Should Be Equal As Integers ${rc} 0
66 Should Contain ${output} nexus3.onap.org:10001/onap/multicloud/k8s