neutron: handle binding:profile=None during migration
The port binding:profile handling in _setup_migration_port_profile
and _update_port_binding_for_instance is not handling when the
binding:profile is set on the port but the value is None, which
results in a NoneType error. Neutron API does not define a format
for this field, or whether or not it will be specified on the port,
and if so, if it's an empty dict or None, so let's be safe and
make sure we handle None.
Because of how many places we access the binding:profile on
a port, this adds a common helper utility.
Co-Authored-By: Eric M Gonzalez <email address hidden>
Reviewed: https:/ /review. openstack. org/504260 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8ac7be36bed af0dd3467efc5b5 bffdb365b8231b
Committed: https:/
Submitter: Jenkins
Branch: master
commit 8ac7be36bedaf0d d3467efc5b5bffd b365b8231b
Author: Matt Riedemann <email address hidden>
Date: Thu Sep 14 18:04:20 2017 -0400
neutron: handle binding: profile= None during migration
The port binding:profile handling in _setup_ migration_ port_profile port_binding_ for_instance is not handling when the
and _update_
binding:profile is set on the port but the value is None, which
results in a NoneType error. Neutron API does not define a format
for this field, or whether or not it will be specified on the port,
and if so, if it's an empty dict or None, so let's be safe and
make sure we handle None.
Because of how many places we access the binding:profile on
a port, this adds a common helper utility.
Co-Authored-By: Eric M Gonzalez <email address hidden>
Change-Id: I564bac88fad6cc 47ccbf7425b1ab3 9899fdc1c2e
Closes-Bug: #1717365