Merge "Use specific Exception"

This commit is contained in:
Zuul 2017-11-20 11:21:07 +00:00 committed by Gerrit Code Review
commit e32a05fd37
1 changed files with 2 additions and 10 deletions

View File

@ -889,11 +889,7 @@ def network_driver_create_network():
{'neutron_network_name': neutron_network_name,
'network': network})
if network_shared != shared:
# NOTE(kiennt): Use generic KuryrException to unblock
# patch 516228 for merging. Will change
# it to ConflictOption exception in the
# follow-up.
raise exceptions.KuryrException(
raise exceptions.ConflictConfigOption(
'Network %(network_id)s had option '
'shared=%(network_shared)s, conflict with the given option '
'shared=%(shared)s', {
@ -1550,11 +1546,7 @@ def ipam_request_pool():
pool_cidr = ipaddress.ip_network(six.text_type(prefixes[0]))
if pool_cidr == cidr:
if shared != existing_pools[0]['shared']:
# NOTE(kiennt): Use generic KuryrException to unblock
# patch 516228 for merging. Will change
# it to ConflictOption exception in the
# follow-up.
raise exceptions.KuryrException(
raise exceptions.ConflictConfigOption(
'There is already existing subnet pool '
'with %(cidr)s but with shared = %(shared)s',
{'cidr': cidr,