validator shouldn't raise exception

Bug #1357290 reported by Wei Wang
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Wishlist
Unassigned

Bug Description

In the function neutron.extension.allowedaddresspairs._validate_allowed_address_pairs, validator raises exception instead of return message which other validators do.

Wei Wang (damon-devops)
Changed in neutron:
assignee: nobody → Wei Wang (damon-devops)
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

It's not clear which way is preferable even though other validators just return messages

For instance, block

 if len(address_pairs) > cfg.CONF.max_allowed_address_pair:
        raise AllowedAddressPairExhausted(
            quota=cfg.CONF.max_allowed_address_pair)

raising an exception not typically raised from API/request validation layer, so raising it here seems to be appropriate.

Changed in neutron:
importance: Undecided → Wishlist
status: New → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Liping Mao (limao) wrote :

Not only in allowedaddresspairs, but also in the following extensions:
extra_dhcp_opt
extraroute
multiprovidernet
providernet
securitygroup

But I think raise the message here is also OK.

Revision history for this message
Cedric Brandily (cbrandily) wrote :

This bug is > 365 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: Wei Wang (damon-devops) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.