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/728554 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=acb5fba408f 7a8e4a429a91a46 ed5c764ade57a4
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit acb5fba408f7a8e 4a429a91a46ed5c 764ade57a4
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