Skip to content

Commit 620ce76

Browse files
authored
Merge pull request #478 from globocom/develop
Develop
2 parents 3ba41f7 + 4b4bcbe commit 620ce76

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

networkapi/api_channel/facade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def create(self, data):
6161
envs_vlans = data.get('envs_vlans')
6262

6363
### Verify if channel number is greater than 0 and smaller or equal to 4096
64-
if int(nome) > 4096 or int(nome) <=1 :
64+
if int(nome) > 4096 or int(nome) <1 :
6565
log.error("Channel %s must be between 0 and 4097." % nome)
6666
raise InterfaceError(
6767
"Channel %s must be between 0 and 4097." % nome

networkapi/plugins/Netconf/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ def exec_command(self, command, success_regex='', invalid_regex=None, error_rege
204204
)
205205

206206
if response.status_code != 200:
207-
raise Exception
207+
raise Exception(json.loads(response.text).get("detail", "Unknown error at netconf microservice"))
208208

209209
result_message = "Configuration was executed successfully on {}.".format(self.equipment_access.fqdn)
210210
log.info(result_message)
211211
return result_message
212212

213213
except Exception as e:
214-
message = "Error while excute netconf command on equipment %s" % self.equipment_access.fqdn
214+
message = "Error while excute netconf command on equipment %s: %s" % (self.equipment_access.fqdn, e)
215215
log.error(message)
216216
log.error(e)
217217

0 commit comments

Comments
 (0)