2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Merge pull request #47 from jjohnson42/amendconsoleapi

Amend console API
This commit is contained in:
Jarrod Johnson 2015-10-21 16:46:32 -04:00
commit 5485ef36bf

View File

@ -28,7 +28,7 @@ class Console(object):
"""This is the class defining the interface a console plugin must return
for the _console/session element"""
def __init__(self, node, config):
raise NotImplementedError("Subclassing required")
return
def connect(self, callback):
raise NotImplementedError("Subclassing required")
@ -36,13 +36,10 @@ class Console(object):
def write(self, data):
raise NotImplementedError("Subclassing required")
def wait_for_data(self, timeout=600):
raise NotImplementedError("Subclassing required")
def send_break(self):
"""This function is how a plugin should implement sending a break to
the remote console"""
pass
return
def ping(self):
"""This function is a hint to the console plugin that now would be a
@ -54,4 +51,4 @@ class Console(object):
as well, so consoles can schedule a health check to run at this time.
No return is expected, any error condition can be reported by sending
ConsoleEvent.Disconnect, just like normal."""
pass
return