Authored by chunhua.zhang

add

... ... @@ -7,7 +7,6 @@
health_check:
name: 获取首页资源位
url: "http://127.0.0.1:8080/gateway/operations/api/v5/resource/home?app_version=6.7.0&gender=1,3&os_version=android8.0.0:ALP-AL00&client_type=android&yh_channel=1&uid=50892268&v=7&fromPage=iFP_Home&limit=100&session_key=bc8ff6db8cd0ab303cad58f225fe51df&business_line=yohobuy&screen_size=1080x1920&client_secret=64433041d137d825bc4536ba3ad3646a&page=1&physical_channel=1&udid=868035035832085db637f6cb043d7e0&content_code=9cb6138be8e60c96f48107da481816c2"
schema: '{ "type" : "object", "properties" : { "code" : {"type" : "number", "minimum": 200, "maximum": 201} } }'
register: result
- debug:
var: result
... ... @@ -22,7 +21,6 @@
url: "http://127.0.0.1:8083/product/product/queryProductBasicInfo"
content_type: json
params: '{"param":439486}'
schema: ' { "type" : "object", "properties" : { "erpProductId" : {"type" : "number"} } }'
register: pro_ret
- debug:
var: pro_ret
... ...
... ... @@ -85,14 +85,13 @@ def run_module():
name = module.params['name']
content_type = module.params['content_type']
params = module.params['params']
schema = module.params['schema']
result['check_name'] = module.params['name']
result['url'] = module.params['url']
result['changed'] = False
# check result
ret = check_http_status(url, content_type, schema, params)
ret = check_http_status(url, content_type, params)
if ret['code'] != 200:
module.fail_json(msg='Check Failed: http code:%i, json code: %i, err: %s' % (ret['http_code'], ret['code'], ret['err']), **result)
result['response'] = ret
... ...