Both DVR and the HA code were setting the 'ha' and 'distributed'
flags in the API body before it was being sent into the core L3
code. This meant that it could not distinguish between
user-requested flags and config-defaults, which is important for
flavor validation.
This patch just adjusts it so they aren't set until after the core
create method is called.
Long term these will be refactored to live in their corresponding
driver anyway and will not need to be responsible for setting these
flags to get them stored in the DB.
Reviewed: https:/ /review. openstack. org/367333 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=b4b12f7ace8 4bbd62b3365ef05 e712d178a1de18
Committed: https:/
Submitter: Jenkins
Branch: master
commit b4b12f7ace84bbd 62b3365ef05e712 d178a1de18
Author: Kevin Benton <email address hidden>
Date: Wed Sep 7 22:49:43 2016 -0700
Defer setting 'ha'/'distributed' flags in L3 code
Both DVR and the HA code were setting the 'ha' and 'distributed'
flags in the API body before it was being sent into the core L3
code. This meant that it could not distinguish between
user-requested flags and config-defaults, which is important for
flavor validation.
This patch just adjusts it so they aren't set until after the core
create method is called.
Long term these will be refactored to live in their corresponding
driver anyway and will not need to be responsible for setting these
flags to get them stored in the DB.
Closes-Bug: #1621430 3cf5b86e8f1a2ba 7b073595921
Change-Id: I9945920d554065