You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We removed calls to configure the libvirt-based firewall driver in
'_create_guest_with_network' as part of change
I5a9e5532c46a5f7064441ae644125d21efe5fda1. Since then, there only other
way we can successfully create a guest and still end up in an exception
handler is if the plugging of VIFs fails. Despite this, all three code
paths still contained references to a 'guest' attribute that would never
be set.
Clarify things by removing the use of the 'guest' attribute from the
other code paths. This means the '_cleanup_failed_start' helper only has
one caller and some unnecessary logic itself, so we can fold that into
its caller. We also take this opportunity to remove an unnecessary
error handler - 'nova.exception.VirtualInterfaceCreateException' is
derived from 'Exception' and doesn't need its own handler - and add the
type hints for the function. The heavy lifting for the latter was
already done in change I2489bf16dabc8a83b2044139247f4245ae29adb1 so this
is pretty easy to grok.
Next up, we really need to stop passing around dicts of block device
mapping info, but that's another change for another day.
Change-Id: I0b93bdc12cdce591c7e642ab8830e92445467b9a
Signed-off-by: Stephen Finucane <[email protected]>
(cherry picked from commit dc814a6)
0 commit comments