Commit 5f53f4fc authored by Grégory Wisniewski's avatar Grégory Wisniewski

Return values from neoctl to display them to the user.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1659 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent be0779b1
......@@ -151,7 +151,7 @@ class TerminalNeoCTL(object):
set cluster verifying
"""
assert len(params) == 0
self.neoctl.startCluster()
return self.neoctl.startCluster()
def enableStorageList(self, params):
"""
......@@ -219,7 +219,6 @@ class Application(object):
result = action(args[level:])
except NotReadyException, message:
result = message
return result
def _usage(self, action_dict, level=0):
......
......@@ -80,6 +80,7 @@ class NeoCTL(object):
response = self.__ask(packet)
assert response[0] == Packets.Error
assert response[1] == ErrorCodes.ACK
return response[1]
def setNodeState(self, node, state, update_partition_table=False):
"""
......@@ -93,6 +94,7 @@ class NeoCTL(object):
response = self.__ask(packet)
assert response[0] == Packets.Error
assert response[1] == ErrorCodes.ACK
return response[1]
def getClusterState(self):
"""
......@@ -126,13 +128,14 @@ class NeoCTL(object):
"""
Set cluster into "verifying" state.
"""
self.setClusterState(ClusterStates.VERIFYING)
return self.setClusterState(ClusterStates.VERIFYING)
def dropNode(self, node):
"""
Set node into "down" state and remove it from partition table.
"""
self.setNodeState(node, NodeStates.DOWN, update_partition_table=1)
return self.setNodeState(node, NodeStates.DOWN,
update_partition_table=1)
def getPrimary(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