Skip to content

Commit 2ccd6bc

Browse files
Merge pull request #881 from camporter/always_set_endpoint_url
Always set the endpoint_url by defaulting to the public URL
2 parents e17b21d + 75ad375 commit 2ccd6bc

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

SoftLayer/CLI/config/setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,14 @@ def get_user_input(env):
106106
endpoint_type = env.input(
107107
'Endpoint (public|private|custom)', default='public')
108108
endpoint_type = endpoint_type.lower()
109-
if endpoint_type is None:
110-
endpoint_url = SoftLayer.API_PUBLIC_ENDPOINT
111-
if endpoint_type == 'public':
112-
endpoint_url = SoftLayer.API_PUBLIC_ENDPOINT
113-
elif endpoint_type == 'private':
114-
endpoint_url = SoftLayer.API_PRIVATE_ENDPOINT
115-
elif endpoint_type == 'custom':
109+
110+
if endpoint_type == 'custom':
116111
endpoint_url = env.input('Endpoint URL',
117112
default=defaults['endpoint_url'])
113+
elif endpoint_type == 'private':
114+
endpoint_url = SoftLayer.API_PRIVATE_ENDPOINT
115+
else:
116+
endpoint_url = SoftLayer.API_PUBLIC_ENDPOINT
118117

119118
# Ask for timeout
120119
timeout = env.input('Timeout', default=defaults['timeout'] or 0)

0 commit comments

Comments
 (0)