Support deploy without configs in tests
TrivialFix Change-Id: I974025e39ea104eba7227c03dfcfff3191cf20a6
This commit is contained in:
@@ -198,7 +198,7 @@ class KollaWorker(object):
|
||||
zk.set(dest_node, json.dumps(extra))
|
||||
LOG.debug('Created "%s" node in zookeeper' % dest_node)
|
||||
|
||||
if 'config' in extra:
|
||||
if proj in extra.get('config', {}):
|
||||
for service in extra['config'][proj]:
|
||||
LOG.debug('Current service is %s' % service)
|
||||
# write the config files
|
||||
|
||||
@@ -78,10 +78,12 @@ def validate(filename, group, role, deps):
|
||||
mini_vars = {'cinder_volume_driver': 'lvm'}
|
||||
cnf = yaml.load(jinja_utils.jinja_render(conf_path, mini_vars))
|
||||
validate_command(filename, cnf['commands'][group][role], deps)
|
||||
if role not in cnf['config'][group]:
|
||||
print('WARN: no config for role %s in group %s' % (role, group))
|
||||
else:
|
||||
validate_config(cnf['config'][group][role])
|
||||
if 'config' in cnf:
|
||||
if role not in cnf['config'][group]:
|
||||
logging.warning('No config for role %s in group %s' % (role,
|
||||
group))
|
||||
else:
|
||||
validate_config(cnf['config'][group][role])
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user