]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Drop RpcCallback usage from DhcpRpcCallback
authorRussell Bryant <rbryant@redhat.com>
Wed, 12 Nov 2014 18:33:45 +0000 (18:33 +0000)
committerRussell Bryant <rbryant@redhat.com>
Wed, 19 Nov 2014 17:18:34 +0000 (17:18 +0000)
Drop the usage of the RpcCallback compatibility class from
DhcpRpcCallback.

Part of blueprint drop-rpc-compat.

Change-Id: I7c4654455c15c4a545c8b19bfcbf617e6d6593d6

neutron/api/rpc/handlers/dhcp_rpc.py

index 58317eac4b62fa9ed1603af0938e6b72e61b04a1..85efe177758ff3ad3c7e7c00372979941d529f8c 100644 (file)
 
 from oslo.config import cfg
 from oslo.db import exception as db_exc
+from oslo import messaging
 
 from neutron.api.v2 import attributes
 from neutron.common import constants
 from neutron.common import exceptions as n_exc
-from neutron.common import rpc as n_rpc
 from neutron.common import utils
 from neutron.extensions import portbindings
 from neutron import manager
@@ -30,14 +30,14 @@ from neutron.openstack.common import log as logging
 LOG = logging.getLogger(__name__)
 
 
-class DhcpRpcCallback(n_rpc.RpcCallback):
+class DhcpRpcCallback(object):
     """DHCP agent RPC callback in plugin implementations."""
 
     # API version history:
     #     1.0 - Initial version.
     #     1.1 - Added get_active_networks_info, create_dhcp_port,
     #           and update_dhcp_port methods.
-    RPC_API_VERSION = '1.1'
+    target = messaging.Target(version='1.1')
 
     def _get_active_networks(self, context, **kwargs):
         """Retrieve and return a list of the active networks."""