1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

30 commits

Author SHA1 Message Date
Alessandro Boch
2401496d2a Enable network labels in Rest API
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-09 01:06:20 -07:00
Jana Radhakrishnan
be700ec0eb Add default network restart test case
Added restart test for default network so that we can test
bridge network persistence. Also added changes to dnet to
delete the default network if it is present.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-08 21:31:19 -07:00
Alessandro Boch
af3eb25d44 Phase-2 bridge driver changes to support IPAM
- Set bridge ipv4 address when bridge is present
- IPv6 changes for bridge
- Convert unit tests to the new model

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-08 16:22:03 -07:00
Jana Radhakrishnan
71e14dd52a Remove always-on watch for networks and endpoints
Always on watching of networks and endpoints can
affect scalability of the cluster beyond a few nodes.
Remove pro active watching and watch only the objects
you are interested in.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 14:15:49 -07:00
Madhu Venugopal
0066225da5 Integration with Docker Discovery
* integrated hostdiscovery package with the new Docker Discovery
* Integrated hostdiscovery package with libnetwork core
* removed libnetwork_discovery tag
* Introduced driver apis for discovery events
* moved overlay driver to make use of the discovery events
* Using Docker Discovery service.
* Changed integration-tests to make use of the new discovery

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-01 12:32:55 -07:00
Madhu Venugopal
1b393486b5 Godeps update
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-30 08:16:58 -07:00
Jana Radhakrishnan
51699b91aa Merge pull request #560 from mavenugo/adb
Flip the default for the flag AllowNonDefaultBridge in bridge driver
2015-09-24 18:02:12 -07:00
Madhu Venugopal
a42e5f0663 Flip the default for the flag AllowNonDefaultBridge in bridge driver
Replaced it with DisableBridgeCreation and it can be used ONLY in
a special case for docker0 bridge from docker, instead of calling it
from all other case.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-24 02:18:35 -07:00
Jana Radhakrishnan
ce44f2478d Add overlay network integration test
This commit adds a basic overlay network
connectivity integration test. By doing this
it adds the basic functions to form a crude
container to run the networking tests. The container
uses a busybox rootfs with network namespace and
/etc/hosts and /etc/resolv.conf generated by
libnetwork.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-23 22:04:15 -07:00
Chun Chen
8babc3d4d3 Add local datastore to persist states of LocalScope network
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-21 17:58:51 +08:00
Jana Radhakrishnan
2479562e72 Introduce test remote plugin in dnet
There are multiple goals of introducing test driver plugin
  - Need a driver which can be configured to simulate
    different driver behaviors
  - For pure libnetwork multi-host integration testing
    a test driver configured for global scope can be used
    without trying to use a real driver like overlay
    which comes with it's own dependencies which can't
    be satisfied all enviroments(I am looking at you
    circleci)

This PR also makes all test cases that we have so far to be run
in circleci without any skipping needed.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-17 10:38:34 -07:00
Jana Radhakrishnan
ea4cdf441e Add simple integration test cases
- Enhance dnet to use codegansta/cli as the frontend
    - Add `container create/rm` commands only in dnet
    - With the above dnet enhancements add more integration tests

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-16 09:17:32 -07:00
Madhu Venugopal
ca8c899f2b Merge pull request #503 from mrjana/bugs
Add integration test infra
2015-09-09 12:20:07 -07:00
Jana Radhakrishnan
0e40539ebc Add integration test infra
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>
2015-09-08 22:58:12 -07:00
Toshiaki Makita
72eb02d807 Add missing sandboxes routes
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
2015-09-08 15:30:47 +09:00
David Calavera
cc02894a50 Move test specific functions to a testutils package.
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>
2015-09-07 13:33:28 -04:00
Madhu Venugopal
8b59f48537 Reading the top level element (network) from datastore on init
Currently we rely on watch to catchup after the init. But there could be
a small time window on which, we might end up in a race condition on
network creates. By reading and populating networks during init, we
avoid any such conditions, especially for default network handling.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-18 08:35:46 -07:00
Madhu Venugopal
678d50f5b5 Updating CallFunc to match the Docker CLI API changes
Updated Docker deps to pickup UI changes

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-15 09:41:28 -07:00
Madhu Venugopal
03504cab65 Few changes to the UI and API implementation
1. replaced --net option for service UI with SERVICE.[NETWORK] format
2. Making using of the default network/driver backend support
3. NetworkName and NetworkType from the UI/API can be empty string
   and it will be replaced with DefaultNetwork and DefaultDriver

As per the design goals, we wanted to keep libnetwork core free of
handling defaults. Rather, the clients (docker & dnet) must handle the
defaultness of these entities.
Also, since there is no API to get these Default values from the
backend, UI will not handle the default values either. Hence, this falls
under the responsibility of the API layer to handle this specific case.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-14 21:57:18 -07:00
Madhu Venugopal
9f3d1ce3ff Moved the TOML based Configuration to dnet
The configuration format for docker runtime is based on daemon flags and
hence adjusting the libnetwork configuration to accomodate it by moving
the TOML based configuration to the dnet tool.

Also changed the controller configuration via options

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-12 12:46:12 -07:00
Alessandro Boch
8c9c68bec9 Remove dnet binary
- It slipped in as part of a previous commit by mistake

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-11 18:38:03 -07:00
Alessandro Boch
7de9f71eb5 Promote Service cli
- To the same level of Network cli
  and to make use of the new service
  rest apis

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-11 16:07:09 -07:00
Madhu Venugopal
f88824fb8a Reworked endpoint store operation to address a few cases
* Removed network from being marshalled (it is part of the key anyways)
* Reworked the watch function to handle container-id on endpoints
* Included ContainerInfo to be marshalled which needs to be synchronized
* Resolved multiple race issues by introducing data locks

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 23:59:29 -07:00
Madhu Venugopal
a0cccbbcfa Moved services to dnet top-level and removed experimental
In prep for the UI/API updates on Docker to integrate the network and
endpoints, this PR removes the experimental tag from dnet and moving it
to docker UI and API and wrap the top-level "network" and "service"
under experimental.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-08 14:23:41 -07:00
Madhu Venugopal
481568035f TOML based Configuration support for libnetwork
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:40 -07:00
Madhu Venugopal
e20e7bbbfe Added API support for both /vx.x/networks & /networks
In one of the previous commit, we went to the extreme of supporting just
the /{version}/networks. Though that satisfied the requirements for UI
integration, it is not fully consistent with Docker APIs.
Docker API supports both /{version}/resource and /resource and hence we
must add the same support for networks resource.

Also fixed a silly bug in api.go

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-24 15:17:47 -07:00
Madhu Venugopal
a1c3dce3e9 Added a catch-all root hierarchy for the API path
Though libnetwork api is supposed to handle the sub router, it is given
the entire URL to deal with. But the current api.go assumes the network/
to be in the root path.
We need this patch to make it work seamlessly with docker & dnet UI & API

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-23 12:20:30 -07:00
Madhu Venugopal
5ee5e2452f Modified Client to make use of the corrected REST API
Also supporting name, id & partial-id lookups for all the network
commands

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-21 17:38:40 -07:00
Alessandro Boch
7d80a5a84a Changes in rest api
- Fix POST to collection
- Only resource ID in URI, search by name as query parameter
- Fix URLs, consistency and restrict regex

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-20 16:44:06 -07:00
Madhu Venugopal
36a0f91b5d Initial dnet tool to test and manage libnetwork end-to-end
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-19 14:10:30 -07:00