diff options
Diffstat (limited to 'openstack/common/rpc/proxy.py')
-rw-r--r-- | openstack/common/rpc/proxy.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openstack/common/rpc/proxy.py b/openstack/common/rpc/proxy.py index 3b74fe1..8523421 100644 --- a/openstack/common/rpc/proxy.py +++ b/openstack/common/rpc/proxy.py @@ -76,6 +76,11 @@ class RpcProxy(object): """Return the topic to use for a message.""" return topic if topic else self.topic + def can_send_version(self, version): + """Check to see if a version is compatible with the version cap.""" + 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} |