diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-11-23 14:23:05 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-11-23 14:23:05 -0500 |
commit | 11c29f01724258ed21ee41f3df790a6d8d110ec0 (patch) | |
tree | 58105eb240a79f2d5345b766895e784bb6bee7c7 /roles | |
parent | 2f40603022b55e9986422b9467949aae340bb6ab (diff) | |
parent | 6f64159147a99f5b514bd48047a038c15692928b (diff) | |
download | openshift-11c29f01724258ed21ee41f3df790a6d8d110ec0.tar.gz openshift-11c29f01724258ed21ee41f3df790a6d8d110ec0.tar.bz2 openshift-11c29f01724258ed21ee41f3df790a6d8d110ec0.tar.xz openshift-11c29f01724258ed21ee41f3df790a6d8d110ec0.zip |
Merge pull request #960 from kwoodson/httptestfix
Fixing the step parameters with a "no" when not passed with that key
Diffstat (limited to 'roles')
-rw-r--r-- | roles/lib_zabbix/library/zbx_httptest.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/lib_zabbix/library/zbx_httptest.py b/roles/lib_zabbix/library/zbx_httptest.py index 96733b3d1..6b28117ad 100644 --- a/roles/lib_zabbix/library/zbx_httptest.py +++ b/roles/lib_zabbix/library/zbx_httptest.py @@ -131,6 +131,14 @@ def steps_equal(zab_steps, user_steps): return True +def process_steps(steps): + '''Preprocess the step parameters''' + for idx, step in enumerate(steps): + if not step.has_key('no'): + step['no'] = idx + 1 + + return steps + # The branches are needed for CRUD and error handling # pylint: disable=too-many-branches def main(): @@ -218,7 +226,7 @@ def main(): 'hostid': hostid, 'agent': module.params['agent'], 'retries': module.params['retries'], - 'steps': module.params['steps'], + 'steps': process_steps(module.params['steps']), 'applicationid': get_app_id(zapi, module.params['application']), 'delay': module.params['interval'], 'verify_host': get_verify_host(module.params['verify_host']), |