Commit 193a31e1 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add handler for cluster state packet in neoctl.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@662 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 08f200bb
......@@ -116,7 +116,7 @@ class Application(object):
elif set_type == "cluster":
name = options.pop(0)
state = options.pop(0)
cluster_state = cluster_states.getFromStr(state)
state = protocol.cluster_states.getFromStr(state)
if state is None:
return "unknown cluster state"
p = protocol.setClusterState(name, state)
......
......@@ -86,6 +86,9 @@ class CommandEventHandler(EventHandler):
def handleAnswerNodeState(self, conn, packet, uuid, state):
self.app.result = "Node %s set to state %s" %(dump(uuid), state)
def handleAnswerClusterState(self, conn, packet, state):
self.app.result = "Cluster state : %s" % state
def handleAnswerNewNodes(self, conn, packet, uuid_list):
uuids = ', '.join([dump(uuid) for uuid in uuid_list])
self.app.result = 'New storage nodes : %s' % uuids
......
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