26 Commits

Author SHA1 Message Date
Lionel Jouin
fec2d62676 Pass status along ipam update
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
2024-10-15 10:22:10 +02:00
Gudmundur Bjarni Olafsson
3a49cff1f6 Fix txqueuelen being accidentally set to zero
TxQLen was unintentionally set to 0 due to a struct literal.

Signed-off-by: Gudmundur Bjarni Olafsson <gudmundur.bjarni@gmail.com>
2024-10-02 10:01:11 +02:00
Casey Callendrello
deec68747e
Merge pull request #853 from mmorel-35/ginkgolinter
enable ginkgolinter linter
2023-04-04 15:24:20 +02:00
Marcelo Guerrero Viveros
d71d0f2da1 Fix revive linter errors
Golangci-lint is now running version 1.52.1. This introduced some errors.

Signed-off-by: Marcelo Guerrero Viveros <marguerr@redhat.com>
2023-03-24 21:04:39 +01:00
Matthieu MOREL
09f36a295d enable ginkgolinter linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-03-13 22:27:21 +00:00
Matthieu MOREL
d12b81dec5 ci(lint): setup golangci-lint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-03-01 06:55:40 +00:00
liornoy
2d1005ec02
Update tests to utilize ginkgo/v2
This commit updates the import of ginkgo to v2 in
all of the tests.

Signed-off-by: liornoy <lnoy@redhat.com>
Co-authored-by: Sascha Grunert <sgrunert@redhat.com>
2023-02-13 21:15:18 +02:00
mmirecki
c798f80912 Add support for in-container master for ipvlan
Signed-off-by: mmirecki <mmirecki@redhat.com>
2023-01-25 12:11:06 +01:00
Austin Vazquez
1a6f478913 Remove references to io/ioutil package
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-12-01 22:27:05 +00:00
Dan Williams
5096b53918 ipvlan: increase test coverage to 1.0.0 and older spec versions
Signed-off-by: Dan Williams <dcbw@redhat.com>
2021-02-11 23:27:08 -06:00
Dan Williams
7d8c767622 plugins: update to spec version 1.0.0
Signed-off-by: Dan Williams <dcbw@redhat.com>
2021-02-11 23:27:08 -06:00
Tomofumi Hayashi
08ff3b6413 ipvlan: make master config as optional
This change makes ipvlan master parameter optional.
Default to default route interface as macvlan does.

Signed-off-by: Tomofumi Hayashi <tohayash@redhat.com>
2020-09-16 22:05:42 +09:00
smarkm
0d0dcfc02f Cleanup netns after test suit
Signed-off-by: smarkm <smark@freecoop.net>
2019-08-22 08:10:35 +08:00
Michael Cambria
74a2596573 Add check support for: bridge, ipvlan, macvlan, p2p, vlan and host-device main plugins
host-local and static ipam plugins
  tuning, bandwidth and portmap meta plugins

  Utility functions created for common PrevResult checking

  Fix windows build
2019-04-03 13:08:07 -04:00
Dan Williams
731298003c plugins/testutils: pass CNI_CONTAINERID to plugins in testcases
Recent CNI specification changes require the container ID on ADD/DEL,
which the testcases were not providing.  Fix that up so things work
when this repo gets CNI revendored.
2018-04-26 11:24:30 -05:00
Casey Callendrello
a0eac8d7d9 pkg/ns: remove namespace creation (and move to testutils)
Namespace creation had an unergonomic interface and isn't used, except
for testing code. Remove it; downstream users should really be creating
their own namespaces
2018-04-03 18:56:25 +02:00
Paul Fisher
5c7e7c0913 ipvlan: support chaining for master interface and IP configuration
For IP allocation schemes that cannot be interface agnostic, the
ipvlan plugin can be chained with an earlier plugin that handles this
logic. If "master" is omitted from the ipvlan configuration, then the
previous Result must contain a single interface name for the ipvlan
plugin to enslave. If "ipam" is omitted, then the previous Result is
used to configure the ipvlan interface.
2017-12-23 10:59:48 -08:00
Paul Fisher
4779f1d2bf ipvlan: support enslaving an interface returned by ipam
For IP allocation schemes that cannot be interface agnostic, master can be set
to "ipam". In this configuration, the IPAM plugin is required to return a single
interface name for the ipvlan plugin to enslave.
2017-11-01 10:14:04 -07:00
Casey Callendrello
3c436520be move most of cni/pkg to plugins/pkg: delete code staying in cni/pkg
This moves the following packages to this repository:
* ip
* ipam
* ns
* testutils
* utils
2017-05-23 16:12:49 +02:00
Dan Williams
9445711fa5 spec/plugins: fix 'ip'->'ips' in the spec, bump to 0.3.1 2017-04-05 12:46:24 -05:00
Tom Denham
13824487c6
plugins/*: Don't error if the device doesn't exist
I wasn't able to test or update the dhcp plugin but from a code read it
should be fine. All the other plugins are tested and fixed
2017-03-22 08:52:29 -07:00
Dan Williams
d5acb127b8 spec/plugins: return interface details and multiple IP addresses to runtime
Updates the spec and plugins to return an array of interfaces and IP details
to the runtime including:

- interface names and MAC addresses configured by the plugin
- whether the interfaces are sandboxed (container/VM) or host (bridge, veth, etc)
- multiple IP addresses configured by IPAM and which interface they
have been assigned to

Returning interface details is useful for runtimes, as well as allowing
more flexible chaining of CNI plugins themselves.  For example, some
meta plugins may need to know the host-side interface to be able to
apply firewall or traffic shaping rules to the container.
2017-01-25 11:31:18 -06:00
Dan Williams
cb4cd0e12c testutils: pass netConf in for version operations; pass raw result out for tests 2017-01-25 11:31:18 -06:00
Gabe Rosenhouse
0135e2751e versioning: ipam config is not versioned 2016-09-19 13:25:28 -07:00
Gabe Rosenhouse
fd150a4c97 skel: Plugins require a cniVersion in the NetConf 2016-09-18 21:30:57 -07:00
Dan Williams
185e33ebe9 ipvlan: add e2e testing 2016-05-20 17:10:25 -05:00