Aliases for deprecated transport names
We need to configure deprecated transport driver configurations like
rpc_backend = nova.openstack.
i.e. 'nova.openstack
Initially, we thought we'd support this by having each project put something like the following in their setup.cfg:
# These are for backwards compat with Grizzly rpc_backend configuration values
oslo.messaging.
nova.
nova.
nova.
However, we now realize that code like this:
url = str(TransportUR
will generate a bogus URL string like:
nova.
So, we want to supply these transport aliases to the TransportURL constructor and have the Transport.transport property use this set of aliases to map rpc_backend to the canonical transport driver name:
transport
}
def get_transport(conf, url=None, allowed_
...
# pass the aliases to TransportURL.
# note: this assumes a transport URL string will not use the deprecated aliases; this is only support for rpc_backend values
class TransportURL(
...
def __init__(self, conf, transport=None, virtual_host=None, hosts=None, transport_
...
@property
def transport(self):
if self._transport is None:
# map conf.rpc_backend using the aliases dict
Note: the advantage of this way of describing the aliases is that e.g. Nova's setup.cfg doesn't need to know the rabbit driver is oslo.messaging.
Blueprint information
- Status:
- Complete
- Approver:
- Mark McLoughlin
- Priority:
- High
- Drafter:
- Mark McLoughlin
- Direction:
- Approved
- Assignee:
- Mark McLoughlin
- Definition:
- Approved
- Series goal:
- Accepted for icehouse
- Implementation:
- Implemented
- Milestone target:
- 1.3.0
- Started by
- Mark McLoughlin
- Completed by
- Mark McLoughlin
Related branches
Related bugs
Sprints
Whiteboard
Addressed by: https:/
Add transport aliases
Gerrit topic: https:/