|
29 | 29 | "supersedes this template.")
|
30 | 30 | @click.option('--template', '-t', default=None,
|
31 | 31 | help="A json string describing https://softlayer.github.io/reference/datatypes/SoftLayer_User_Customer/")
|
32 |
| -@click.option('--api-key', '-a', default=False, is_flag=True, help="Create an API key for this user.") |
33 | 32 | @environment.pass_env
|
34 |
| -def cli(env, username, email, password, from_user, template, api_key): |
| 33 | +def cli(env, username, email, password, from_user, template): |
35 | 34 | """Creates a user Users.
|
36 | 35 |
|
37 | 36 | Remember to set the permissions and access for this new user.
|
@@ -81,13 +80,9 @@ def cli(env, username, email, password, from_user, template, api_key):
|
81 | 80 | raise exceptions.CLIAbort("Canceling creation!")
|
82 | 81 |
|
83 | 82 | result = mgr.create_user(user_template, password)
|
84 |
| - new_api_key = None |
85 |
| - if api_key: |
86 |
| - click.secho("Adding API key...", fg='green') |
87 |
| - new_api_key = mgr.add_api_authentication_key(result['id']) |
88 | 83 |
|
89 |
| - table = formatting.Table(['Username', 'Email', 'Password', 'API Key']) |
90 |
| - table.add_row([result['username'], result['email'], password, new_api_key]) |
| 84 | + table = formatting.Table(['Username', 'Email', 'Password']) |
| 85 | + table.add_row([result['username'], result['email'], password]) |
91 | 86 | env.fout(table)
|
92 | 87 |
|
93 | 88 |
|
|
0 commit comments