diff options
Diffstat (limited to 'deploy/cloud')
-rw-r--r-- | deploy/cloud/configure_environment.py | 11 | ||||
-rw-r--r-- | deploy/cloud/configure_settings.py | 20 |
2 files changed, 19 insertions, 12 deletions
diff --git a/deploy/cloud/configure_environment.py b/deploy/cloud/configure_environment.py index ed89fa600..1914d7e3e 100644 --- a/deploy/cloud/configure_environment.py +++ b/deploy/cloud/configure_environment.py @@ -46,14 +46,11 @@ class ConfigureEnvironment(object): delete(self.yaml_config_dir) create_dir_if_not_exists(self.yaml_config_dir) env_name = self.dea.get_env_name() - env_mode = self.dea.get_env_mode() env_net_segment_type = self.dea.get_env_net_segment_type() - log('Creating environment %s release %s, mode %s, network-mode neutron' - ', net-segment-type %s' - % (env_name, self.release_id, env_mode, env_net_segment_type)) - exec_cmd('fuel env create --name %s --release %s --mode %s ' - '--network-mode neutron --net-segment-type %s' - % (env_name, self.release_id, env_mode, env_net_segment_type)) + log('Creating environment %s release %s net-segment-type %s' + % (env_name, self.release_id, env_net_segment_type)) + exec_cmd('fuel env create --name %s --release %s --net-segment-type %s' + % (env_name, self.release_id, env_net_segment_type)) if not self.env_exists(env_name): err('Failed to create environment %s' % env_name) diff --git a/deploy/cloud/configure_settings.py b/deploy/cloud/configure_settings.py index 052634f99..b60a60fd1 100644 --- a/deploy/cloud/configure_settings.py +++ b/deploy/cloud/configure_settings.py @@ -54,12 +54,22 @@ class ConfigureSettings(object): backup(settings_yaml) settings = self.dea.get_property('settings') # Copy fuel defined plugin_id's to user defined settings + # From Fuel 8.0 chosen_id was added because it is now + # possible to install many version of the same plugin + # but we will install only one version for plugin in orig_dea['editable']: - if 'metadata' in orig_dea['editable'][plugin] and 'plugin_id' in orig_dea['editable'][plugin]['metadata']: - if not plugin in settings['editable']: - settings['editable'][plugin] = orig_dea['editable'][plugin] - else: - settings['editable'][plugin]["metadata"]["plugin_id"] = orig_dea['editable'][plugin]["metadata"]["plugin_id"] + if 'metadata' in orig_dea['editable'][plugin]: + if 'plugin_id' in orig_dea['editable'][plugin]['metadata']: + if not plugin in settings['editable']: + settings['editable'][plugin] = orig_dea['editable'][plugin] + else: + settings['editable'][plugin]["metadata"]["plugin_id"] = orig_dea['editable'][plugin]["metadata"]["plugin_id"] + elif 'chosen_id' in orig_dea['editable'][plugin]['metadata']: + if not plugin in settings['editable']: + settings['editable'][plugin] = orig_dea['editable'][plugin] + else: + settings['editable'][plugin]['metadata']['chosen_id'] = orig_dea['editable'][plugin]['metadata']['chosen_id'] + settings['editable'][plugin]['metadata']['versions'][0]['metadata']['plugin_id'] = orig_dea['editable'][plugin]['metadata']['versions'][0]['metadata']['plugin_id'] with io.open(settings_yaml, 'w') as stream: yaml.dump(settings, stream, default_flow_style=False) |