oci_discovery/uri_template: Stub for URI Template expansion#7
oci_discovery/uri_template: Stub for URI Template expansion#7xiekeyang merged 1 commit intoxiekeyang:masterfrom
Conversation
Python's .format can handle things like {host}, but there's a lot more
than that in RFC 6570. Instead of rolling our own implementation,
punt to the uritemplate package [1]. The license is [1,2]:
BSD-3-Clause OR Apache-2.0
which should be compatible with the OCI's Apache-2.0 requirement [3],
even if that requirement applies to third-party dependencies, which is
not clear to me.
[1]: https://pypi.python.org/pypi/uritemplate
[2]: https://github.com/python-hyper/uritemplate/blob/3.0.0/LICENSE
[3]: https://www.opencontainers.org/about/governance
Section 8.a
47093c9 to
06e2715
Compare
|
@wking , It seems this restriction will reject hostname of {IP}:{PORT}, which is too generally used to build local server. How can I discovery image when I set nginx server localhost:8080? I think in this stage we needn't set too much restriction. And, the OCI index fetching workflow prompts log: Actually I can fetch the index: You are split the URI by Now I'm debugging the workflow in README, and is confused a little by some internal mechanism. |
I've spun that off into #9, since it relates to the host-based image name spec, while this PR is just about the
I floated some ideas in this comment, although none of them are trivial. However, the |
It is guarded against IP addresses (here). It's just not guarded against IPv4-address-based-authorities (without the I think we want to keep ancestor walking to preserve the similar abd functionality. |
|
LGTM |
This snuck in with 06e2715 (oci_discovery/uri_template: Stub for URI Template expansion, 2017-09-11, xiekeyang#7).
Python's
.format()can handle things like{host}, but there's a lot more than that in RFC 6570. Instead of rolling our own implementation, punt to the uritemplate package. The license is:which should be compatible with the OCI's Apache-2.0 requirement, even if that requirement applies to third-party dependencies, which is not clear to me.