Use common rpc pattern for all services

There is a commonly shared and proven rpc pattern used
across most OpenStack services that is already implemented
in watcher, but the functions are not used.

This patch basically makes use of the existing
rpc classes and removes some unnecessary code.

Change-Id: I57424561e0675a836d10b712ef1579a334f72018
This commit is contained in:
Erik Olof Gunnar Andersson
2021-01-19 00:24:55 -08:00
parent e91efbde01
commit e61f9b5e88
3 changed files with 46 additions and 49 deletions

View File

@@ -20,7 +20,6 @@ from unittest import mock
from oslo_config import cfg
import oslo_messaging as om
from watcher.common import rpc
from watcher.common import service
from watcher import objects
from watcher.tests import base
@@ -102,8 +101,6 @@ class TestService(base.TestCase):
def test_init_service(self):
dummy_service = service.Service(DummyManager)
self.assertIsInstance(dummy_service.serializer,
rpc.RequestContextSerializer)
self.assertIsInstance(
dummy_service.conductor_topic_handler,
om.rpc.server.RPCServer)