diff --git a/networkapi/plugins/Dell/FTOS/plugin.py b/networkapi/plugins/Dell/FTOS/plugin.py index f8bd5d143..bc3f1cb16 100644 --- a/networkapi/plugins/Dell/FTOS/plugin.py +++ b/networkapi/plugins/Dell/FTOS/plugin.py @@ -39,6 +39,7 @@ class FTOS(BasePlugin): admin_privileges = 15 VALID_TFTP_PUT_MESSAGE = 'bytes successfully copied' + VALID_TFTP_PUT_MESSAGE_OS10 = 'Copy succeeded' def bgp(self): return BGP(equipment=self.equipment) @@ -202,10 +203,17 @@ def waitString(self, wait_str_ok_regex='', wait_str_invalid_regex=None, wait_str raise exceptions.InvalidCommandException(file_name_string) elif re.search(wait_str_ok_regex, output_line): log.debug('Equipment output: %s' % output_line) - # test bug switch copying 0 bytes + if output_line == '0 bytes successfully copied': log.debug('Switch copied 0 bytes, need to try again.') raise exceptions.CurrentlyBusyErrorException() string_ok = 1 + elif re.search(self.VALID_TFTP_PUT_MESSAGE_OS10, output_line): + log.debug('Equipment output: %s' % output_line) + + if output_line == 'Copy failed': + log.debug('Switch copied 0 bytes, need to try again.') + raise exceptions.CurrentlyBusyErrorException() + string_ok = 1 return recv_string