Commit Graph

17 Commits

Author SHA1 Message Date
Brian Goff 4b981436fe Fixup libnetwork lint errors
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:32 +00:00
Brian Goff 00b2c13a1b Fix some windows issues in libnetwork tests
Fix build constraints for linux-only network drivers

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:23 +00:00
Brian Goff a0a473125b Fix libnetwork imports
After moving libnetwork to this repo, we need to update all the import
paths for libnetwork to point to docker/docker/libnetwork instead of
docker/libnetwork.
This change implements that.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 21:51:23 +00:00
Ke Li 23ac56fdd0 Remove unnecessary string formats
Signed-off-by: Ke Li <kel@splunk.com>
2016-11-22 09:29:53 +08:00
Alessandro Boch 6d3fa9e0f2 Migrate libnetwork to use netlink.Handle
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-08 21:05:36 -07:00
Madhu Venugopal a41025e9c0 Fixed a few more issues observed during docker integration
- DisableBridgeCreation is misleading. change it to DefaultBridge
- Dont fail the init if localstore cannot be initialized
- added a convenience function to get endpoint for a container

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-25 09:40:42 -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
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
Jana Radhakrishnan bcd996f4c3 Explicitly set namespace for all network operations
Make sure to always explicitly set namespace for all
kernel bound network operations irrespective of whether
the operation is performed in init namespace or a user
defined namespace. This already happens for user defined
netns. But doesn't happen for initial netns that libnetwork
runs in.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-01 14:00:58 -07:00
Alessandro Boch 5d9c59e523 Support network options in rest api
- Also unexporting configuration structures in bridge
- Changes in dnet/network.go to set bridge name = network name

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-23 20:12:29 -07:00
Jana Radhakrishnan 94a9f12280 Moved most of the driver configuration to network configuration.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 17:43:24 +00:00
Jana Radhakrishnan e91ed59cb2 Changed all the naked error returns in bridge driver to proper error
types, except the naked error returns which were just prefixing
strings to previously returned error strings.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-17 02:50:22 +00:00
Jana Radhakrishnan e797f80ad4 Added driver specific config support
- Added api enhancement to pass driver specific config
  - Refactored simple bridge driver code for driver specific config
  - Added an undocumented option to add non-default bridges without
    manual pre-provisioning to help libnetwork testing
  - Reenabled libnetwork test to do api testing
  - Updated README.md

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-15 18:32:07 +00:00
Jana Radhakrishnan 68ae284db5 Libnetwork refactor for container network model
- Added controller, network, endpoint and sandbox interfaces
    - Created netutils package for miscallaneous network utilities
    - Created driverapi package to break cyclic dependency b/w driver and libnetwork
    - Made libnetwork multithread safe
    - Made bridge driver multithread safe
    - Fixed README.md

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-13 21:40:50 +00:00
Alessandro Boch 68d223a0e0 Issue #18: IP Allocator rework
- Move ipallocator package into libnetwork
- Also ported network utility functions and their tests in libnetwork:
  docker/daemon/networkdriver/utilg.go => libnetwork/utils.go
  docker/daemon/networkdriver/network_test.go => libnetwork/utils_test.go
- Changed drivers/setup_device.go and setup_ipv4.go to reuse functions in
  utils.go, instead of redefining internally.
- Modified utils to use vishvananda/netlink instead of libcontainer/netlink

Signed-off-by: Alessandro Boch <aboch@socketplane.io>
2015-03-24 13:57:59 -07:00
Arnaud Porterie 6424c7a875 Remove golint warnings
Fix all golint warnings, mostly by making exported types internal.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-04 13:29:28 -08:00
Arnaud Porterie 8ca185e2ee Move bridge to drivers/
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-02-24 11:29:06 -08:00