Merge "Change default for [notifications]/default_publisher_id to $host"

This commit is contained in:
Jenkins 2017-08-29 06:07:53 +00:00 committed by Gerrit Code Review
commit 3c7a8185e6
3 changed files with 12 additions and 3 deletions

View File

@ -65,7 +65,7 @@ API service.
cfg.StrOpt(
'default_publisher_id',
default='$my_ip',
default='$host',
deprecated_group='DEFAULT',
deprecated_for_removal=True,
deprecated_since='17.0.0',
@ -81,12 +81,12 @@ notifications using different publisher, change this value accordingly.
Possible values:
* Defaults to the IPv4 address of this host, but it can be any valid
* Defaults to the current hostname of this host, but it can be any valid
oslo.messaging publisher_id
Related options:
* my_ip - IP address of this host
* host - Hostname, FQDN or IP address of this host.
"""),
cfg.StrOpt(
'notification_format',

View File

@ -19,6 +19,7 @@ import copy
import datetime
import mock
from oslo_config import cfg
from oslo_context import context as o_context
from oslo_context import fixture as o_fixture
from oslo_utils import timeutils
@ -36,6 +37,8 @@ from nova.tests.unit import fake_network
from nova.tests.unit import fake_notifier
from nova.tests import uuidsentinel as uuids
CONF = cfg.CONF
class NotificationsTestCase(test.TestCase):
@ -625,6 +628,7 @@ class NotificationsTestCase(test.TestCase):
self.assertEqual(n.event_type, func_name)
self.assertEqual(n.context, ctxt)
self.assertTrue(self.decorated_function_called)
self.assertEqual(CONF.host, n.publisher_id)
class NotificationsFormatTestCase(test.NoDBTestCase):

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The ``[notifications]/default_publisher_id`` configuration option now
defaults to ``[DEFAULT]/host`` rather than ``[DEFAULT]/my_ip``.