blob: 138d1234f9d4ee4ca8f3593fb5f0826edb2ca043 [file] [log] [blame]
class Node(object):
def __init__(self, conn_url, roles):
self.roles = roles
self.conn_url = conn_url
self.connection = None
def __str__(self):
templ = "<Node: url={conn_url!r} roles={roles}" + \
" connected={is_connected}>"
return templ.format(conn_url=self.conn_url,
roles=", ".join(self.roles),
is_connected=self.connection is not None)
def __repr__(self):
return str(self)