def users_config(self): user_groups_from_yml = self.meta_config.users absent_users = [] present_users = [] for user_group_from_yml in user_groups_from_yml: with open(self.paths.get_users_yml(user_group_from_yml)) as f: user_group_json = yaml.safe_load(f) present_users += user_group_json['dev_users']['present'] absent_users += user_group_json['dev_users']['absent'] self.check_user_group_absent_present_overlaps(absent_users, present_users) all_users_json = {'dev_users': {'absent': absent_users, 'present': present_users}} return UsersConfig.wrap(all_users_json)
def users_config(self): with open(self.paths.get_users_yml(self.meta_config.users)) as f: users_json = yaml.load(f) return UsersConfig.wrap(users_json)