The VIF['network'] field can be initialized to None and therefore
a later call to VIF.fixed_ips() could raise a TypeError. This problem
was visible during AttachInterfacesTestJSON tempest test case when
nova tried to emit instance.interfacae_attach notification.
This patch checks makes sure that if VIF['network'] is None then
VIF.fixed_ips() return an empty list instead of raising a TypeError.
Change-Id: Ib285d874b19be5bc1dbcd1d2af32e461f67e34cb
Closes-Bug: #1737201
(cherry picked from commit 553f2edde596348ca5447588c5a0b06f3b6be286)
(cherry picked from commit 4eff70621146d0ddca19b8e22c76d8ee3d043aed)
Reviewed: https:/ /review. openstack. org/531746 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=6a2882bb7bf abe0a694222c1e8 21fbe08fa26edf
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 6a2882bb7bfabe0 a694222c1e821fb e08fa26edf
Author: Balazs Gibizer <email address hidden>
Date: Wed Dec 13 17:14:49 2017 +0100
Fix possible TypeError in VIF.fixed_ips
The VIF['network'] field can be initialized to None and therefore sTestJSON tempest test case when interfacae_ attach notification.
a later call to VIF.fixed_ips() could raise a TypeError. This problem
was visible during AttachInterface
nova tried to emit instance.
This patch checks makes sure that if VIF['network'] is None then
VIF.fixed_ips() return an empty list instead of raising a TypeError.
Change-Id: Ib285d874b19be5 bc1dbcd1d2af32e 461f67e34cb ca5447588c5a0b0 6f3b6be286) dca19b8e22c76d8 ee3d043aed)
Closes-Bug: #1737201
(cherry picked from commit 553f2edde596348
(cherry picked from commit 4eff70621146d0d