Moved "Memory", "MemorySwap" and "CpuShares" mappings from ContainerConfig to HostConfig by Khva0 · Pull Request #291 · docker-java/docker-java

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@KostyaSha

@Khva0

@KostyaSha

Will it be compatible with non 1.18 API?

@Khva0

It is compatible with 1.18 and current 1.19 API. And README.md says that docker-java supports Docker Remote API v1.19, Docker Server version 1.7.x.

@KostyaSha

Supports = works on, but this doesn't clain that old APIs should be broken.

@Khva0

Without this change it doesn't work on current API. That's why I made it.

@Khva0

We either break current API compatibility or break old API compatibility. Docker-java declares compatibility with current API, thus choice is obvious.

@Khva0

Whoever wants to use obsolete Docker version can use older version of Docker-java. Current Docker-java should work on current Docker.

@KostyaSha

Why is it a problem to @Deprecate old and use new?

KostyaSha

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Long without default

@KostyaSha

👎 for primitives, breaking backward compatibility and default values

@Khva0

I just moved few fields and corresponding getters from one class to another to comply with changes in docker API. And i did it respecting existing code conventions regarding primitives and default values.

@marcuslinke

While trying to merge this PR I found other inconsistencies regarding HostConfig object. Sadly the remote API documentation seems to be out of sync with the current implementation...

marcuslinke added a commit that referenced this pull request

Aug 26, 2015
Moved "Memory", "MemorySwap" and "CpuShares" mappings from ContainerConfig to HostConfig

@marcuslinke

Thanks for your contribution. I will fix remaining HostConfig inconsistencies with a separate PR.