diff --git a/networkapi/plugins/Dell/FTOS/plugin.py b/networkapi/plugins/Dell/FTOS/plugin.py index a85b9b935..87371e129 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 diff --git a/networkapi/requisicaovips/models.py b/networkapi/requisicaovips/models.py index f93f39c02..8d2ea63c9 100644 --- a/networkapi/requisicaovips/models.py +++ b/networkapi/requisicaovips/models.py @@ -2553,8 +2553,10 @@ def validate_v3(self, pool, permit_created=False): # Ip not found environment if not amb: raise pool_exceptions.IpNotFoundByEnvironment( - 'Environment of IP:%s(%s) and different of ' - 'environment of server pool: %s' % + 'Environment of IP %s(%s) is different of ' + 'environment of server pool %s. ' + 'Look the association of network of IP with ' + 'pool environment.' % (member['ip']['ip_formated'], member['ip']['id'], pool['identifier']) ) @@ -2567,8 +2569,10 @@ def validate_v3(self, pool, permit_created=False): # Ip not found environment if not amb: raise pool_exceptions.IpNotFoundByEnvironment( - 'Environment of IP:%s(%s) and different of ' - 'environment of server pool: %s' % + 'Environment of IP %s(%s) is different of ' + 'environment of server pool %s. ' + 'Look the association of network of IP with ' + 'pool environment.' % (member['ipv6']['ip_formated'], member['ipv6']['id'], pool['identifier']) )