1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration-cli
Ahmet Alp Balkan 755f8609f6 Add containers’ networks to /containers/json
After addition of multi-host networking in Docker 1.9, Docker Remote
API is still returning only the network specified during creation
of the container in the “List Containers” (`/containers/json`) endpoint:

    ...
    "HostConfig": {
      "NetworkMode": "default"
    },

The list of networks containers are attached to is only available at
Get Container (`/containers/<id>/json`) endpoint.
This does not allow applications utilizing multi-host networking to
be built on top of Docker Remote API.

Therefore I added a simple `"NetworkSettings"` section to the
`/containers/json` endpoint. This is not identical to the NetworkSettings
returned in Get Container (`/containers/<id>/json`) endpoint. It only
contains a single field `"Networks"`, which is essentially the same
value shown in inspect output of a container.

This change adds the following section to the `/containers/json`:

    "NetworkSettings": {
      "Networks": {
        "bridge": {
          "EndpointID": "2cdc4edb1ded3631c81f57966563e...",
          "Gateway": "172.17.0.1",
          "IPAddress": "172.17.0.2",
          "IPPrefixLen": 16,
          "IPv6Gateway": "",
          "GlobalIPv6Address": "",
          "GlobalIPv6PrefixLen": 0,
          "MacAddress": "02:42:ac:11:00:02"
        }
      }
    }

This is of type `SummaryNetworkSettings` type, a minimal version of
`api/types#NetworkSettings`.

Actually all I need is the network name and the IPAddress fields. If folks
find this addition too big, I can create a `SummaryEndpointSettings` field
as well, containing just the IPAddress field.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-12-14 19:03:23 -08:00
..
fixtures Fix for zero-sized layers 2015-11-25 18:02:03 -08:00
check_test.go update tests 2015-10-13 15:52:14 -07:00
docker_api_attach_test.go Correct the message of ErrorCodeNoSuchContainer to "No such container" 2015-12-04 15:00:08 +08:00
docker_api_build_test.go Use checker assert for docker_api_build_test.go 2015-10-17 14:28:13 +02:00
docker_api_containers_test.go Add containers’ networks to /containers/json 2015-12-14 19:03:23 -08:00
docker_api_create_test.go Added c.Assert statements to docker_api_create_test.go 2015-11-01 19:54:19 -08:00
docker_api_events_test.go Cleaned up integration-cli/docker_api_events_test.go 2015-10-15 12:40:36 -04:00
docker_api_exec_resize_test.go Remove exec-driver global daemon option. 2015-11-05 17:09:58 -05:00
docker_api_exec_test.go Use checker Assert for integration-cli/docker_api_exec_test.go 2015-11-20 23:34:52 +08:00
docker_api_images_test.go Checkers on integration-cli/docker_api_images_test 2015-11-23 10:33:32 -05:00
docker_api_info_test.go Checkers on integration-cli/docker_api_info_test 2015-11-23 14:28:41 -05:00
docker_api_inspect_test.go Checkers on docker_api_inspect_test.go 2015-11-30 16:23:46 -06:00
docker_api_inspect_unix_test.go Checkers on docker_api_inspect_unix_test.go 2015-11-23 22:03:14 -05:00
docker_api_logs_test.go Cleaned up integration-cli/docker_api_logs_test.go 2015-10-15 13:33:31 -04:00
docker_api_network_test.go Move networking api types to the api/types/networking package. 2015-12-09 13:55:59 -08:00
docker_api_resize_test.go Use checker on integration test when possible 2015-10-22 15:53:17 +08:00
docker_api_stats_test.go add tests for docker stats versioning 2015-10-31 00:23:08 +00:00
docker_api_test.go Use checker on integration test when possible 2015-10-22 15:53:17 +08:00
docker_api_version_test.go dockerversion placeholder for library import 2015-11-09 19:32:46 +01:00
docker_api_volumes_test.go Windows: Remove check for volume support 2015-11-13 13:02:30 -08:00
docker_cli_attach_test.go Add show error when attach to a paused container 2015-10-28 21:00:09 -04:00
docker_cli_attach_unix_test.go Using checkers assert for integration-cli/docker_cli_attach_unix_test.go 2015-10-29 21:38:00 +08:00
docker_cli_build_test.go Merge pull request #18123 from aidanhs/aphs-fail-on-broken-tar 2015-12-07 14:38:21 +01:00
docker_cli_build_unix_test.go Update docker_cli_build_unix_test 2015-10-26 21:06:11 +08:00
docker_cli_by_digest_test.go Update daemon and docker core to use new content addressable storage 2015-11-24 09:40:25 -08:00
docker_cli_commit_test.go Checkers on integration-cli/docker_cli_commit_test 2015-10-29 21:47:54 -05:00
docker_cli_config_test.go dockerversion placeholder for library import 2015-11-09 19:32:46 +01:00
docker_cli_cp_from_container_test.go Use checker assert for integration-cli/docker_cli_cp_* four files. 2015-10-26 10:22:28 +08:00
docker_cli_cp_test.go Add '-L' option for cp 2015-11-21 00:36:56 +08:00
docker_cli_cp_to_container_test.go Use checker assert for integration-cli/docker_cli_cp_* four files. 2015-10-26 10:22:28 +08:00
docker_cli_cp_utils.go Use checker assert for integration-cli/docker_cli_cp_* four files. 2015-10-26 10:22:28 +08:00
docker_cli_create_test.go Update daemon and docker core to use new content addressable storage 2015-11-24 09:40:25 -08:00
docker_cli_daemon_test.go Make TestDaemonNoSpaceleftOnDeviceError linux only 2015-11-20 12:44:49 -05:00
docker_cli_diff_test.go Remove LXC support. 2015-11-05 17:09:57 -05:00
docker_cli_events_test.go Increase timeouts to fix test on ARM 2015-11-20 23:12:12 +01:00
docker_cli_events_unix_test.go Add the memoryLimitSupport requirement to OOM tests 2015-11-10 18:06:13 -06:00
docker_cli_exec_test.go Merge pull request #17373 from Microsoft/10662-volumetests 2015-10-27 19:52:11 -04:00
docker_cli_exec_unix_test.go Increase timeouts to fix test on ARM 2015-11-20 23:12:12 +01:00
docker_cli_experimental_test.go Remove exec-driver global daemon option. 2015-11-05 17:09:58 -05:00
docker_cli_export_import_test.go Using checkers assert for integration-cli/docker_cli_export_import_test.go 2015-10-21 08:57:20 -04:00
docker_cli_external_graphdriver_unix_test.go Update daemon and docker core to use new content addressable storage 2015-11-24 09:40:25 -08:00
docker_cli_help_test.go Remove defaults for flags/options that expect no value 2015-11-19 08:37:51 -08:00
docker_cli_history_test.go Use of checkers on docker_cli_history_test.go 2015-10-23 22:32:56 -05:00
docker_cli_images_test.go Make filtering a linear operation. 2015-12-02 11:12:42 -05:00
docker_cli_import_test.go Use of checkers on docker_cli_import_test.go. 2015-10-20 19:58:16 +08:00
docker_cli_info_test.go Merge pull request #17478 from vdemeester/pr-13921 2015-11-17 15:44:57 -08:00
docker_cli_inspect_experimental_test.go Use of checkers on docker_cli_inspect_experimental_test.go. 2015-10-19 19:44:04 +08:00
docker_cli_inspect_test.go Implement all inspect commands with the new inspector interface. 2015-12-09 12:05:01 -05:00
docker_cli_kill_test.go modified docker_cli_kill_test.go to use c.Asserts 2015-10-27 21:18:26 -07:00
docker_cli_links_test.go Remove CLI specific information for API error messages. Issue #17147 2015-12-03 15:23:07 +00:00
docker_cli_links_unix_test.go use of checkers on Integration test 2015-10-18 09:00:08 +08:00
docker_cli_login_test.go update docker_cli_login_test.go 2015-10-09 15:08:01 +08:00
docker_cli_logs_test.go Implement docker logs with standalone client lib. 2015-12-09 12:04:55 -05:00
docker_cli_nat_test.go Remove exec-driver global daemon option. 2015-11-05 17:09:58 -05:00
docker_cli_netmode_test.go update integration-cli/docker_cli_netmode_test.go 2015-10-12 13:34:43 +08:00
docker_cli_network_unix_test.go Implement all inspect commands with the new inspector interface. 2015-12-09 12:05:01 -05:00
docker_cli_pause_test.go Use of checkers on docker_cli_pause_test.go. 2015-10-16 21:07:02 +08:00
docker_cli_port_test.go update docker_cli_port_test.go with Assert 2015-10-16 22:58:51 +08:00
docker_cli_proxy_test.go update docker_cli_proxy_test.go 2015-10-09 14:53:56 +08:00
docker_cli_ps_test.go Re-implement --before and --since as options for --filter 2015-11-20 13:10:13 +08:00
docker_cli_pull_local_test.go integration-cli: docker_cli_pull_local_test.go: remove not needed Commentf(s) 2015-11-27 17:10:09 +01:00
docker_cli_pull_test.go Fix flaky test TestPullAllTagsFromCentralRegistry 2015-12-08 11:23:04 -08:00
docker_cli_pull_trusted_test.go "Assert change" 2015-11-17 18:40:18 +08:00
docker_cli_push_test.go integration-cli: fix test name typo 2015-12-05 11:42:46 +01:00
docker_cli_rename_test.go integration-cli test for active container rename and reuse 2015-10-23 16:26:24 -07:00
docker_cli_restart_test.go fix consistetly failing TestContainerRestartSuccess on windows it looks up pids and does unixy things 2015-11-25 13:04:59 -08:00
docker_cli_rm_test.go Fix docker rmi trying to remove a being used parent 2015-11-26 09:57:20 +08:00
docker_cli_rmi_test.go Fix docker rmi trying to remove a being used parent 2015-11-26 09:57:20 +08:00
docker_cli_run_test.go Allow non-seccomp platforms to pass integration-cli tests 2015-12-07 20:14:52 -05:00
docker_cli_run_unix_test.go Check minimum kernel memory limit to be 4M 2015-12-09 14:26:41 +08:00
docker_cli_save_load_test.go Fix for zero-sized layers 2015-11-25 18:02:03 -08:00
docker_cli_save_load_unix_test.go Update daemon and docker core to use new content addressable storage 2015-11-24 09:40:25 -08:00
docker_cli_search_test.go Update test 2015-10-07 07:11:45 +08:00
docker_cli_start_test.go Increase timeouts to fix test on ARM 2015-11-20 23:12:12 +01:00
docker_cli_start_volume_driver_unix_test.go Fix bug in volume driver test implementation 2015-10-20 09:17:49 -04:00
docker_cli_stats_test.go Correct the message of ErrorCodeNoSuchContainer to "No such container" 2015-12-04 15:00:08 +08:00
docker_cli_tag_test.go Deprecate -f flag from docker tag 2015-12-01 19:53:49 -08:00
docker_cli_top_test.go Merge pull request #12648 from estesp/userns-impl 2015-10-10 11:38:07 -07:00
docker_cli_v2_only_test.go integration-cli: add _test suffix to test file 2015-11-30 11:33:57 +01:00
docker_cli_version_test.go Build and test Docker on IBM Power and Z using gccgo. Enable CI on Power and Z. 2015-11-14 03:16:45 +00:00
docker_cli_volume_test.go Implement all inspect commands with the new inspector interface. 2015-12-09 12:05:01 -05:00
docker_cli_wait_test.go use of checkers on Integration test 2015-10-11 11:31:01 +08:00
docker_hub_pull_suite_test.go Use Assert statement to replace condition judgment 2015-10-09 17:45:28 +08:00
docker_test_vars.go Windows: Volume integration tests 2015-10-26 14:33:28 -07:00
docker_utils.go don't return error if can't delete non-existing container 2015-12-02 13:48:59 -05:00
registry.go
registry_mock.go Prevent push and pull to v1 registries by filtering the available endpoints. 2015-09-25 15:59:42 -07:00
requirements.go Windows: Remove check for volume support 2015-11-13 13:02:30 -08:00
requirements_unix.go Allow non-seccomp platforms to pass integration-cli tests 2015-12-07 20:14:52 -05:00
test_vars_exec.go
test_vars_noexec.go
test_vars_noseccomp.go Allow non-seccomp platforms to pass integration-cli tests 2015-12-07 20:14:52 -05:00
test_vars_seccomp.go Allow non-seccomp platforms to pass integration-cli tests 2015-12-07 20:14:52 -05:00
test_vars_unix.go
test_vars_windows.go
trust_server.go Changing docs to reflect new names 2015-10-09 15:13:37 -07:00
utils.go Fixes 16556 CI failures 2015-09-24 11:19:00 -07:00