Commit 601d9dad authored by Grégory Wisniewski's avatar Grégory Wisniewski

Revert commit #1311 because this is a bad idea to replace static definition with

a dynamic check when speed is required.


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1355 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent a4c4800f
......@@ -71,16 +71,16 @@ class Node(object):
)
def isMaster(self):
return isinstance(self, MasterNode)
return False
def isStorage(self):
return isinstance(self, StorageNode)
return False
def isClient(self):
return isinstance(self, ClientNode)
return False
def isAdmin(self):
return isinstance(self, AdminNode)
return False
def isIdentified(self):
# XXX: knowing the node's UUID is sufficient ?
......@@ -145,19 +145,27 @@ class Node(object):
class MasterNode(Node):
"""This class represents a master node."""
pass
def isMaster(self):
return True
class StorageNode(Node):
"""This class represents a storage node."""
pass
def isStorage(self):
return True
class ClientNode(Node):
"""This class represents a client node."""
pass
def isClient(self):
return True
class AdminNode(Node):
"""This class represents an admin node."""
pass
def isAdmin(self):
return True
NODE_TYPE_MAPPING = {
......
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