Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
f5ff79d9
Commit
f5ff79d9
authored
Sep 06, 2013
by
Stavros Sachtouris
Browse files
Prepend log_settings to auth_client init
parent
1144594b
Changes
3
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/__init__.py
View file @
f5ff79d9
...
...
@@ -307,6 +307,11 @@ def _init_session(arguments, is_non_API=False):
else
:
auth_base
=
AuthCachedClient
(
auth_args
[
'url'
],
auth_args
[
'token'
])
from
kamaki.cli.commands
import
_command_init
fake_cmd
=
_command_init
(
arguments
)
fake_cmd
.
client
=
auth_base
fake_cmd
.
_set_log_params
()
fake_cmd
.
_update_max_threads
()
auth_base
.
authenticate
(
token
)
except
ClientError
as
ce
:
if
ce
.
status
in
(
401
,
):
...
...
kamaki/cli/commands/__init__.py
View file @
f5ff79d9
...
...
@@ -134,7 +134,7 @@ class _command_init(object):
def
_update_max_threads
(
self
):
if
getattr
(
self
,
'client'
,
None
):
max_threads
=
int
(
self
[
'config'
].
get_global
(
'max_threads'
))
assert
max_threads
>
0
assert
max_threads
>
0
,
'invalid max_threads config option'
self
.
client
.
MAX_THREADS
=
max_threads
def
_safe_progress_bar
(
self
,
msg
,
arg
=
'progress_bar'
):
...
...
kamaki/cli/commands/astakos.py
View file @
f5ff79d9
...
...
@@ -60,8 +60,8 @@ class _user_init(_command_init):
if
getattr
(
self
,
'cloud'
,
False
):
base_url
=
self
.
_custom_url
(
'astakos'
)
if
base_url
:
token
=
self
.
_custom_token
(
'astakos'
)
\
or
self
.
config
.
get_cloud
(
self
.
cloud
,
'token'
)
token
=
self
.
_custom_token
(
'astakos'
)
or
self
.
config
.
get_cloud
(
self
.
cloud
,
'token'
)
token
=
token
.
split
()[
0
]
if
' '
in
token
else
token
self
.
client
=
AstakosClient
(
base_url
=
base_url
,
token
=
token
)
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment