-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add support for link-local IPs in service.networks definition #3653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
fc58728 to
66b395d
Compare
|
Rebased! |
dnephin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <joffrey@docker.com>
b3b8a44 to
3342418
Compare
Fixes #3637