Skip to content

Commit

Permalink
Merge "Return appropriate error message when route prefix cannot be p…
Browse files Browse the repository at this point in the history
…arsed" into R3.1
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Aug 6, 2016
2 parents 5a9e82f + f4466d7 commit 4c73b64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config/api-server/vnc_cfg_types.py
Expand Up @@ -1961,7 +1961,10 @@ def _check(cls, obj_dict, db_conn):
family = None
entries = obj_dict.get('aggregate_route_entries', {})
for route in entries.get('route', []):
route_family = IPNetwork(route).version
try:
route_family = IPNetwork(route).version
except TypeError:
return (False, (400, 'Invalid route: %s' % route))
if family and route_family != family:
return (False, (400, 'All prefixes in a route aggregate '
'object must be of same ip family'))
Expand Down

0 comments on commit 4c73b64

Please sign in to comment.