Cosmetic changes to Org CLI

This commit is contained in:
Ivan Kravets
2020-06-03 22:22:13 +03:00
parent cbcd3f7c4d
commit 6c97cc6192

View File

@ -53,12 +53,9 @@ def org_list(json_output):
orgs = client.list_orgs() orgs = client.list_orgs()
if json_output: if json_output:
return click.echo(json.dumps(orgs)) return click.echo(json.dumps(orgs))
click.echo()
click.secho("Organizations", fg="cyan")
click.echo("=" * len("Organizations"))
for org in orgs: for org in orgs:
click.echo() click.echo()
click.secho(org.get("orgname"), bold=True) click.secho(org.get("orgname"), fg="cyan")
click.echo("-" * len(org.get("orgname"))) click.echo("-" * len(org.get("orgname")))
data = [] data = []
if org.get("displayname"): if org.get("displayname"):
@ -113,7 +110,7 @@ def org_add_owner(orgname, username):
client = AccountClient() client = AccountClient()
client.add_org_owner(orgname, username) client.add_org_owner(orgname, username)
return click.secho( return click.secho(
"A new owner has been successfully added to organization.", fg="green", "A new owner has been successfully added to the organization.", fg="green",
) )
@ -124,5 +121,5 @@ def org_remove_owner(orgname, username):
client = AccountClient() client = AccountClient()
client.remove_org_owner(orgname, username) client.remove_org_owner(orgname, username)
return click.secho( return click.secho(
"An owner has been successfully removed from organization.", fg="green", "An owner has been successfully removed from the organization.", fg="green",
) )