Drop use of 'oslo' namespace package.

The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: I4e1cb4f1caaee61683dc9fb0ffc67e8f9e06dc6d
This commit is contained in:
Doug Hellmann
2015-04-28 15:32:02 +00:00
parent 8aac887e9c
commit 1e4cd8cb55
8 changed files with 23 additions and 21 deletions

View File

@@ -28,7 +28,7 @@ import traceback
import eventlet.backdoor import eventlet.backdoor
import greenlet import greenlet
from oslo.config import cfg from oslo_config import cfg
from barbican.openstack.common._i18n import _LI from barbican.openstack.common._i18n import _LI

View File

@@ -20,7 +20,7 @@ import os
import stat import stat
import tempfile import tempfile
from oslo.utils import excutils from oslo_utils import excutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@@ -35,7 +35,7 @@ except ImportError:
import eventlet import eventlet
from eventlet import event from eventlet import event
from oslo.config import cfg from oslo_config import cfg
from barbican.openstack.common import eventlet_backdoor from barbican.openstack.common import eventlet_backdoor
from barbican.openstack.common._i18n import _LE, _LI, _LW from barbican.openstack.common._i18n import _LE, _LI, _LW

View File

@@ -17,7 +17,7 @@
import os import os
import ssl import ssl
from oslo.config import cfg from oslo_config import cfg
from barbican.openstack.common.gettextutils import _ # noqa from barbican.openstack.common.gettextutils import _ # noqa

View File

@@ -17,7 +17,7 @@ import os
import uuid import uuid
from OpenSSL import crypto from OpenSSL import crypto
from oslo.config import cfg from oslo_config import cfg
from barbican.common import utils from barbican.common import utils
from barbican.openstack.common import gettextutils as u from barbican.openstack.common import gettextutils as u

View File

@@ -16,7 +16,7 @@
""" """
Server-side (i.e. worker side) Keystone notification related classes and logic. Server-side (i.e. worker side) Keystone notification related classes and logic.
""" """
from oslo import messaging import oslo_messaging
from barbican.common import utils from barbican.common import utils
from barbican.openstack.common import service from barbican.openstack.common import service
@@ -57,14 +57,16 @@ class NotificationTask(object):
as acknowledgment. as acknowledgment.
Messaging server considers message is acknowledged when either return Messaging server considers message is acknowledged when either return
value is `messaging.NotificationResult.HANDLED` or None. value is `oslo_messaging.NotificationResult.HANDLED` or None.
In case of successful processing of notification, the returned value is In case of successful processing of notification, the returned value is
`messaging.NotificationResult.HANDLED` `oslo_messaging.NotificationResult.HANDLED`
In case of notification processing error, the value returned
is oslo_messaging.NotificationResult.REQUEUE when transport
supports this feature otherwise
`oslo_messaging.NotificationResult.HANDLED` is returned.
In case of notification processing error, the value returned is
messaging.NotificationResult.REQUEUE when transport supports this
feature otherwise `messaging.NotificationResult.HANDLED` is returned.
""" """
LOG.debug("Input keystone event publisher_id = %s", publisher_id) LOG.debug("Input keystone event publisher_id = %s", publisher_id)
@@ -85,7 +87,7 @@ class NotificationTask(object):
task.process(project_id=project_id, task.process(project_id=project_id,
resource_type=resource_type, resource_type=resource_type,
operation_type=operation_type) operation_type=operation_type)
return messaging.NotificationResult.HANDLED return oslo_messaging.NotificationResult.HANDLED
except Exception: except Exception:
# No need to log message here as task process method has # No need to log message here as task process method has
# already logged it # already logged it
@@ -94,9 +96,9 @@ class NotificationTask(object):
# for any exception otherwise tasks will be re-queued # for any exception otherwise tasks will be re-queued
# repeatedly. Revisit as part of the retry task work later. # repeatedly. Revisit as part of the retry task work later.
if self.conf.keystone_notifications.allow_requeue: if self.conf.keystone_notifications.allow_requeue:
return messaging.NotificationResult.REQUEUE return oslo_messaging.NotificationResult.REQUEUE
else: else:
return messaging.NotificationResult.HANDLED return oslo_messaging.NotificationResult.HANDLED
return None # in case event is not project delete return None # in case event is not project delete
def _parse_event_type(self, event_type): def _parse_event_type(self, event_type):

View File

@@ -19,7 +19,7 @@ from Crypto.Util import asn1
import fixtures import fixtures
import mock import mock
from OpenSSL import crypto from OpenSSL import crypto
from oslo.config import fixture as oslo_fixture from oslo_config import fixture as oslo_fixture
import barbican.plugin.interface.certificate_manager as cm import barbican.plugin.interface.certificate_manager as cm
from barbican.plugin import snakeoil_ca from barbican.plugin import snakeoil_ca

View File

@@ -15,8 +15,8 @@
import uuid import uuid
import mock import mock
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging
import six import six
from barbican.openstack.common import service from barbican.openstack.common import service
@@ -109,7 +109,7 @@ class WhenUsingNotificationTask(UtilMixin, utils.BaseTestCase):
mock_process.assert_called_once_with(project_id=project_id, mock_process.assert_called_once_with(project_id=project_id,
operation_type='deleted', operation_type='deleted',
resource_type='project') resource_type='project')
self.assertEqual(messaging.NotificationResult.HANDLED, result) self.assertEqual(oslo_messaging.NotificationResult.HANDLED, result)
@mock.patch.object(consumer.KeystoneEventConsumer, 'process', @mock.patch.object(consumer.KeystoneEventConsumer, 'process',
return_value=None) return_value=None)
@@ -124,7 +124,7 @@ class WhenUsingNotificationTask(UtilMixin, utils.BaseTestCase):
mock_process.assert_called_once_with(project_id=project_id, mock_process.assert_called_once_with(project_id=project_id,
operation_type='deleted', operation_type='deleted',
resource_type='project') resource_type='project')
self.assertEqual(messaging.NotificationResult.HANDLED, result) self.assertEqual(oslo_messaging.NotificationResult.HANDLED, result)
@mock.patch.object(consumer.KeystoneEventConsumer, 'process', @mock.patch.object(consumer.KeystoneEventConsumer, 'process',
return_value=None) return_value=None)
@@ -139,7 +139,7 @@ class WhenUsingNotificationTask(UtilMixin, utils.BaseTestCase):
mock_process.assert_called_once_with(project_id=project_id, mock_process.assert_called_once_with(project_id=project_id,
operation_type='deleted', operation_type='deleted',
resource_type='project') resource_type='project')
self.assertEqual(messaging.NotificationResult.HANDLED, result) self.assertEqual(oslo_messaging.NotificationResult.HANDLED, result)
@mock.patch.object(consumer.KeystoneEventConsumer, 'process', @mock.patch.object(consumer.KeystoneEventConsumer, 'process',
return_value=None) return_value=None)
@@ -240,7 +240,7 @@ class WhenUsingNotificationTask(UtilMixin, utils.BaseTestCase):
self.assertTrue(mock_process.called, 'Should call event consumer for' self.assertTrue(mock_process.called, 'Should call event consumer for'
' project delete event') ' project delete event')
self.assertEqual(messaging.NotificationResult.HANDLED, result) self.assertEqual(oslo_messaging.NotificationResult.HANDLED, result)
@mock.patch.object(consumer.KeystoneEventConsumer, 'process') @mock.patch.object(consumer.KeystoneEventConsumer, 'process')
def test_event_notification_with_processing_error_requeue_enabled( def test_event_notification_with_processing_error_requeue_enabled(
@@ -257,7 +257,7 @@ class WhenUsingNotificationTask(UtilMixin, utils.BaseTestCase):
self.assertTrue(mock_process.called, 'Should call event consumer for' self.assertTrue(mock_process.called, 'Should call event consumer for'
' project delete event') ' project delete event')
self.assertEqual(messaging.NotificationResult.REQUEUE, result) self.assertEqual(oslo_messaging.NotificationResult.REQUEUE, result)
class WhenUsingMessageServer(UtilMixin, utils.BaseTestCase): class WhenUsingMessageServer(UtilMixin, utils.BaseTestCase):