diff options
| author | Russell Bryant <rbryant@redhat.com> | 2013-06-10 21:46:12 -0400 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2013-06-12 09:34:39 -0400 |
| commit | 810edd4c649d4d378ce0d3872a4c9b558af27bd6 (patch) | |
| tree | 5a9c540e9e558384b0d77d71d7adafa56ee3033d /nova/openstack | |
| parent | 32fca6ab41f1553476feed40cb8d64554d8a2977 (diff) | |
| download | nova-810edd4c649d4d378ce0d3872a4c9b558af27bd6.tar.gz nova-810edd4c649d4d378ce0d3872a4c9b558af27bd6.tar.xz nova-810edd4c649d4d378ce0d3872a4c9b558af27bd6.zip | |
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
Diffstat (limited to 'nova/openstack')
| -rw-r--r-- | nova/openstack/common/rpc/proxy.py | 4 |
1 files changed, 4 insertions, 0 deletions
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} |
