From 810edd4c649d4d378ce0d3872a4c9b558af27bd6 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 10 Jun 2013 21:46:12 -0400 Subject: Sync can_send_version() helper from oslo-incubator. This patch syncs a helper method added to the RpcProxy class from oslo-incubator. Change-Id: Ifd374245c15cef7af7487a19935193b590c1bd4e --- nova/openstack/common/rpc/proxy.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova/openstack') diff --git a/nova/openstack/common/rpc/proxy.py b/nova/openstack/common/rpc/proxy.py index dcdfc0864..345457b69 100644 --- a/nova/openstack/common/rpc/proxy.py +++ b/nova/openstack/common/rpc/proxy.py @@ -76,6 +76,10 @@ class RpcProxy(object): """Return the topic to use for a message.""" return topic if topic else self.topic + def can_send_version(self, version): + return (not self.version_cap or + rpc_common.version_is_compatible(self.version_cap, version)) + @staticmethod def make_namespaced_msg(method, namespace, **kwargs): return {'method': method, 'namespace': namespace, 'args': kwargs} -- cgit