We're using a 'profile' getter/setter in the 'VIFMigrateData' object to
ensure we transform the JSON encoded string we store in the database to
an actual dictionary on load and vice versa on save. However, because
the getter is returning a new object (constructed from 'json.loads')
rather than a reference to the original data (which is a string),
modifying this object doesn't actually change the underlying data in the
object. We were relying on this broken behavior to set the
'supports_os_vif_delegation' attribute of the 'VIFMigrateData' object
and trigger the delegated port creation introduced in change
I11fb5d3ada7f27b39c183157ea73c8b72b4e672e, which means that code isn't
actually doing anything yet. Resolve this.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /797142 /opendev. org/openstack/ nova/commit/ 99cf5292c782828 ea33a3448ae0e7d a028d5d176
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 99cf5292c782828 ea33a3448ae0e7d a028d5d176
Author: Stephen Finucane <email address hidden>
Date: Fri Jun 18 17:55:50 2021 +0100
objects: Fix VIFMigrateData. supports_ os_vif_ delegation setter
We're using a 'profile' getter/setter in the 'VIFMigrateData' object to os_vif_ delegation' attribute of the 'VIFMigrateData' object 7f27b39c183157e a73c8b72b4e672e , which means that code isn't
ensure we transform the JSON encoded string we store in the database to
an actual dictionary on load and vice versa on save. However, because
the getter is returning a new object (constructed from 'json.loads')
rather than a reference to the original data (which is a string),
modifying this object doesn't actually change the underlying data in the
object. We were relying on this broken behavior to set the
'supports_
and trigger the delegated port creation introduced in change
I11fb5d3ada
actually doing anything yet. Resolve this.
Change-Id: I362deb1088c88c dcd8219922da9dc 9a01b10a940
Signed-off-by: Stephen Finucane <email address hidden>
Related-Bug: #1734320
Related-Bug: #1815989