Rename messaging module to message

Looking at the project names [1] it's clear that the official names don't end
in 'ing' (the only exception being Networking). The SDK follows the official
names as our module naming convention.

Hence we should not append 'ing' to module names whether they have an official
name in that list or not. We need to rename the messaging module to message.

[1] https://wiki.openstack.org/wiki/Documentation/Conventions

Change-Id: I2a433cb72341e2660e33cd3f946e2f22eed19622
This commit is contained in:
Everett Toews 2015-05-28 16:29:38 -05:00
parent 9a02c1db71
commit 8793800fa5
13 changed files with 24 additions and 24 deletions

View File

@ -13,14 +13,14 @@
from openstack.auth import service_filter from openstack.auth import service_filter
class MessagingService(service_filter.ServiceFilter): class MessageService(service_filter.ServiceFilter):
"""The messaging service.""" """The message service."""
valid_versions = [service_filter.ValidVersion('v1')] valid_versions = [service_filter.ValidVersion('v1')]
def __init__(self, version=None): def __init__(self, version=None):
"""Create an messaging service.""" """Create a message service."""
super(MessagingService, self).__init__( super(MessageService, self).__init__(
service_type='messaging', service_type='messaging',
version=version version=version
) )

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.messaging.v1 import queue from openstack.message.v1 import queue
from openstack import proxy from openstack import proxy
@ -20,10 +20,10 @@ class Proxy(proxy.BaseProxy):
"""Create a new queue from attributes """Create a new queue from attributes
:param dict attrs: Keyword arguments which will be used to create :param dict attrs: Keyword arguments which will be used to create
a :class:`~openstack.messaging.v1.queue.Queue`, a :class:`~openstack.message.v1.queue.Queue`,
comprised of the properties on the Queue class. comprised of the properties on the Queue class.
:returns: The results of queue creation :returns: The results of queue creation
:rtype: :class:`~openstack.messaging.v1.queue.Queue` :rtype: :class:`~openstack.message.v1.queue.Queue`
""" """
return self._create(queue.Queue, **attrs) return self._create(queue.Queue, **attrs)

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.messaging import messaging_service from openstack.message import message_service
from openstack import resource from openstack import resource
@ -18,7 +18,7 @@ class Queue(resource.Resource):
id_attribute = 'name' id_attribute = 'name'
resources_key = 'queues' resources_key = 'queues'
base_path = '/queues' base_path = '/queues'
service = messaging_service.MessagingService() service = message_service.MessageService()
# capabilities # capabilities
allow_create = True allow_create = True

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.messaging import messaging_service from openstack.message import message_service
from openstack import resource from openstack import resource
@ -18,8 +18,8 @@ class Version(resource.Resource):
resource_key = 'version' resource_key = 'version'
resources_key = 'versions' resources_key = 'versions'
base_path = '/' base_path = '/'
service = messaging_service.MessagingService( service = message_service.MessageService(
version=messaging_service.MessagingService.UNVERSIONED version=message_service.MessageService.UNVERSIONED
) )
# capabilities # capabilities

View File

@ -59,7 +59,7 @@ from openstack import exceptions
from openstack.identity import identity_service from openstack.identity import identity_service
from openstack.image import image_service from openstack.image import image_service
from openstack.keystore import keystore_service from openstack.keystore import keystore_service
from openstack.messaging import messaging_service from openstack.message import message_service
from openstack.metric import metric_service from openstack.metric import metric_service
from openstack.network import network_service from openstack.network import network_service
from openstack.object_store import object_store_service from openstack.object_store import object_store_service
@ -121,7 +121,7 @@ class Profile(object):
serv = volume_service.VolumeService() serv = volume_service.VolumeService()
serv.set_visibility(None) serv.set_visibility(None)
self._services[serv.service_type] = serv self._services[serv.service_type] = serv
serv = messaging_service.MessagingService() serv = message_service.MessageService()
serv.set_visibility(None) serv.set_visibility(None)
self._services[serv.service_type] = serv self._services[serv.service_type] = serv

View File

@ -12,13 +12,13 @@
import testtools import testtools
from openstack.messaging import messaging_service from openstack.message import message_service
class TestOrchestrationService(testtools.TestCase): class TestMessageService(testtools.TestCase):
def test_service(self): def test_service(self):
sot = messaging_service.MessagingService() sot = message_service.MessageService()
self.assertEqual('messaging', sot.service_type) self.assertEqual('messaging', sot.service_type)
self.assertEqual('public', sot.visibility) self.assertEqual('public', sot.visibility)
self.assertIsNone(sot.region) self.assertIsNone(sot.region)

View File

@ -12,7 +12,7 @@
import testtools import testtools
from openstack.messaging import version from openstack.message import version
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
EXAMPLE = { EXAMPLE = {

View File

@ -10,14 +10,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.messaging.v1 import _proxy from openstack.message.v1 import _proxy
from openstack.messaging.v1 import queue from openstack.message.v1 import queue
from openstack.tests.unit import test_proxy_base from openstack.tests.unit import test_proxy_base
class TestMessagingProxy(test_proxy_base.TestProxyBase): class TestMessageProxy(test_proxy_base.TestProxyBase):
def setUp(self): def setUp(self):
super(TestMessagingProxy, self).setUp() super(TestMessageProxy, self).setUp()
self.proxy = _proxy.Proxy(self.session) self.proxy = _proxy.Proxy(self.session)
def test_queue_create_attrs(self): def test_queue_create_attrs(self):

View File

@ -13,7 +13,7 @@
import mock import mock
import testtools import testtools
from openstack.messaging.v1 import queue from openstack.message.v1 import queue
FAKE_NAME = 'test_queue' FAKE_NAME = 'test_queue'
@ -22,7 +22,7 @@ FAKE = {
} }
class TestStack(testtools.TestCase): class TestQueue(testtools.TestCase):
def test_basic(self): def test_basic(self):
sot = queue.Queue() sot = queue.Queue()