diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-12-11 07:03:54 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-12-11 07:21:40 +0000 |
| commit | 17bb753daaf43bad656ae88393da3c6709f4d8e3 (patch) | |
| tree | 34974a4ef4e5de4a694834d1c9fae5ca0608de68 /openstack/common/rpc/__init__.py | |
| parent | e6c576d9b08e96b0dcd6b630eefa84fa1bec9f16 (diff) | |
Register the control_exchange RPC option
Fixes bug #1031725
Have the control_exchange option be registered by Oslo, but allow
projects to override the default of 'openstack' by doing e.g.:
rpc.set_defaults(control_exchange='nova')
Change-Id: Ic6e534d9a70a1cfc94207b78caa57e897cf78f63
Diffstat (limited to 'openstack/common/rpc/__init__.py')
| -rw-r--r-- | openstack/common/rpc/__init__.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/openstack/common/rpc/__init__.py b/openstack/common/rpc/__init__.py index e11fa16..902cea2 100644 --- a/openstack/common/rpc/__init__.py +++ b/openstack/common/rpc/__init__.py @@ -57,19 +57,19 @@ rpc_opts = [ cfg.BoolOpt('fake_rabbit', default=False, help='If passed, use a fake RabbitMQ provider'), - # - # The following options are not registered here, but are expected to be - # present. The project using this library must register these options with - # the configuration so that project-specific defaults may be defined. - # - #cfg.StrOpt('control_exchange', - # default='nova', - # help='AMQP exchange to connect to if using RabbitMQ or Qpid'), + cfg.StrOpt('control_exchange', + default='openstack', + help='AMQP exchange to connect to if using RabbitMQ or Qpid'), ] cfg.CONF.register_opts(rpc_opts) +def set_defaults(control_exchange): + cfg.set_defaults(rpc_opts, + control_exchange=control_exchange) + + def create_connection(new=True): """Create a connection to the message bus used for rpc. |
