Add one capability negotiation interaction after plugin handshake, use
this to determine plugin's capability instead of default "global" scope.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Currently the endpoint data model consists of multiple
interfaces per-endpoint. This seems to be an overkill
since there is no real use case for it. Removing it
to remove unnecessary complexity from the code.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
- it is supposed to be called after lookupContainerID()
but the latter is not guaranteed to succeed and in
case of connection error will return what was passed
to it.
So in order to be able to operate with both long and short
container ids in case of lookupContainerID() failure,
always search by `partial-container-id`
Signed-off-by: Alessandro Boch <aboch@docker.com>
- So test will not fail because container is already there
Prefer this to re-use the containers as it would contain
states from last run
- A stale consul or dnet container condition will happen
in case the previous integ test run aborted
Signed-off-by: Alessandro Boch <aboch@docker.com>
Currently libnetwork does not have any integration test infra
support to tests libnetwork code end2end purely as a black
box. This initial commit adds the infra support to enable
test cases for this.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
CmdServiceDetach() incorrectly uses containerID where sandboxID is
expected. Thus, procDeleteSandbox() fails to find the corresponding
sandbox and returns the "Resource not found" error.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
There were two pending PRs with package level
changes but no source level conflicts. This got
merged because git cannot detect this.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
fix bug for `docker service ls` error:
"Failed to retrieve backend list for service xxx (json: cannot
unmarshal object into Go value of type []client.sandboxResource)"
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This way we won't vendor test related functions in docker anymore.
It also moves netns related functions to a new ns package to be able to
call the ns init function in tests. I think this also helps with the
overall package isolation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Looks like the libkv version vendored in really not in
sync with the git hash value in Godeps.json. The commit
04bd8f67ad
has just updated the Godeps.json without update the source.
Dnet in multi-host testing is broken due to this, while
docker mult-host functionality works because the correct
version of libkv has been vendored in docker/docker.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Bridge driver panics in `CreateNetwork` if called without
a prior `Config` call. This causes issues in dnet which
tries to create network using default driver configuration.
It should be valid to call `CreateNetwork` without a prior
`Config` call in which case we need to assume default driver
config.
Fixed this by properly initializing the driver config pointer.
Also introduced a `configured` bool to make sure that still
`Config` is called exactly once for the instance of the bridge
driver.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Test if error messages from daemon are not empty strings.
Confirmed it fails without af323c7.
--- FAIL: TestEndToEndErrorMessage (0.03s)
api_test.go:2266: Empty response error message.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>