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

Those decorators are useless because the admin node is connected and identified

to the primary before the related handlers are applied.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@854 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 573ebb44
...@@ -27,7 +27,6 @@ from neo.protocol import UnexpectedPacketError ...@@ -27,7 +27,6 @@ from neo.protocol import UnexpectedPacketError
from neo.pt import PartitionTable from neo.pt import PartitionTable
from neo.exception import PrimaryFailure from neo.exception import PrimaryFailure
from neo.util import dump from neo.util import dump
from neo import decorators
class AdminEventHandler(EventHandler): class AdminEventHandler(EventHandler):
...@@ -149,11 +148,9 @@ class MasterEventHandler(EventHandler): ...@@ -149,11 +148,9 @@ class MasterEventHandler(EventHandler):
class MasterBaseEventHandler(EventHandler): class MasterBaseEventHandler(EventHandler):
""" This is the base class for connection to primary master node""" """ This is the base class for connection to primary master node"""
@decorators.identification_required
def handleNotifyClusterInformation(self, con, packet, cluster_state): def handleNotifyClusterInformation(self, con, packet, cluster_state):
self.app.cluster_state = cluster_state self.app.cluster_state = cluster_state
@decorators.identification_required
def handleNotifyNodeInformation(self, conn, packet, node_list): def handleNotifyNodeInformation(self, conn, packet, node_list):
uuid = conn.getUUID() uuid = conn.getUUID()
app = self.app app = self.app
...@@ -230,7 +227,6 @@ class MasterRequestEventHandler(MasterBaseEventHandler): ...@@ -230,7 +227,6 @@ class MasterRequestEventHandler(MasterBaseEventHandler):
client_conn, kw = self.app.dispatcher.retrieve(packet.getId()) client_conn, kw = self.app.dispatcher.retrieve(packet.getId())
client_conn.notify(protocol.answerNewNodes(uuid_list), kw['msg_id']) client_conn.notify(protocol.answerNewNodes(uuid_list), kw['msg_id'])
@decorators.identification_required
def handleAnswerPartitionTable(self, conn, packet, ptid, row_list): def handleAnswerPartitionTable(self, conn, packet, ptid, row_list):
logging.info("handleAnswerPartitionTable for a conn") logging.info("handleAnswerPartitionTable for a conn")
client_conn, kw = self.app.dispatcher.retrieve(packet.getId()) client_conn, kw = self.app.dispatcher.retrieve(packet.getId())
...@@ -256,15 +252,12 @@ class MasterRequestEventHandler(MasterBaseEventHandler): ...@@ -256,15 +252,12 @@ class MasterRequestEventHandler(MasterBaseEventHandler):
class MasterMonitoringEventHandler(MasterBaseEventHandler): class MasterMonitoringEventHandler(MasterBaseEventHandler):
"""This class deals with events for monitoring cluster.""" """This class deals with events for monitoring cluster."""
@decorators.identification_required
def handleAnswerNodeInformation(self, conn, packet, node_list): def handleAnswerNodeInformation(self, conn, packet, node_list):
logging.info("handleAnswerNodeInformation") logging.info("handleAnswerNodeInformation")
@decorators.identification_required
def handleAnswerPartitionTable(self, conn, packet, ptid, row_list): def handleAnswerPartitionTable(self, conn, packet, ptid, row_list):
logging.info("handleAnswerPartitionTable") logging.info("handleAnswerPartitionTable")
@decorators.identification_required
def handleNotifyPartitionChanges(self, conn, packet, ptid, cell_list): def handleNotifyPartitionChanges(self, conn, packet, ptid, cell_list):
app = self.app app = self.app
nm = app.nm nm = app.nm
...@@ -292,7 +285,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler): ...@@ -292,7 +285,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
pt.setCell(offset, node, state) pt.setCell(offset, node, state)
pt.log() pt.log()
@decorators.identification_required
def handleSendPartitionTable(self, conn, packet, ptid, row_list): def handleSendPartitionTable(self, conn, packet, ptid, row_list):
uuid = conn.getUUID() uuid = conn.getUUID()
app = self.app app = self.app
......
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