Loading ccnode/ccnode.py +11 −2 Original line number Diff line number Diff line Loading @@ -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: 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 Loading
ccnode/ccnode.py +11 −2 Original line number Diff line number Diff line Loading @@ -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: 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