Commit ff076765 authored by Vincent Pelletier's avatar Vincent Pelletier

Stop returning uuid from identifyStorageNode as it is never altered.

In turn, stop returning uuid from identifyNode.
parent c32895c6
......@@ -468,7 +468,7 @@ class Application(object):
if uuid is None or node is None:
# same as for verification
state = NodeStates.PENDING
return uuid, state, storage.StorageServiceHandler(self)
return state, storage.StorageServiceHandler(self)
def identifyNode(self, node_type, uuid, node):
......@@ -497,12 +497,12 @@ class Application(object):
manager = self._current_manager
if manager is None:
manager = self
(uuid, state, handler) = manager.identifyStorageNode(uuid, node)
state, handler = manager.identifyStorageNode(uuid, node)
human_readable_node_type = ' storage (%s) ' % (state, )
else:
raise NotImplementedError(node_type)
logging.info('Accept a' + human_readable_node_type + dump(uuid))
return (uuid, node, state, handler, node_ctor)
return node, state, handler, node_ctor
def onTransactionCommitted(self, txn):
# I have received all the lock answers now:
......
......@@ -42,8 +42,8 @@ class IdentificationHandler(MasterHandler):
# ask the app the node identification, if refused, an exception is
# raised
result = app.identifyNode(node_type, uuid, node)
(uuid, node, state, handler, node_ctor) = result
node, state, handler, node_ctor = app.identifyNode(node_type, uuid,
node)
if uuid is None:
# no valid uuid, give it one
uuid = app.getNewUUID(node_type)
......
......@@ -41,7 +41,7 @@ class RecoveryManager(MasterHandler):
"""
Returns the handler for storage nodes
"""
return uuid, NodeStates.PENDING, self
return NodeStates.PENDING, self
def run(self):
"""
......
......@@ -89,7 +89,7 @@ class VerificationManager(BaseServiceHandler):
# uuid from the test framework. It's safe since nodes with a
# conflicting UUID are rejected in the identification handler.
state = NodeStates.PENDING
return (uuid, state, self)
return state, self
def run(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment