Skip to content

Commit cfb0d25

Browse files
Merge pull request #394 from marcusgc/master
Change error message text
2 parents 76b33d8 + 296779b commit cfb0d25

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

networkapi/api_neighbor/v4/exceptions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,18 @@ class LocalIpAndPeerGroupAtDifferentEnvironmentsException(APIException):
132132
status_code = status.HTTP_400_BAD_REQUEST
133133

134134
def __init__(self, neighbor):
135-
self.detail = u'LocalIp id = {} and PeerGroup id = {} belongs to ' \
136-
u'different Environments'. \
137-
format(neighbor.local_ip, neighbor.peer_group)
135+
self.detail = u'Not allowed to configure BGP neighbor using this Peer Group. ' \
136+
u'PeerGroup id = {} is not mapped to the environment of LocalIp id = {}' \
137+
format(neighbor.peer_group, neighbor.local_ip)
138138

139139

140140
class NeighborDuplicatedException(APIException):
141141
status_code = status.HTTP_400_BAD_REQUEST
142142

143143
def __init__(self, neighbor):
144-
self.detail = u'It already exists Neighbor with LocalAsn id = {}, ' \
144+
self.detail = u'Duplicated neighbor. A Neighbor with LocalAsn id = {}, ' \
145145
u'LocalIp id = {}, RemoteAsn id = {} and ' \
146-
u'RemoteIp id = {}'.\
146+
u'RemoteIp id = {} already exists'.\
147147
format(neighbor.local_asn, neighbor.local_ip,
148148
neighbor.remote_asn, neighbor.remote_ip)
149149

networkapi/api_rack/facade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,8 @@ def allocate_env_vlan(user, rack_id):
970970
rack_env.spine_leaf_vlans_save()
971971

972972
# leaf x leaf
973-
rack_env.leaf_leaf_vlans_save()
974973
rack_env.leaf_leaf_envs_save()
974+
rack_env.leaf_leaf_vlans_save()
975975

976976
# producao/cloud
977977
rack_env.prod_environment_save()

0 commit comments

Comments
 (0)