Skip to content

Commit e4e1ea4

Browse files
caberoscaberos
authored andcommitted
fix the team code review comments
1 parent 3ab4720 commit e4e1ea4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

SoftLayer/CLI/user/remove_access.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
help="dedicated host ID ")
1818
@environment.pass_env
1919
def cli(env, identifier, hardware, virtual, dedicated):
20-
"""User details."""
20+
"""Remove access from a user to an specific device.
21+
22+
Example: slcli user remove-access 123456 --hardware 123456789
23+
"""
2124

2225
mgr = SoftLayer.UserManager(env.client)
2326
device = ''
@@ -36,3 +39,8 @@ def cli(env, identifier, hardware, virtual, dedicated):
3639

3740
if result:
3841
click.secho("Remove to access to device: %s" % device, fg='green')
42+
else:
43+
raise SoftLayer.exceptions.SoftLayerError('You need argument a hardware, virtual or dedicated identifier.\n'
44+
'E.g slcli user 123456 --hardware 91803794\n'
45+
' slcli user 123456 --dedicated 91803793\n'
46+
' slcli user 123456 --virtual 91803792')

0 commit comments

Comments
 (0)