Skip to content

Commit

Permalink
Merge pull request #308 from globocom/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Laura authored Dec 3, 2020
2 parents 44544ca + 197bdd2 commit a509093
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 9 additions & 1 deletion networkapi/plugins/Dell/FTOS/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
12 changes: 8 additions & 4 deletions networkapi/requisicaovips/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
)
Expand All @@ -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'])
)
Expand Down

0 comments on commit a509093

Please sign in to comment.