URIs for configuring persistence backends
Currently, persistence backend configuration requires 'connection' string in configuration dictionary, and it must be valid URI. But for most of backends only 'protocol' part of URI (which determines what backend to use) is meaningful, and other parts are silently ignored, which is somewhat confusing and requires additional code in examples and other such usecases. It is propose to:
- allow 'connection' to be just a backend name, not protocol (e.g. make 'memory' as valid connection string as 'memory://');
- use username, password, host:port and path parts from connection string as default values for backend parameter when applicable;
- warn to log if some part of connection string is not trivial but ignored.
Blueprint information
- Status:
- Complete
- Approver:
- Joshua Harlow
- Priority:
- Low
- Drafter:
- Ivan Melnikov
- Direction:
- Approved
- Assignee:
- Ivan Melnikov
- Definition:
- Approved
- Series goal:
- Accepted for 0.3
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Ivan Melnikov
- Completed by
- Joshua Harlow
Related branches
Related bugs
Sprints
Whiteboard
In sort, Look at https:/
The questionable part here is what to do if configuration becomes self-contradictive, e.g.
conf = {
'connection': 'file:/
'path': '/some/
}
I think that such cases should be treated as error.
Gerrit topic: https:/
Addressed by: https:/
Allow connection string to be just backend name
Addressed by: https:/
Integrate urlparse for configuration augmentation