From fc272923049868cb0164f1300b7bca38d6950fb7 Mon Sep 17 00:00:00 2001 From: Pallab Pain Date: Sat, 9 Sep 2023 00:05:21 +0530 Subject: [PATCH] fix(usergroup): corrects the inspect output The inspect output did not conform with the JSONSchema and using it as is was not possible. This commit corrects the output and the output will now be usable with the rio apply command. --- riocli/usergroup/inspect.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/riocli/usergroup/inspect.py b/riocli/usergroup/inspect.py index 97903b35..e771d84d 100644 --- a/riocli/usergroup/inspect.py +++ b/riocli/usergroup/inspect.py @@ -16,7 +16,6 @@ import click from click_help_colors import HelpColorsCommand from rapyuta_io.clients import UserGroup -from rapyuta_io.clients.project import User, Project from riocli.config import new_client from riocli.constants import Colors @@ -67,8 +66,8 @@ def to_manifest(usergroup: UserGroup, org_guid: str) -> typing.Dict: }, 'spec': { 'description': usergroup.description, - 'members': list(members - admins), - 'admins': list(admins), - 'projects': projects, + 'members': [{'emailID': m} for m in list(members - admins)], + 'admins': [{'emailID': a} for a in list(admins)], + 'projects': [{'name': p} for p in projects], }, }