Commit f82331fc authored by Grégory Wisniewski's avatar Grégory Wisniewski

Rename UnlockInformation to NotifyUnlockInformation.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1490 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent d3f3067e
......@@ -234,7 +234,7 @@ class EventHandler(object):
def invalidateObjects(self, conn, packet, oid_list, tid):
raise UnexpectedPacketError
def unlockInformation(self, conn, packet, tid):
def notifyUnlockInformation(self, conn, packet, tid):
raise UnexpectedPacketError
def askStoreObject(self, conn, packet, oid, serial,
......@@ -402,7 +402,7 @@ class EventHandler(object):
d[Packets.LockInformation] = self.lockInformation
d[Packets.NotifyInformationLocked] = self.notifyInformationLocked
d[Packets.InvalidateObjects] = self.invalidateObjects
d[Packets.UnlockInformation] = self.unlockInformation
d[Packets.NotifyUnlockInformation] = self.notifyUnlockInformation
d[Packets.AskNewOIDs] = self.askNewOIDs
d[Packets.AnswerNewOIDs] = self.answerNewOIDs
d[Packets.AskStoreObject] = self.askStoreObject
......
......@@ -152,7 +152,7 @@ class PacketLogger(EventHandler):
def invalidateObjects(self, conn, packet, oid_list, tid):
pass
def unlockInformation(self, conn, packet, tid):
def notifyUnlockInformation(self, conn, packet, tid):
pass
def askStoreObject(self, conn, packet, oid, serial,
......
......@@ -86,7 +86,7 @@ class StorageServiceHandler(BaseServiceHandler):
c.notify(Packets.InvalidateObjects(t.getOIDList(), tid))
elif node.isStorage():
if uuid in t.getUUIDList():
c.notify(Packets.UnlockInformation(tid))
c.notify(Packets.NotifyUnlockInformation(tid))
# remove transaction from manager
self.app.tm.remove(tid)
......
......@@ -697,7 +697,7 @@ class InvalidateObjects(Packet):
oid_list.append(oid)
return (oid_list, tid)
class UnlockInformation(Packet):
class NotifyUnlockInformation(Packet):
"""
Unlock information on a transaction. PM -> S.
"""
......@@ -1297,7 +1297,7 @@ class PacketRegistry(dict):
LockInformation = register(0x0014, LockInformation)
NotifyInformationLocked = register(0x8014, NotifyInformationLocked)
InvalidateObjects = register(0x0015, InvalidateObjects)
UnlockInformation = register(0x0016, UnlockInformation)
NotifyUnlockInformation = register(0x0016, NotifyUnlockInformation)
AskNewOIDs = register(0x0017, AskNewOIDs)
AnswerNewOIDs = register(0x8017, AnswerNewOIDs)
AskStoreObject = register(0x0018, AskStoreObject)
......
......@@ -109,7 +109,7 @@ class HiddenHandler(BaseMasterHandler):
def lockInformation(self, conn, packet, tid):
pass
def unlockInformation(self, conn, packet, tid):
def notifyUnlockInformation(self, conn, packet, tid):
pass
def askObject(self, conn, packet, oid, serial, tid):
......
......@@ -69,7 +69,7 @@ class MasterOperationHandler(BaseMasterHandler):
pass
conn.answer(Packets.NotifyInformationLocked(tid), packet.getId())
def unlockInformation(self, conn, packet, tid):
def notifyUnlockInformation(self, conn, packet, tid):
app = self.app
try:
t = app.transaction_dict[tid]
......
......@@ -274,8 +274,8 @@ class NeoTestBase(unittest.TestCase):
def checkLockInformation(self, conn, **kw):
return self.checkAskPacket(conn, Packets.LockInformation, **kw)
def checkUnlockInformation(self, conn, **kw):
return self.checkNotifyPacket(conn, Packets.UnlockInformation, **kw)
def checkNotifyUnlockInformation(self, conn, **kw):
return self.checkNotifyPacket(conn, Packets.NotifyUnlockInformation, **kw)
def checkRequestIdentification(self, conn, **kw):
return self.checkAskPacket(conn, Packets.RequestIdentification, **kw)
......
......@@ -123,8 +123,8 @@ class MasterStorageHandlerTests(NeoTestBase):
self.service.notifyInformationLocked(storage_conn_2, packet, tid)
self.checkAnswerTransactionFinished(client_conn_1)
self.checkInvalidateObjects(client_conn_2)
self.checkUnlockInformation(storage_conn_1)
self.checkUnlockInformation(storage_conn_2)
self.checkNotifyUnlockInformation(storage_conn_1)
self.checkNotifyUnlockInformation(storage_conn_2)
def test_12_askLastIDs(self):
service = self.service
......
......@@ -164,7 +164,7 @@ class StorageMasterHandlerTests(NeoTestBase):
self.operation.lockInformation(conn, packet, '\x01' * 8)
self.checkNotifyInformationLocked(conn, answered_packet=packet)
def test_23_unlockInformation2(self):
def test_23_notifyUnlockInformation2(self):
# delete transaction informations
conn = Mock({ 'isServer': False, })
self.app.dm = Mock({ })
......@@ -174,7 +174,7 @@ class StorageMasterHandlerTests(NeoTestBase):
self.app.transaction_dict[INVALID_TID] = transaction
self.app.load_lock_dict[0] = transaction
self.app.store_lock_dict[0] = transaction
self.operation.unlockInformation(conn, packet, INVALID_TID)
self.operation.notifyUnlockInformation(conn, packet, INVALID_TID)
self.assertEquals(len(self.app.load_lock_dict), 0)
self.assertEquals(len(self.app.store_lock_dict), 0)
self.assertEquals(len(self.app.store_lock_dict), 0)
......
......@@ -316,9 +316,9 @@ class ProtocolTests(NeoTestBase):
self.assertEqual(ptid, tid)
self.assertEqual(p_oid_list, oid_list)
def test_41_unlockInformation(self):
def test_41_notifyUnlockInformation(self):
tid = self.getNextTID()
p = Packets.UnlockInformation(tid)
p = Packets.NotifyUnlockInformation(tid)
ptid = p.decode()[0]
self.assertEqual(ptid, tid)
......
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