Commit f1be8bd3 authored by Vincent Pelletier's avatar Vincent Pelletier

Add a new Node state: UNKNOWN_STATE. In this state, nodes are supposed to be...

Add a new Node state: UNKNOWN_STATE. In this state, nodes are supposed to be RUNNING, but there was no successful attemp to connect to them yet, nor any notification that they were running. This is especially useful in tests to avoid a stopped node to appear as RUNNING until receiving a notification that it is in fact DOWN.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1192 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8c10241f
......@@ -25,7 +25,7 @@ class Node(object):
"""This class represents a node."""
def __init__(self, server = None, uuid = None):
self.state = protocol.RUNNING_STATE
self.state = protocol.UNKNOWN_STATE
self.server = server
self.uuid = uuid
self.manager = None
......
......@@ -339,6 +339,7 @@ node_states = Enum({
'BROKEN_STATE': 3,
'HIDDEN_STATE' : 4,
'PENDING_STATE': 5,
'UNKNOWN_STATE': 6,
})
# used for logging
......@@ -349,6 +350,7 @@ node_state_prefix_dict = {
BROKEN_STATE: 'B',
HIDDEN_STATE: 'H',
PENDING_STATE: 'P',
UNKNOWN_STATE: 'U',
}
# Partition cell states.
......
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