xiekeyang / oci-discovery

Contain the OCI Ref-engine Discovery specification and related specifications as an extention to the image specification.
Other
2 stars 1 forks source link

oci_discovery/ref_engine_discovery/ancestor_hosts.py: Handle dotless names #10

Closed wking closed 7 years ago

wking commented 7 years ago

Like localhost. These are unlikely to be portable, but they do match the host ABNF:

 host          = IP-literal / IPv4address / reg-name
 reg-name      = *( unreserved / pct-encoded / sub-delims )
 unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
 pct-encoded   = "%" HEXDIG HEXDIG
 sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
               / "*" / "+" / "," / ";" / "="
xiekeyang commented 7 years ago

LGTM It works correctly.