blob: cf3d12bc368a7a9ee8d1ab20a9c4238ad52c1389 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** settings ***
2Resource ../../common.robot
3Library Collections
4Library RequestsLibrary
5Library OperatingSystem
6Library json
7Library HttpLibrary.HTTP
8
9*** Variables ***
10@{return_ok_list}= 200 201 202 204
11${queryswagger_url} /api/vnflcm/v1/swagger.json
12${create_vnf_url} /api/vnflcm/v1/vnf_instances
13${delete_vnf_url} /api/vnflcm/v1/vnf_instances
14
15#json files
16${create_vnf_json} ${SCRIPTS}/../tests/vfc/gvnfm-vnflcm/jsoninput/create_vnf.json
17
18#global variables
19${vnfInstId}
20
21*** Test Cases ***
22VnflcmSwaggerTest
23 [Documentation] query swagger info vnflcm by MSB
24 ${headers} Create Dictionary Content-Type=application/json Accept=application/json
25 Create Session web_session http://${VNFLCM_IP}:8801 headers=${headers}
26 ${resp}= Get Request web_session ${queryswagger_url}
27 ${responese_code}= Convert To String ${resp.status_code}
28 List Should Contain Value ${return_ok_list} ${responese_code}
29 ${response_json} json.loads ${resp.content}
30 ${swagger_version}= Convert To String ${response_json['swagger']}
31 Should Be Equal ${swagger_version} 2.0