diff --git a/src/server_mgr_main.py b/src/server_mgr_main.py index cd190fba..c44fdb36 100755 --- a/src/server_mgr_main.py +++ b/src/server_mgr_main.py @@ -810,6 +810,12 @@ def validate_smgr_put(self, validation_data, request, data=None, for item in remove_list: data.pop(item, None) + if 'parameters' in data and obj_name == 'cluster': + if 'provision' not in data['parameters']: + msg = ("Old Parameters format is no longer supported for cluster parameters. Please use the new format") + self._smgr_log.log(self._smgr_log.ERROR,msg) + self.log_and_raise_exception(msg) + if 'roles' in data: if 'storage-compute' in data['roles'] and 'compute' not in data['roles']: msg = "role 'storage-compute' needs role 'compute' in provision file" @@ -861,7 +867,7 @@ def validate_non_openstack_cluster(self, cluster_id): else: msg = "Cluster with only Openstack role is supported only with new cluster params format with Openstack section\n" self.log_and_raise_exception(msg) - configured_external_keystone_params = cluster_openstack_params.get("keystone", None) + configured_external_keystone_params = cluster_openstack_params.get("keystone", {}) if configured_external_keystone_params: configured_external_keystone_ip = configured_external_keystone_params.get("ip", None) else: @@ -3856,7 +3862,7 @@ def storage_get_control_network_mask( server_params = server.get('parameters', {}) cluster_openstack_prov_params = ( cluster_params.get("provision", {})).get("openstack", {}) - configured_external_keystone_params = cluster_openstack_prov_params.get("keystone", None) + configured_external_keystone_params = cluster_openstack_prov_params.get("keystone", {}) configured_external_keystone_ip = configured_external_keystone_params.get("ip", None) openstack_ip = '' self_ip = server.get("ip_address", "") @@ -3979,7 +3985,7 @@ def build_calculated_cluster_params( # Build mysql_allowed_hosts list contrail_ha_params = cluster_contrail_prov_params.get("ha", {}) openstack_ha_params = cluster_openstack_prov_params.get("ha", {}) - configured_external_keystone_params = cluster_openstack_prov_params.get("keystone", None) + configured_external_keystone_params = cluster_openstack_prov_params.get("keystone", {}) configured_external_keystone_ip = configured_external_keystone_params.get("ip", None) mysql_allowed_hosts = [] internal_vip = openstack_ha_params.get("internal_vip", None)