summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xplaybooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py4
-rw-r--r--roles/lib_zabbix/library/zbx_httptest.py10
2 files changed, 13 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py b/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
index a6721bb92..9a065fd1c 100755
--- a/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
+++ b/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
@@ -78,6 +78,10 @@ def upgrade_master_3_0_to_3_1(ansible_module, config_base, backup):
config['kubernetesMasterConfig'].pop('apiLevels')
changes.append('master-config.yaml: removed kubernetesMasterConfig.apiLevels')
+ # Add masterCA to serviceAccountConfig
+ if 'serviceAccountConfig' in config and 'masterCA' not in config['serviceAccountConfig']:
+ config['serviceAccountConfig']['masterCA'] = config['oauthConfig'].get('masterCA', 'ca.crt')
+
# Add proxyClientInfo to master-config
if 'proxyClientInfo' not in config['kubernetesMasterConfig']:
config['kubernetesMasterConfig']['proxyClientInfo'] = {
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']),