The openstack_dashboard.openstack.common.rpc.proxy ModuleΒΆ
A helper class for proxy objects to remote APIs.
- For more information about rpc API version numbers, see:
- rpc/dispatcher.py
- class openstack_dashboard.openstack.common.rpc.proxy.RpcProxy(topic, default_version, version_cap=None, serializer=None)[source]
Bases: object
A helper class for rpc clients.
This class is a wrapper around the RPC client API. It allows you to specify the topic and API version in a single place. This is intended to be used as a base class for a class that implements the client side of an rpc API.
- RPC_API_NAMESPACE = None
- call(context, msg, topic=None, version=None, timeout=None)[source]
rpc.call() a remote method.
Parameters: - context – The request context
- msg – The message to send, including the method and args.
- topic – Override the topic for this message.
- version – (Optional) Override the requested API version in this message.
- timeout – (Optional) A timeout to use when waiting for the response. If no timeout is specified, a default timeout will be used that is usually sufficient.
Returns: The return value from the remote method.
- cast(context, msg, topic=None, version=None)[source]
rpc.cast() a remote method.
Parameters: - context – The request context
- msg – The message to send, including the method and args.
- topic – Override the topic for this message.
- version – (Optional) Override the requested API version in this message.
Returns: None. rpc.cast() does not wait on any return value from the remote method.
- cast_to_server(context, server_params, msg, topic=None, version=None)[source]
rpc.cast_to_server() a remote method.
Parameters: - context – The request context
- server_params – Server parameters. See rpc.cast_to_server() for details.
- msg – The message to send, including the method and args.
- topic – Override the topic for this message.
- version – (Optional) Override the requested API version in this message.
Returns: None. rpc.cast_to_server() does not wait on any return values.
- fanout_cast(context, msg, topic=None, version=None)[source]
rpc.fanout_cast() a remote method.
Parameters: - context – The request context
- msg – The message to send, including the method and args.
- topic – Override the topic for this message.
- version – (Optional) Override the requested API version in this message.
Returns: None. rpc.fanout_cast() does not wait on any return value from the remote method.
- fanout_cast_to_server(context, server_params, msg, topic=None, version=None)[source]
rpc.fanout_cast_to_server() a remote method.
Parameters: - context – The request context
- server_params – Server parameters. See rpc.cast_to_server() for details.
- msg – The message to send, including the method and args.
- topic – Override the topic for this message.
- version – (Optional) Override the requested API version in this message.
Returns: None. rpc.fanout_cast_to_server() does not wait on any return values.
- make_msg(method, **kwargs)[source]
- static make_namespaced_msg(method, namespace, **kwargs)[source]
- multicall(context, msg, topic=None, version=None, timeout=None)[source]
rpc.multicall() a remote method.
Parameters: - context – The request context
- msg – The message to send, including the method and args.
- topic – Override the topic for this message.
- version – (Optional) Override the requested API version in this message.
- timeout – (Optional) A timeout to use when waiting for the response. If no timeout is specified, a default timeout will be used that is usually sufficient.
Returns: An iterator that lets you process each of the returned values from the remote method as they arrive.