Only notify nova of port status changes if configured
Although notify_nova_on_port_status_changes defaults to true, it
could be to false, making the nova_notifier attribute unsafe to
use without checking.
This patch checks both the config option and that the attribute
exists, since the config could be changed after the plugin is
already initialized without the nova_notifier attribute being set.
Change-Id: Ide0f93275e60dffda10b7da59f6d81c5582c3849
Closes-bug: #1843269
(cherry picked from commit ab4320edb4661f74465ec49166f8d35b8216035f)
Reviewed: https:/ /review. opendev. org/728556 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=5832292d9d0 2fb49ef80c032b2 30c43526dd9dfc
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 5832292d9d02fb4 9ef80c032b230c4 3526dd9dfc
Author: Brian Haley <email address hidden>
Date: Mon Sep 9 09:51:30 2019 -0400
Only notify nova of port status changes if configured
Although notify_ nova_on_ port_status_ changes defaults to true, it
could be to false, making the nova_notifier attribute unsafe to
use without checking.
This patch checks both the config option and that the attribute
exists, since the config could be changed after the plugin is
already initialized without the nova_notifier attribute being set.
Change-Id: Ide0f93275e60df fda10b7da59f6d8 1c5582c3849 4465ec49166f8d3 5b8216035f)
Closes-bug: #1843269
(cherry picked from commit ab4320edb4661f7