diff options
author | Radostin Stoyanov <rstoyanov1@gmail.com> | 2017-06-26 07:28:51 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cbosdonnat@suse.com> | 2017-06-28 13:59:36 +0200 |
commit | bb5932eea5e0f9c32bb782ca70e2c9d0af0e0940 (patch) | |
tree | 4d602715cbf94961d834b2b8594c4856130296d7 /src/virtBootstrap/virt_bootstrap.py | |
parent | c5c66a84e0a38aa8c4daa5c458f626106c7a6768 (diff) | |
download | virt-bootstrap.git-bb5932eea5e0f9c32bb782ca70e2c9d0af0e0940.tar.gz virt-bootstrap.git-bb5932eea5e0f9c32bb782ca70e2c9d0af0e0940.tar.xz virt-bootstrap.git-bb5932eea5e0f9c32bb782ca70e2c9d0af0e0940.zip |
Auto-correct docker source URI
Skopeo does not accept "docker:///" as valid URI format. [1]
However, driver URIs within the Libvirt project and virtualization
tools such as libvirt-sandbox use three slashes after URI scheme. [2]
Make virt-bootstrap auto-correct the source URI for consistency with
other tools.
Following the syntax specifications in RFC 1808, "urlparse" recognizes
a netloc only if it is properly introduced by ‘//’. [3] Otherwise the
input is presumed to be a relative URL and thus to start with a path
component. [4]
- "self.image" is the path component
- "self.registry" is the netloc component
[1] https://github.com/projectatomic/skopeo/blob/master/docs/skopeo.1.md#skopeo-copy-1
[2] http://libvirt.org/uri.html
[3] https://docs.python.org/2/library/urlparse.html
[4] https://hg.python.org/cpython/file/2.7/Lib/urlparse.py#l187
Diffstat (limited to 'src/virtBootstrap/virt_bootstrap.py')
0 files changed, 0 insertions, 0 deletions