summaryrefslogtreecommitdiffstats
path: root/deploy/cloud
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/cloud')
-rw-r--r--deploy/cloud/configure_nodes.py13
-rw-r--r--deploy/cloud/configure_settings.py12
2 files changed, 22 insertions, 3 deletions
diff --git a/deploy/cloud/configure_nodes.py b/deploy/cloud/configure_nodes.py
index a456679ab..46121df62 100644
--- a/deploy/cloud/configure_nodes.py
+++ b/deploy/cloud/configure_nodes.py
@@ -30,9 +30,18 @@ class ConfigureNodes(object):
def config_nodes(self):
log('Configure nodes')
+
+ # Super dirty fix since Fuel 7 requires user defined roles to be
+ # assigned before anything else (BUG fixed in Fuel 8)!
+ for node_id, roles_blade in self.node_id_roles_dict.iteritems():
+ if "opendaylight" in roles_blade[0] or "onos" in roles_blade[0] or "contrail" in roles_blade[0]:
+ exec_cmd('fuel node set --node-id %s --role %s --env %s'
+ % (node_id, roles_blade[0], self.env_id))
+
for node_id, roles_blade in self.node_id_roles_dict.iteritems():
- exec_cmd('fuel node set --node-id %s --role %s --env %s'
- % (node_id, roles_blade[0], self.env_id))
+ if "opendaylight" not in roles_blade[0] and "onos" not in roles_blade[0] and "contrail" not in roles_blade[0]:
+ exec_cmd('fuel node set --node-id %s --role %s --env %s'
+ % (node_id, roles_blade[0], self.env_id))
self.download_deployment_config()
for node_id, roles_blade in self.node_id_roles_dict.iteritems():
diff --git a/deploy/cloud/configure_settings.py b/deploy/cloud/configure_settings.py
index c773e1b61..052634f99 100644
--- a/deploy/cloud/configure_settings.py
+++ b/deploy/cloud/configure_settings.py
@@ -47,9 +47,19 @@ class ConfigureSettings(object):
settings_yaml = ('%s/settings_%s.yaml'
% (self.yaml_config_dir, self.env_id))
check_file_exists(settings_yaml)
- backup(settings_yaml)
+ with io.open(settings_yaml, 'r') as stream:
+ orig_dea = yaml.load(stream)
+
+ backup(settings_yaml)
settings = self.dea.get_property('settings')
+ # Copy fuel defined plugin_id's to user defined settings
+ 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"]
with io.open(settings_yaml, 'w') as stream:
yaml.dump(settings, stream, default_flow_style=False)