Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion networkapi/api_neighbor/v4/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ class LocalIpAndPeerGroupAtDifferentEnvironmentsException(APIException):

def __init__(self, neighbor):
self.detail = u'Not allowed to configure BGP neighbor using this Peer Group. ' \
u'PeerGroup id = {} is not mapped to the environment of LocalIp id = {}'.\
u'PeerGroup id = {} is not mapped to the environment of LocalIp id = {}. ' \
u'The LocalIp environment must be associated with this PeerGroup ' \
u'in the environment_peer_group table.'.\
format(neighbor.peer_group, neighbor.local_ip)


Expand Down
8 changes: 5 additions & 3 deletions networkapi/interface/resource/InterfaceChannelResource.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from networkapi.ambiente.models import Ambiente
from networkapi.api_interface import exceptions as api_interface_exceptions
from networkapi.api_interface import facade as api_interface_facade
from networkapi.api_rest.exceptions import NetworkAPIException
from networkapi.auth import has_perm
from networkapi.exception import InvalidValueError
from networkapi.infrastructure.xml_utils import dumps_networkapi
Expand Down Expand Up @@ -366,11 +367,12 @@ def handle_delete(self, request, user, *args, **kwargs):
vlan_nativa='1')

api_interface_facade.delete_channel(user, e, equip_dict.get(e), channel)
except Exception:
except Exception, e:
self.log.error(u'Error undeploying channel configuration: %s' % e)
if keep_db:
channel.status_deploy = StatusDeploy.error[0]
channel.save(user)
raise
channel.save(user, commit=True)
return self.response_error(410, e)

if not keep_db:
channel.delete(user)
Expand Down
Loading