Skip to content

Commit

Permalink
GH zatosource#282 - Working on SFTP commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuch committed Feb 27, 2019
1 parent 0aff130 commit 363501c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/zato-common/src/zato/common/broker_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class OUTGOING(Constants):
SFTP_EDIT = ValueConstant('')
SFTP_DELETE = ValueConstant('')
SFTP_CHANGE_PASSWORD = ValueConstant('')
SFTP_SEND = ValueConstant('')
SFTP_EXECUTE = ValueConstant('')
SFTP_PING = ValueConstant('')

class CHANNEL(Constants):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,20 @@ def __init__(self, logger, **config):
self.logger = logger
self.config = config # type: dict

# ################################################################################################################################

def execute(self, data):
""" Executes a single or multiple SFTP commands from the input 'data' string.
"""

# ################################################################################################################################

def connect(self):
pass # This is a no-op added for API completeness
# We do not maintain long-running connections but we may still want to ping the remote end
# to make sure we are actually able to connect to it.
return self.ping()

# ################################################################################################################################

def ping(self):
self.logger.warn('QQQ %s', self.config)
Expand Down Expand Up @@ -86,7 +98,7 @@ def _on_OUTGOING_SFTP_EDIT(self, msg):

# ################################################################################################################################

def _on_OUTGOING_SFTP_SEND(self, msg, is_reconnect=False):
def _on_OUTGOING_SFTP_EXECUTE(self, msg, is_reconnect=False):
pass

# ################################################################################################################################
Expand Down

0 comments on commit 363501c

Please sign in to comment.