Commit graph

104 commits

Author SHA1 Message Date
Arnaud Porterie (icecrime)
c0c7d5e715
Rename --net to --network
Add a `--network` flag which replaces `--net` without deprecating it
yet. The `--net` flag remains hidden and supported.

Add a `--network-alias` flag which replaces `--net-alias` without deprecating
it yet. The `--net-alias` flag remains hidden and supported.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2016-07-12 13:01:35 -07:00
Tonis Tiigi
22f827abab Fix hanging integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-06-15 10:19:45 -07:00
Arnaud Porterie
91197953d0 Merge pull request #23524 from aboch/restore
Daemon to support network restore
2016-06-15 02:33:16 +00:00
Lei Jitang
7d0689a8d3 Add test case for network restore
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-06-14 16:45:30 -07:00
Alessandro Boch
1c4efb6aa0 Allow user to specify container's link-local addresses
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-14 14:28:33 -07:00
Kai Qiang Wu(Kennan)
864e362aa0 Fix the network inspect id
This fixes #22231

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-06-06 15:26:07 +00:00
Vincent Demeester
4bd202b00f
Migrate network command to cobra
- Migrates network command and subcommands (connect, create, disconnect,
  inspect, list and remove) to spf13/cobra
- Create a RequiredExactArgs helper function for command that require an
  exact number of arguments.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-06 10:28:52 +02:00
allencloud
c1be45fa38 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 17:17:22 +08:00
Shijiang Wei
0a8386c8be remove deprecated feature of passing HostConfig at API container start
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2016-06-01 22:25:17 +08:00
Alessandro Boch
f198dfd856 Update port info on network connect/disconnect
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-25 17:02:50 -07:00
Sebastiaan van Stijn
23e418b6c9
Add "driver" filter for network ls
This add a new filter to 'docker network ls'
to allow filtering by driver-name.

Contrary to "ID" and "name" filters, this
filter only supports an *exact* match.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-29 16:22:26 +02:00
Vincent Demeester
75cc2c926b Merge pull request #21495 from HackToday/addnetworkfilter
Add network label filter support
2016-04-19 19:15:14 +02:00
Madhu Venugopal
ea531f061d Add container's short-id as default network alias
link feature in docker0 bridge by default provides short-id as a
container alias. With built-in SD feature, providing a container
short-id as a network alias will fill that gap.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-04-18 14:45:16 -07:00
Kai Qiang Wu(Kennan)
f812b55692 Add network label filter support
This patch did following:

1) Make filter check logic same as `docker ps ` filters

Right now docker container logic work as following:
when same filter used like below:
 -f name=jack -f name=tom
it would get all containers name is jack or tom(it is or logic)

when different filter used like below:

 -f name=jack -f id=7d1
it would get all containers name is jack and id contains 7d1(it is and logic)

It would make sense in many user cases, but it did lack of compliate filter cases,
like "I want to get containers name is jack or id=7d1", it could work around use
(get id=7d1 containers' name and get name=jack containers, and then construct the
final containers, they could be done in user side use shell or rest API)

2) Fix one network filter bug which could include duplicate result
when use -f name=  -f id=, it would get duplicate results

3) Make id filter same as container id filter, which means match any string.
not use prefix match.

It is for consistent match logic

Closes: #21417

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-04-18 00:38:48 +00:00
Yong Tang
f154227608 Fix Docker core dumps when removing network with special characters (#21401).
This fix tries to fix Docker core dumps when removing network with special
characters. The issue is from the fact that when docker client tries to
pass the command to API, the networkID is not escaped in case of special
characters. This also means other commands (not just `docker network rm`)
may face the same issue (e.g., `docker network connect`).

This fix adds the URL path escape to properly handle it. In addition, an
integration test for network create and delete is added to cover the cases
in #21401.

This fix fixes #21401.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit f8dc5562d0)
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-23 15:07:14 -04:00
Alessandro Boch
fbdb3c3a4b Vendoring libnetwork v0.7.0-dev.10
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-22 12:36:21 -07:00
Evan Hazlett
fc214b4408 add label support for build, networks and volumes
build: implement --label

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

network: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

volume: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

add tests for build, network, volume

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: libnetwork and engine-api bump

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-03-22 11:49:06 -04:00
Alessandro Boch
5a65408941 Vendoring libnetwork v0.7.0-dev.5
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-08 18:47:02 -08:00
Brian Goff
6d6919ed79 Merge pull request #20995 from wenchma/ping_timeout
Update ping command timeout to 4 sec
2016-03-08 15:35:00 -05:00
Wen Cheng Ma
c7a340e2be Update ping command timeout to 4 sec
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-03-08 15:06:58 +08:00
Brian Goff
5ded3a212b Merge pull request #20852 from wenchma/net-alias
Add tests of unsupported network-scoped alias on default networks
2016-03-07 13:37:12 -05:00
Wen Cheng Ma
312e20bf6c Enhancement of TestDockerNetworkInternalMode
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-03-04 10:56:10 +08:00
Wen Cheng Ma
0515d9b9c0 Add tests of unsupported network-scoped alias on default networks
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-03-02 16:57:50 +08:00
Wen Cheng Ma
8474bbff45 Fix typo
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-02-23 17:27:55 +08:00
Brian Goff
0e72550c5b Merge pull request #20383 from HackToday/addsort
Make network ls output order
2016-02-19 15:42:48 -05:00
Arnaud Porterie
117a982d2e Merge pull request #20419 from aboch/cr
Allow passing global datastore to libnetwork and v0.7.0-dev1 vendoring
2016-02-18 17:39:46 -08:00
Santhosh Manohar
e5293f97f2 IT case for sending invalid query to embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-02-18 12:14:19 -08:00
David Calavera
2e6c841b82 Merge pull request #17513 from aidanhs/aphs-expose-ipv6-default-bridge
Expose bridge IPv6 setting to `docker network inspect`
2016-02-18 10:35:04 -08:00
Kai Qiang Wu(Kennan)
838ed1866b Make network ls output order
Fixes: #20328
We sort network ls output with incresing order,
it may make output more easy to consume for users.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-02-17 04:35:36 +00:00
Morgan Bauer
fffff202fc Merge pull request #20261 from tophj-ibm/change-test-to-use-variable
Change integration test to use declared variable
2016-02-12 07:52:51 -08:00
Christopher Jones
ce1059973a Change integration test to use variable
Followup to #20246, changes the test to use already declared variable

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-02-11 21:20:00 -05:00
David Calavera
5ca6d3bafd Merge pull request #20250 from vieux/fix_misspell
fix common misspells
2016-02-11 17:22:06 -08:00
Victor Vieux
99a396902f fix common misspell
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-11 15:49:36 -08:00
Aidan Hobson Sayers
dfb00652aa Expose bridge IPv6 setting to docker network inspect
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2016-02-11 22:13:47 +00:00
Christopher Jones
045aee2002 Fix flaky test, TestDockerNetworkHostModeUngracefulDaemonRestart
Fixes #19368 by waiting until all container statuses are running
before killing the daemon

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-02-11 16:47:40 -05:00
Chun Chen
c199506b59 Display internal flag on network inspect
Also adds internal network tests for bridge network

Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-02-04 15:28:37 +08:00
Tibor Vass
f0a58947ab Merge pull request #19979 from mavenugo/gccgoci
Use waitRun in TestDockerNetworkHostModeUngracefulDaemonRestart
2016-02-03 20:33:52 -05:00
Madhu Venugopal
76a765140e Use waitRun in TestDockerNetworkHostModeUngracefulDaemonRestart
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-02-03 14:44:55 -08:00
Alessandro Boch
9b63e4e7f5 Store endpoint config on network connect to a stopped container
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-02 17:25:44 -08:00
Wen Cheng Ma
4f1d876e4c Add integration test for network host bind option
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-02-02 18:01:04 +08:00
Zhang Wei
62a856e912 Assert error in body of function inspectField*
1. Replace raw `docker inspect -f xxx` with `inspectField`, to make code
cleaner and more consistent
2. assert the error in function `inspectField*` so we don't need to
assert the return value of it every time, this will make inspect easier.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-01-29 23:39:07 +08:00
Bryan Boreham
7126ecd0ad Stop referring to requested IP address as "preferred",
since it is an error if that address is unavailable.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2016-01-26 15:13:26 +00:00
Alessandro Boch
733245b2e7 Save endpoint config only if endpoint creation succeeds
- Currently it is being save upfront...

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-25 13:43:32 -08:00
David Calavera
422827fa92 Merge pull request #19527 from aboch/epc
Move Unsupp Network & IP check to the new updateNetworkConfig() func
2016-01-22 15:54:21 -08:00
Santhosh Manohar
da9eadb066 IT for service/network name with '.', corrected libnetwork flag for DNS
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-21 20:49:02 -08:00
Alessandro Boch
3b0d36dbc1 Move ErrUnsupportedNetwork* checks to updateNetworkConfig() func
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-21 10:56:01 -08:00
Wen Cheng Ma
2e6b1eb309 Fixes the typo of docker_cli_network_unix_test.go
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-01-21 16:37:17 +08:00
Madhu Venugopal
8799218d01 IT for remote network driver & ungraceful restart
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-19 14:09:11 -08:00
Lei Jitang
42ee908b3f Merge pull request #19431 from WeiZhang555/19422-default-network
bugfix: prevent creating network 'default'
2016-01-19 14:18:20 +08:00
Zhang Wei
31dae442c8 bugfix: prevent creating network 'default'
Default is predefined network and is reserved, so we should stop user
from creating network with name `default`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-01-19 11:06:36 +08:00