Support Tacker service in master branch

Change references to oslo.messaging into oslo_messaging

Change-Id: I281ada8dd859a221994ba99c3bbd1bfe3d186451
Closes-Bug: 1480551
This commit is contained in:
Sridhar Ramaswamy 2015-08-10 17:31:42 -07:00
parent d88ab88a08
commit e67a9e03ae
8 changed files with 26 additions and 31 deletions

View File

@ -9,7 +9,7 @@ service_properties:
vdus: vdus:
vdu1: vdu1:
id: vdu1 id: vdu1
vm_image: cirros-0.3.2-x86_64-uec vm_image: cirros-0.3.4-x86_64-uec
instance_type: m1.tiny instance_type: m1.tiny
network_interfaces: network_interfaces:

View File

@ -21,11 +21,6 @@ enable_service h-api-cw
enable_service tacker enable_service tacker
# heat is patched
#HEAT_BRANCH=stable/kilo
HEAT_REPO=https://github.com/yamahata/heat.git
HEAT_BRANCH=bug/1451629
# python-tackerclient and tacker-horizon isn't installable from pip # python-tackerclient and tacker-horizon isn't installable from pip
LIBS_FROM_GIT=python-tackerclient,tacker-horizon LIBS_FROM_GIT=python-tackerclient,tacker-horizon

View File

@ -16,13 +16,13 @@ Jinja2>=2.6 # BSD License (3 clause)
kombu>=2.5.0 kombu>=2.5.0
netaddr>=0.7.12 netaddr>=0.7.12
#python-tackerclient>=2.3.4,<3 #python-tackerclient>=2.3.4,<3
SQLAlchemy>=0.9.7,<=0.9.99 SQLAlchemy<1.1.0,>=0.9.7
WebOb>=1.2.3 WebOb>=1.2.3
python-keystoneclient>=1.1.0 python-keystoneclient>=1.1.0
alembic>=0.7.2 alembic>=0.7.2
six>=1.9.0 six>=1.9.0
stevedore>=1.3.0,<1.4.0 # Apache-2.0 stevedore>=1.5.0 # Apache-2.0
oslo.config>=1.9.3,<1.10.0 # Apache-2.0 oslo.config>=1.11.0 # Apache-2.0
oslo.messaging>=1.8.0,<1.9.0 # Apache-2.0 oslo.messaging!=1.17.0,!=1.17.1,>=1.16.0 # Apache-2.0
oslo.rootwrap>=1.6.0,<1.7.0 # Apache-2.0 oslo.rootwrap>=2.0.0 # Apache-2.0
python-novaclient>=2.22.0 python-novaclient>=2.22.0

View File

@ -19,8 +19,8 @@ Routines for configuring Tacker
import os import os
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging
from paste import deploy from paste import deploy
from tacker.common import utils from tacker.common import utils
@ -91,7 +91,7 @@ cfg.CONF.register_opts(core_opts)
cfg.CONF.register_cli_opts(core_cli_opts) cfg.CONF.register_cli_opts(core_cli_opts)
# Ensure that the control exchange is set correctly # Ensure that the control exchange is set correctly
messaging.set_transport_defaults(control_exchange='tacker') oslo_messaging.set_transport_defaults(control_exchange='tacker')
_SQL_CONNECTION_DEFAULT = 'sqlite://' _SQL_CONNECTION_DEFAULT = 'sqlite://'
# Update the default QueuePool parameters. These can be tweaked by the # Update the default QueuePool parameters. These can be tweaked by the
# configuration variables - max_pool_size, max_overflow and pool_timeout # configuration variables - max_pool_size, max_overflow and pool_timeout

View File

@ -15,9 +15,9 @@
# 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 oslo import messaging
from oslo.messaging import serializer as om_serializer
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging
from oslo_messaging import serializer as om_serializer
from tacker.common import exceptions from tacker.common import exceptions
from tacker import context from tacker import context
@ -51,10 +51,10 @@ TRANSPORT_ALIASES = {
def init(conf): def init(conf):
global TRANSPORT, NOTIFIER global TRANSPORT, NOTIFIER
exmods = get_allowed_exmods() exmods = get_allowed_exmods()
TRANSPORT = messaging.get_transport(conf, TRANSPORT = oslo_messaging.get_transport(conf,
allowed_remote_exmods=exmods, allowed_remote_exmods=exmods,
aliases=TRANSPORT_ALIASES) aliases=TRANSPORT_ALIASES)
NOTIFIER = messaging.Notifier(TRANSPORT) NOTIFIER = oslo_messaging.Notifier(TRANSPORT)
def cleanup(): def cleanup():
@ -80,7 +80,7 @@ def get_allowed_exmods():
def get_client(target, version_cap=None, serializer=None): def get_client(target, version_cap=None, serializer=None):
assert TRANSPORT is not None assert TRANSPORT is not None
serializer = PluginRpcSerializer(serializer) serializer = PluginRpcSerializer(serializer)
return messaging.RPCClient(TRANSPORT, return oslo_messaging.RPCClient(TRANSPORT,
target, target,
version_cap=version_cap, version_cap=version_cap,
serializer=serializer) serializer=serializer)
@ -89,7 +89,7 @@ def get_client(target, version_cap=None, serializer=None):
def get_server(target, endpoints, serializer=None): def get_server(target, endpoints, serializer=None):
assert TRANSPORT is not None assert TRANSPORT is not None
serializer = PluginRpcSerializer(serializer) serializer = PluginRpcSerializer(serializer)
return messaging.get_rpc_server(TRANSPORT, return oslo_messaging.get_rpc_server(TRANSPORT,
target, target,
endpoints, endpoints,
executor='eventlet', executor='eventlet',

View File

@ -13,8 +13,8 @@
# 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 oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging
from tacker.common import rpc as n_rpc from tacker.common import rpc as n_rpc
from tacker.openstack.common import log as logging from tacker.openstack.common import log as logging
@ -35,7 +35,7 @@ class RpcProxy(object):
def __init__(self, topic, default_version, version_cap=None): def __init__(self, topic, default_version, version_cap=None):
self.topic = topic self.topic = topic
target = messaging.Target(topic=topic, version=default_version) target = oslo_messaging.Target(topic=topic, version=default_version)
self._client = n_rpc.get_client(target, version_cap=version_cap) self._client = n_rpc.get_client(target, version_cap=version_cap)
def make_msg(self, method, **kwargs): def make_msg(self, method, **kwargs):
@ -83,7 +83,7 @@ class RpcCallback(object):
def __init__(self): def __init__(self):
super(RpcCallback, self).__init__() super(RpcCallback, self).__init__()
self.target = messaging.Target(version=self.RPC_API_VERSION) self.target = oslo_messaging.Target(version=self.RPC_API_VERSION)
class Service(service.Service): class Service(service.Service):
@ -143,7 +143,7 @@ class Connection(object):
self.servers = [] self.servers = []
def create_consumer(self, topic, endpoints, fanout=False): def create_consumer(self, topic, endpoints, fanout=False):
target = messaging.Target( target = oslo_messaging.Target(
topic=topic, server=cfg.CONF.host, fanout=fanout) topic=topic, server=cfg.CONF.host, fanout=fanout)
server = n_rpc.get_server(target, endpoints) server = n_rpc.get_server(target, endpoints)
self.servers.append(server) self.servers.append(server)
@ -160,6 +160,6 @@ def create_connection(new=True):
# exceptions # exceptions
RPCException = messaging.MessagingException RPCException = oslo_messaging.MessagingException
RemoteError = messaging.RemoteError RemoteError = oslo_messaging.RemoteError
MessagingTimeout = messaging.MessagingTimeout MessagingTimeout = oslo_messaging.MessagingTimeout

View File

@ -24,7 +24,7 @@ import inspect
import os.path import os.path
import random import random
from oslo import messaging import oslo_messaging
from tacker import context from tacker import context
from tacker.openstack.common.gettextutils import _ from tacker.openstack.common.gettextutils import _
@ -64,11 +64,11 @@ class RpcService(service.Service):
def start(self): def start(self):
super(RpcService, self).start() super(RpcService, self).start()
target = messaging.Target(topic=self.topic, server=self.host) target = oslo_messaging.Target(topic=self.topic, server=self.host)
endpoints = [self.manager] endpoints = [self.manager]
transport = messaging.get_transport(self.conf, transport = oslo_messaging.get_transport(self.conf,
aliases=TRANSPORT_ALIASES) aliases=TRANSPORT_ALIASES)
self.rpcserver = messaging.get_rpc_server( self.rpcserver = oslo_messaging.get_rpc_server(
transport, target, endpoints, executor='eventlet', transport, target, endpoints, executor='eventlet',
serializer=self.serializer) serializer=self.serializer)

View File

@ -28,8 +28,8 @@ import weakref
import eventlet.timeout import eventlet.timeout
import fixtures import fixtures
import mock import mock
from oslo.messaging import conffixture as messaging_conffixture
from oslo_config import cfg from oslo_config import cfg
from oslo_messaging import conffixture as messaging_conffixture
import testtools import testtools
from tacker.common import config from tacker.common import config