@@ -73,35 +73,28 @@ def get_version_message(ctx, param, value):
73
73
epilog = """Run 'islcli login' to authenticate""" ,
74
74
cls = CommandLoader ,
75
75
context_settings = CONTEXT_SETTINGS )
76
- @click .option ('--format' ,
77
- default = DEFAULT_FORMAT ,
78
- show_default = True ,
76
+ @click .option ('--format' , default = DEFAULT_FORMAT , show_default = True ,
79
77
help = "Output format" ,
80
78
type = click .Choice (VALID_FORMATS ))
81
- @click .option ('-C' , '--config' ,
82
- required = False ,
79
+ @click .option ('-C' , '--config' , required = False , show_default = True ,
83
80
default = click .get_app_dir ('softlayer' , force_posix = True ),
84
- show_default = True ,
85
81
help = "Config file location" ,
86
82
type = click .Path (resolve_path = True ))
87
83
@click .option ('--verbose' , '-v' ,
88
84
help = "Sets the debug noise level, specify multiple times for more verbosity." ,
89
85
type = click .IntRange (0 , 3 , clamp = True ),
90
86
count = True )
91
- @click .option ('--proxy' ,
92
- required = False ,
87
+ @click .option ('--proxy' , required = False ,
93
88
help = "HTTPS or HTTP proxy to be use to make API calls" )
94
- @click .option ('--really / --not-really' , '-y' ,
95
- is_flag = True ,
96
- required = False ,
89
+ @click .option ('--really / --not-really' , '-y' , is_flag = True , required = False ,
97
90
help = "Confirm all prompt actions" )
98
- @click .option ('--demo / --no-demo' ,
99
- is_flag = True ,
100
- required = False ,
91
+ @click .option ('--demo / --no-demo' , is_flag = True , required = False ,
101
92
help = "Use demo data instead of actually making API calls" )
102
93
@click .option ('--version' , is_flag = True , expose_value = False , is_eager = True , callback = get_version_message ,
103
94
help = "Show version information." , allow_from_autoenv = False ,)
104
- @click .option ('--account' , '-a' , help = "Account Id" )
95
+ @click .option ('--account' , '-a' , help = "Account Id, only needed for some API calls." )
96
+ @click .option ('--internal' , '-i' , is_flag = True , required = False ,
97
+ help = "Use the Employee Client instead of the Customer Client." )
105
98
@environment .pass_env
106
99
def cli (env ,
107
100
format = 'table' ,
@@ -111,6 +104,7 @@ def cli(env,
111
104
really = False ,
112
105
demo = False ,
113
106
account = None ,
107
+ internal = False ,
114
108
** kwargs ):
115
109
"""Main click CLI entry-point."""
116
110
@@ -119,7 +113,10 @@ def cli(env,
119
113
env .config_file = config
120
114
env .format = format
121
115
env .set_env_theme (config_file = config )
122
- env .ensure_client (config_file = config , is_demo = demo , proxy = proxy )
116
+ if internal :
117
+ env .ensure_emp_client (config_file = config , is_demo = demo , proxy = proxy )
118
+ else :
119
+ env .ensure_client (config_file = config , is_demo = demo , proxy = proxy )
123
120
env .vars ['_start' ] = time .time ()
124
121
logger = logging .getLogger ()
125
122
@@ -134,7 +131,6 @@ def cli(env,
134
131
env .vars ['_timings' ] = SoftLayer .DebugTransport (env .client .transport )
135
132
env .vars ['verbose' ] = verbose
136
133
env .client .transport = env .vars ['_timings' ]
137
- print ("Account ID is now: {}" .format (account ))
138
134
env .client .account_id = account
139
135
140
136
0 commit comments