13 Commits

Author SHA1 Message Date
Dan Williams
0d19b79260 types: make Result an interface and move existing Result to separate package 2017-01-25 11:31:18 -06:00
Gabe Rosenhouse
921292ff77 skel: Plugins require a cniVersion in the NetConf 2016-09-18 21:30:57 -07:00
Gabe Rosenhouse
bf6948da19 versioning: misc cleanups
highlights:
 - NetConf struct finally includes cniVersion field
 - improve test coverage of current version report behavior
 - godoc a few key functions
 - allow tests to control version list reported by no-op plugin
2016-09-06 15:35:58 -04:00
Gabe Rosenhouse
2f97407396 invoke: better name and unit test coverage for GetVersionInfo 2016-09-02 16:39:01 -04:00
Gabe Rosenhouse
f467134838 invoke: correctly infer version for 0.1.0-vintage plugins
Older plugins return a known error when issued the VERSION command.
Capture this error and report it as a 0.1.0 version plugin.
2016-09-02 16:02:07 -04:00
Gabe Rosenhouse
bd3ade0c54 pkg/invoke: refactor plugin exec and backfill unit tests 2016-09-02 15:59:25 -04:00
Gabe Rosenhouse
b1e254d901 versioning: plugins report a list of supported versions
Further progress on versioning support (Issue #266).
Bump CNI spec version to 0.3.0
2016-09-02 11:26:17 -04:00
Gabe Rosenhouse
0e675fa14f invoke: backfill tests for plugin execution 2016-08-30 23:52:47 -04:00
Stefan Junker
fc229c5090 *: appc/cni -> containernetworking/cni
The project has been moved so internally we simply rename everything.
Consumers are recommended to update their vendored version of cni.
2016-05-19 12:06:36 +02:00
Zachary Gershman
3382b459a7 Better error message when plugin cannot be found 2016-02-10 13:42:10 -08:00
Eugene Yakubovich
4bee884fae Change copyright from CoreOS to CNI authors
CNI is developed by more than just CoreOS, Inc
and the copyright is retained by all CNI
contributors (for their respective contributed code).
2015-09-29 11:51:33 -07:00
Eugene Yakubovich
ae3ceedd69 bug fix: exec of DEL cmd caused JSON decode error
When plugin is executed with a DEL command, it does not
print result to stdout unless there is an error. Therefore
it stdout bytes should not be passed to json.Unmarshal.
2015-09-18 10:30:10 -07:00
Michael Bridgen
09a8148e36 Factor an API out into a module
This takes some of the machinery from CNI and from the rkt networking
code, and turns it into a library that can be linked into go apps.

Included is an example command-line application that uses the library,
called `cnitool`.

Other headline changes:

 * Plugin exec'ing is factored out

The motivation here is to factor out the protocol for invoking
plugins. To that end, a generalisation of the code from api.go and
pkg/plugin/ipam.go goes into pkg/invoke/exec.go.

 * Move argument-handling and conf-loading into public API

The fact that the arguments get turned into an environment for the
plugin is incidental to the API; so, provide a way of supplying them
as a struct or saying "just use the same arguments as I got" (the
latter is for IPAM plugins).
2015-09-16 10:14:39 +01:00