]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Adopt rpc_api devref to new oslo_messaging namespace
authorIhar Hrachyshka <ihrachys@redhat.com>
Sat, 7 Feb 2015 09:15:28 +0000 (10:15 +0100)
committerIhar Hrachyshka <ihrachys@redhat.com>
Sat, 7 Feb 2015 09:56:34 +0000 (10:56 +0100)
Change-Id: Ib6f58cffae882652da52962c9e61298193b50d62

doc/source/devref/rpc_api.rst

index 866086af27f1820e43e3756605e4f5afd916592d..5a417ab7881080e6af49bec848d7e8f4640a2d10 100644 (file)
@@ -16,7 +16,7 @@ Here is an example of an rpc client definition:
 
 ::
 
-  from oslo import messaging
+  import oslo_messaging
 
   from neutron.common import rpc as n_rpc
 
@@ -30,7 +30,7 @@ Here is an example of an rpc client definition:
       """
 
       def __init__(self, topic):
-          target = messaging.Target(topic=topic, version='1.0')
+          target = oslo_messaging.Target(topic=topic, version='1.0')
           self.client = n_rpc.get_client(target)
 
       def my_remote_method(self, context, arg1, arg2):
@@ -55,12 +55,12 @@ The server side of an rpc interface looks like this:
 
 ::
 
-  from oslo import messaging
+  import oslo_messaging
 
 
   class ServerAPI(object):
 
-      target = messaging.Target(version='1.1')
+      target = oslo_messaging.Target(version='1.1')
 
       def my_remote_method(self, context, arg1, arg2):
           return 'foo'
@@ -69,8 +69,9 @@ The server side of an rpc interface looks like this:
           return 'bar'
 
 
-This class implements the server side of the interface.  The messaging.Target()
-defined says that this class currently implements version 1.1 of the interface.
+This class implements the server side of the interface.  The
+oslo_messaging.Target() defined says that this class currently implements
+version 1.1 of the interface.
 
 Versioning
 ==========
@@ -95,12 +96,12 @@ code would look like this:
 
 ::
 
-  from oslo import messaging
+  import oslo_messaging
 
 
   class ServerAPI(object):
 
-      target = messaging.Target(version='1.2')
+      target = oslo_messaging.Target(version='1.2')
 
       def my_remote_method(self, context, arg1, arg2):
           return 'foo'
@@ -116,7 +117,7 @@ successful.  The updated client side would look like this:
 
 ::
 
-  from oslo import messaging
+  import oslo_messaging
 
   from neutron.common import rpc as n_rpc
 
@@ -131,7 +132,7 @@ successful.  The updated client side would look like this:
       """
 
       def __init__(self, topic):
-          target = messaging.Target(topic=topic, version='1.0')
+          target = oslo_messaging.Target(topic=topic, version='1.0')
           self.client = n_rpc.get_client(target)
 
       def my_remote_method(self, context, arg1, arg2):