Skip to content

Commit

Permalink
forward port # api command
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed Apr 20, 2016
1 parent 58fa18f commit 5d54cad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion etc/exabgp/processes/tcp-server
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Control (StreamRequestHandler):
self.wfile.flush()
prompt = True

elif command in ['shutdown','reload','restart','version']:
elif command in ['shutdown','reload','restart','version','#']:
sys.stdout.write('%s\n' % command)
sys.stdout.flush()
prompt = True
Expand Down
1 change: 1 addition & 0 deletions lib/exabgp/reactor/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class API (object):
'restart',
'reload',
'shutdown',
'#',
],reverse=True)

def __init__ (self,reactor):
Expand Down
6 changes: 6 additions & 0 deletions lib/exabgp/reactor/api/command/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ def version (self, reactor, service, command):
return True


@Text('#')
def version (self, reactor, service, command):
self.logger.processes(command.lstrip().lstrip('#').strip())
return True


@Text('teardown')
def teardown (self, reactor, service, command):
try:
Expand Down

0 comments on commit 5d54cad

Please sign in to comment.