@@ -19,20 +19,23 @@ def censor_password(value):
1919@click .command (cls = SLCommand )
2020@click .option ('--session-token' ,
2121 default = None ,
22- help = 'An existing employee session token (hash). Click the "Copy Session Token" in the internal portal to get this value.'
22+ help = 'An existing employee session token (hash). Click the "Copy Session Token" in the internal portal '
23+ 'to get this value.'
2324 'Can also be set via the SLCLI_SESSION_TOKEN environment variable.' ,
2425 envvar = 'SLCLI_SESSION_TOKEN' )
2526@click .option ('--user-id' ,
2627 default = None ,
2728 type = int ,
28- help = 'Employee IMS user ID. This is the number in the url when you click your username in the internal portal, under "user information". '
29- 'Can also be set via the SLCLI_USER_ID environment variable. Or read from the configuration file.' ,
29+ help = 'Employee IMS ID. The number in the url when you click your username in the internal portal, '
30+ 'under "user information". Can also be set via the SLCLI_USER_ID environment variable. '
31+ 'Or read from the configuration file.' ,
3032 envvar = 'SLCLI_USER_ID' )
3133@click .option ('--legacy' ,
3234 default = False ,
3335 type = bool ,
3436 is_flag = True ,
35- help = 'Login with username, password, yubi key combination. Only valid if ISV is not required. If using ISV, use your session token.' )
37+ help = 'Login with username, password, yubi key combination. Only valid if ISV is not required. '
38+ 'If using ISV, use your session token.' )
3639@environment .pass_env
3740def cli (env , session_token : str | None , user_id : int | None , legacy : bool ):
3841 """Logs you into the internal SoftLayer Network.
@@ -59,7 +62,7 @@ def cli(env, session_token: str | None, user_id: int | None, legacy: bool):
5962 if not user_id :
6063 user_id = int (input ("User ID (number): " ))
6164 if not session_token :
62- session_token = os .environ .get ('SLCLI_SESSION_TOKEN' , '' ) or input ("Session Token: " )
65+ session_token = os .environ .get ('SLCLI_SESSION_TOKEN' , '' ) or input ("Session Token: " )
6366 env .client .authenticate_with_hash (user_id , session_token )
6467 settings ['access_token' ] = session_token
6568 settings ['userid' ] = str (user_id )
@@ -68,7 +71,6 @@ def cli(env, session_token: str | None, user_id: int | None, legacy: bool):
6871 click .echo (f"Logged in with session token for user ID { user_id } ." )
6972 return
7073
71-
7274 username = settings .get ('username' ) or os .environ .get ('SLCLI_USER' , None )
7375 password = os .environ .get ('SLCLI_PASSWORD' , '' )
7476 yubi = None
0 commit comments