22 Commits

Author SHA1 Message Date
Periyasamy Palanisamy
a9b4e04bc4 Make host-device to work with virtio net device
In case pciBusID contains pci address of the virtio device,
then lookup the net directory under virtio<id> directory.

Issue: https://github.com/containernetworking/plugins/issues/320

Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
2020-02-11 18:05:37 +01:00
smarkm
0d0dcfc02f Cleanup netns after test suit
Signed-off-by: smarkm <smark@freecoop.net>
2019-08-22 08:10:35 +08:00
Bruce Ma
5e2e365291 host-device: remove useless Expects in testcases
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-29 21:09:03 +08:00
Bruce Ma
4b68f56820 host-device: add testcases for imdempotence of CmdDel
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-29 20:47:28 +08:00
Bruce Ma
57650a1e5b host-device: revert name setting to make retries idempotent
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-19 21:26:07 +08:00
Zenghui Shi
79b1c402c4 host-device: add deviceID property
Fixes #253
2019-04-25 12:17:40 +08:00
Casey Callendrello
72f2a1ffd4 plugins: correctly output build version, cosmetic cleanups
Now that libcni has the ability to print a version message, plumb it
through correctly.

While we're at it,
- fix import paths
- run gofmt
- add some more comments to sample
- add container runtime swappability for release
2019-04-15 16:52:07 +02: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
Tomofumi Hayashi
d29d56bc4d Fix host-device README.md
host-device's README.md missing 'type' field, so this change
just adds 'type' in config example.
2019-01-30 01:51:57 +09:00
Dan Williams
5fc8209482
Merge pull request #218 from hwchiu/fix-readme
fix the typo of macvlan and also modify documents to meet the current plugins.
2018-11-07 09:30:29 -06:00
hwchiu
d3284f7c5e Support the IPAM for host-device plugin
- Change variable name to camel style to fix golint warning
- Execute the IPAM to assign the IP address if it's inside in the config
- Test the IPAM module with static plugin
2018-11-01 01:12:47 +00:00
hwchiu
f006155b66 Add the missing documents for some existing plugins 2018-10-18 02:20:52 +00:00
Lantao Liu
2955d63c95 Handle empty netns in DEL for loopback and host-device.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-10 10:49:06 -07:00
Casey Callendrello
68b4efb405 plugins/* stub-out GET functions so plugins build with v0.7 2018-06-15 15:28:53 +02:00
Dan Williams
1d973f59d2
Merge pull request #147 from databus23/host-device-fix
host-device: Ensure device is down before rename
2018-05-16 10:54:47 -05: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
Fabian Ruff
eb410208cb host-device: Ensure device is down before rename
If the device is in state up trying to set the name fails with "device or resource busy"
2018-04-25 20:39:23 +02:00
Casey Callendrello
aade7b93ee build: some small improvements; bump to go1.10
- bump to go 1.10
- Add a linker tag with the build version
- Remove fastbuild, go builds are cached now
- Use better ginkgo suite names
2018-04-12 16:59:51 +02: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
Dan Williams
ffc591e242 host-device: respect CNI_IFNAME/args.IfName
On ADD save the host device's name into its IFLA_ALIAS property and
rename the device to the requested CNI_IFNAME inside the container
to conform to the CNI specification.  On DEL rename the device to
the original name and move it back into the host namespace.
2018-01-17 14:30:22 -06:00
Casey Callendrello
5e830efb20 plugins/main/host-local: generate result, fix DEL, other cleanups
This plugin needed some cleaning up: it didn't generate output, and
didn't test DEL. Add those things, plus a README.
2017-11-15 16:00:32 +01:00
Casey Callendrello
d07d2aaf71 plugins/host_device: move to "main" folder 2017-11-13 18:50:20 +01:00