Browse Source

Support Tacker service in master branch

Change references to oslo.messaging into oslo_messaging

Change-Id: I281ada8dd859a221994ba99c3bbd1bfe3d186451
Closes-Bug: 1480551
changes/03/211403/4
Sridhar Ramaswamy 7 years ago
parent
commit
e67a9e03ae
  1. 2
      devstack/samples/sample-vnfd.yaml
  2. 5
      devstack/settings
  3. 10
      requirements.txt
  4. 4
      tacker/common/config.py
  5. 12
      tacker/common/rpc.py
  6. 14
      tacker/common/rpc_compat.py
  7. 8
      tacker/oslo_service.py
  8. 2
      tacker/tests/base.py

2
devstack/samples/sample-vnfd.yaml

@ -9,7 +9,7 @@ service_properties:
vdus:
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
network_interfaces:

5
devstack/settings

@ -21,11 +21,6 @@ enable_service h-api-cw
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
LIBS_FROM_GIT=python-tackerclient,tacker-horizon

10
requirements.txt

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

4
tacker/common/config.py

@ -19,8 +19,8 @@ Routines for configuring Tacker
import os
from oslo import messaging
from oslo_config import cfg
import oslo_messaging
from paste import deploy
from tacker.common import utils
@ -91,7 +91,7 @@ cfg.CONF.register_opts(core_opts)
cfg.CONF.register_cli_opts(core_cli_opts)
# 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://'
# Update the default QueuePool parameters. These can be tweaked by the
# configuration variables - max_pool_size, max_overflow and pool_timeout

12
tacker/common/rpc.py

@ -15,9 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo import messaging
from oslo.messaging import serializer as om_serializer
from oslo_config import cfg
import oslo_messaging
from oslo_messaging import serializer as om_serializer
from tacker.common import exceptions
from tacker import context
@ -51,10 +51,10 @@ TRANSPORT_ALIASES = {
def init(conf):
global TRANSPORT, NOTIFIER
exmods = get_allowed_exmods()
TRANSPORT = messaging.get_transport(conf,
TRANSPORT = oslo_messaging.get_transport(conf,
allowed_remote_exmods=exmods,
aliases=TRANSPORT_ALIASES)
NOTIFIER = messaging.Notifier(TRANSPORT)
NOTIFIER = oslo_messaging.Notifier(TRANSPORT)
def cleanup():
@ -80,7 +80,7 @@ def get_allowed_exmods():
def get_client(target, version_cap=None, serializer=None):
assert TRANSPORT is not None
serializer = PluginRpcSerializer(serializer)
return messaging.RPCClient(TRANSPORT,
return oslo_messaging.RPCClient(TRANSPORT,
target,
version_cap=version_cap,
serializer=serializer)
@ -89,7 +89,7 @@ def get_client(target, version_cap=None, serializer=None):
def get_server(target, endpoints, serializer=None):
assert TRANSPORT is not None
serializer = PluginRpcSerializer(serializer)
return messaging.get_rpc_server(TRANSPORT,
return oslo_messaging.get_rpc_server(TRANSPORT,
target,
endpoints,
executor='eventlet',

14
tacker/common/rpc_compat.py

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

8
tacker/oslo_service.py

@ -24,7 +24,7 @@ import inspect
import os.path
import random
from oslo import messaging
import oslo_messaging
from tacker import context
from tacker.openstack.common.gettextutils import _
@ -64,11 +64,11 @@ class RpcService(service.Service):
def start(self):
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]
transport = messaging.get_transport(self.conf,
transport = oslo_messaging.get_transport(self.conf,
aliases=TRANSPORT_ALIASES)
self.rpcserver = messaging.get_rpc_server(
self.rpcserver = oslo_messaging.get_rpc_server(
transport, target, endpoints, executor='eventlet',
serializer=self.serializer)

2
tacker/tests/base.py

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

Loading…
Cancel
Save