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
synnefo
Commits
f61c685d
Commit
f61c685d
authored
Apr 25, 2013
by
Christos Stavrakakis
Browse files
Fix info message of reconcile-resources-cyclades
parent
9b602630
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/quotas/management/commands/reconcile-resources-cyclades.py
View file @
f61c685d
...
...
@@ -82,6 +82,8 @@ class Command(BaseCommand):
write
(
"User '%s' does not exist in Quotaholder!"
,
userid
)
return
pending_exists
=
False
unknown_user_exists
=
False
unsynced
=
[]
for
user
in
users
:
db
=
db_holdings
.
get
(
user
,
{})
...
...
@@ -90,6 +92,7 @@ class Command(BaseCommand):
except
KeyError
:
write
(
"User '%s' does not exist in Quotaholder!
\n
"
%
user
)
unknown_user_exists
=
True
continue
# Assuming only one source
...
...
@@ -106,6 +109,7 @@ class Command(BaseCommand):
if
qh_pending
:
write
(
"Pending commission. User '%s', resource '%s'.
\n
"
%
(
user
,
resource
))
pending_exists
=
True
continue
if
db_value
!=
qh_value
:
data
=
(
user
,
resource
,
db_value
,
qh_value
)
...
...
@@ -121,7 +125,12 @@ class Command(BaseCommand):
request
[
"auto_accept"
]
=
True
request
[
"provisions"
]
=
map
(
create_provision
,
unsynced
)
qh
.
issue_commission
(
ASTAKOS_TOKEN
,
request
)
else
:
write
(
"Fixed unsynced resources
\n
"
)
if
pending_exists
:
write
(
"Found pending commissions. Run 'snf-manage"
" reconcile-commissions-cyclades'
\n
"
)
elif
not
(
unsynced
or
unknown_user_exists
):
write
(
"Everything in sync.
\n
"
)
...
...
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