diff options
author | Andrey Shestakov <ashestakov@mirantis.com> | 2016-07-25 16:53:31 +0300 |
---|---|---|
committer | Andrey Shestakov <ashestakov@mirantis.com> | 2016-08-05 08:34:22 +0000 |
commit | 8b69189fdd87592a2a98be1a8bdfa20e76744cb1 (patch) | |
tree | 248fe977dd0941d451df3645ef1d5dc0806d1d7c /neutron/notifiers | |
parent | 1c3d44a64078a5ccd672ea0954c541307365920d (diff) | |
download | neutron-8b69189fdd87592a2a98be1a8bdfa20e76744cb1.tar.gz |
Consider baremetal device_owner as compute for nova notify
Interface should be correctly removed from ironic when port-delete.
Nova should receive notify when baremetal port deleted.
Change-Id: I3d53bff8278dabafd929ecbea0b4b3b441c9e1cf
Partial-Bug: #1606229
Diffstat (limited to 'neutron/notifiers')
-rw-r--r-- | neutron/notifiers/nova.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/neutron/notifiers/nova.py b/neutron/notifiers/nova.py index 9f7336e311..20f4048598 100644 --- a/neutron/notifiers/nova.py +++ b/neutron/notifiers/nova.py @@ -27,6 +27,7 @@ from neutron._i18n import _LE, _LI, _LW from neutron.callbacks import events from neutron.callbacks import registry from neutron.callbacks import resources +from neutron.common import constants as n_const from neutron import context from neutron import manager from neutron.notifiers import batch_notifier @@ -84,8 +85,9 @@ class Notifier(object): def _is_compute_port(self, port): try: if (port['device_id'] and uuidutils.is_uuid_like(port['device_id']) - and port['device_owner'].startswith( - constants.DEVICE_OWNER_COMPUTE_PREFIX)): + and port['device_owner'].startswith(( + constants.DEVICE_OWNER_COMPUTE_PREFIX, + n_const.DEVICE_OWNER_BAREMETAL_PREFIX))): return True except (KeyError, AttributeError): pass |