blob: 6a019624c49a8627ce3f1773cb644525a4f4610e [file] [log] [blame]
fujinhuadcb405e2017-09-06 16:43:41 +08001*** settings ***
ying.yunlong4f7282b2017-09-28 11:08:29 +08002Resource ../../common.robot
fujinhuadcb405e2017-09-06 16:43:41 +08003Library Collections
4Library RequestsLibrary
5Library OperatingSystem
6Library json
ying.yunlong4f7282b2017-09-28 11:08:29 +08007Library HttpLibrary.HTTP
fujinhuadcb405e2017-09-06 16:43:41 +08008
9*** Variables ***
ying.yunlong168b0022017-09-28 11:43:25 +080010@{return_ok_list}= 200 201 202 204
fujinhuadcb405e2017-09-06 16:43:41 +080011${queryswagger_url} /api/vnflcm/v1/swagger.json
ying.yunlong3d3f4322017-09-26 15:39:58 +080012${create_vnf_url} /api/vnflcm/v1/vnf_instances
ying.yunlonge08e1b62017-09-26 16:33:53 +080013${delete_vnf_url} /api/vnflcm/v1/vnf_instances
ying.yunlong3d3f4322017-09-26 15:39:58 +080014
15#json files
ying.yunlong168b0022017-09-28 11:43:25 +080016${create_vnf_json} ${SCRIPTS}/../tests/vfc/gvnfm-vnflcm/jsoninput/create_vnf.json
17
18#global variables
19${vnfInstId}
fujinhuadcb405e2017-09-06 16:43:41 +080020
21*** Test Cases ***
fujinhua441febc2017-09-08 13:58:29 +080022VnflcmSwaggerTest
ying.yunlong3d3f4322017-09-26 15:39:58 +080023 [Documentation] query swagger info vnflcm by MSB
fujinhua441febc2017-09-08 13:58:29 +080024 ${headers} Create Dictionary Content-Type=application/json Accept=application/json
ying.yunlong168b0022017-09-28 11:43:25 +080025 Create Session web_session http://${VNFLCM_IP}:8801 headers=${headers}
fujinhua441febc2017-09-08 13:58:29 +080026 ${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']}
ying.yunlong168b0022017-09-28 11:43:25 +080031 Should Be Equal ${swagger_version} 2.0