Add support for link-local IPs in service.networks definition#3653
Add support for link-local IPs in service.networks definition#3653shin- merged 3 commits intodocker:masterfrom
Conversation
8d25c33 to
20a7813
Compare
| version = V2_0 | ||
|
|
||
| if version != V2_0: | ||
| if version not in (V2_0, V2_1): |
There was a problem hiding this comment.
minor: maybe if version == V1 would be more correct here, since it's the only version that would not be supported (now and in the future).
There was a problem hiding this comment.
Actually, we want to raise an error here if the user inputs a non-yet released version (like "2.5" or "3"), so I think the test as it is is more correct.
There was a problem hiding this comment.
Ah, good point. I forgot this could still be any string.
d2d395f to
db3059b
Compare
db3059b to
fc58728
Compare
|
Rebased, included docker/docker-py#1139 |
Signed-off-by: Joffrey F <[email protected]>
Signed-off-by: Joffrey F <[email protected]>
fc58728 to
66b395d
Compare
|
Rebased! |
dnephin
left a comment
There was a problem hiding this comment.
Couple small things I missed before, otherwise LGTM
I think pretty soon we'll want to add a Version object to make it easier to compare versions, but I don't think we need it just yet.
I also wonder if we could maintain the jsonschemas by having the 2.1 schema be just an addition to the 2.0 schema (maybe by including the 2.0 schema). I don't think we need to make that change in this PR, but we could look at it later.
compose/config/serialize.py
Outdated
|
|
||
| version = config.version | ||
| if version not in (V2_0, V2_1): | ||
| version = V2_0 |
There was a problem hiding this comment.
We should probably default to latest (V2_1) ?
docs/compose-file.md
Outdated
|
|
||
| #### link_local_ips | ||
|
|
||
| > [Version 2.1 file format](#version-2.1) only. |
There was a problem hiding this comment.
I think it'll be easier to maintain these docs if we word this as: "Added in Version 2.1 ..." instead of "only".
That way we don;t have to change the text when we add version 2.2 or 3
docs/compose-file.md
Outdated
| #### link_local_ips | ||
|
|
||
| > [Version 2.1 file format](#version-2.1) only. | ||
| > [Added in version 2.1](#version-2.1). |
There was a problem hiding this comment.
Sorry, this probably needs to be "file format version 2.1" or something like that, so it's not confused with the Compose version, right?
Minor docs fix Signed-off-by: Joffrey F <[email protected]>
b3b8a44 to
3342418
Compare
Fixes #3637