def config_projects(self, project_cfg):
for project_key in project_cfg.keys():
- if project_key == 'hiera':
- cfg = project_cfg['hiera']
- if 'namespace' in cfg and cfg['namespace'].strip():
- self.projects['hiera']['namespace'] = cfg['namespace'].strip()
- if 'name' in cfg and cfg['name'].strip():
- self.projects['hiera']['name'] = cfg['name'].strip()
- if 'parent_dir' in cfg and cfg['parent_dir']:
- self.projects['hiera']['parent_dir'] = cfg['parent_dir']
- if 'workdir' in cfg and cfg['workdir']:
- self.projects[project_key]['workdir'] = cfg['workdir']
- if 'branch' in cfg and cfg['branch'].strip():
- self.projects[project_key]['branch'] = cfg['branch'].strip()
- continue
if project_key not in self.projects:
self.projects[project_key] = {}
cfg = project_cfg[project_key]