Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-node
Commits
ad40364f
Commit
ad40364f
authored
14 years ago
by
Benziane Chakib
Browse files
Options
Downloads
Patches
Plain Diff
Bug fix to authentication process on node
parent
6ba6ac15
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ccnode/ccnode.py
+11
-2
11 additions, 2 deletions
ccnode/ccnode.py
with
11 additions
and
2 deletions
ccnode/ccnode.py
+
11
−
2
View file @
ad40364f
...
...
@@ -29,7 +29,16 @@ class CCNode(object):
logging
.
debug
(
'
Authenticating user %s with password <%s>
'
%
(
login
,
password
))
try
:
#TODO: authentify returns role
role
=
self
.
server
.
authentify
(
login
,
password
)
except
RpcError
as
err
:
logging
.
warning
(
'
Authentication error
'
)
if
err
.
exception
==
'
AuthenticationError
'
:
logging
.
warning
(
'
Authentication error
'
)
else
:
logging
.
warning
(
'
Unknown error while authenticating: %s
'
%
err
)
return
False
else
:
if
role
is
not
'
hypervisor
'
:
logging
.
warning
(
'
Bad role affected by server: %s
'
%
role
)
return
False
else
:
return
True
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment