URIs for configuring persistence backends

Registered by Ivan Melnikov

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

Sprints

Whiteboard

In sort, Look at https://github.com/openstack/taskflow/blob/master/taskflow/examples/example_utils.py#L59 and https://review.openstack.org/#/c/71385/ -- this blueprint proposes to do that inside backends and/or fetcher.

The questionable part here is what to do if configuration becomes self-contradictive, e.g.

conf = {
    'connection': 'file:///some/absolute/path',
    'path': '/some/another/path'
}

I think that such cases should be treated as error.

Gerrit topic: https://review.openstack.org/#q,topic:bp/persistence-uris,n,z

Addressed by: https://review.openstack.org/77522
    Allow connection string to be just backend name

Addressed by: https://review.openstack.org/85494
    Integrate urlparse for configuration augmentation

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.