11 Commits

Author SHA1 Message Date
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
befb95977c types: make Result an interface and move existing Result to separate package 2017-01-25 11:31:18 -06:00
Dan Williams
0c2a034f01 api,libcni: add network config list-based plugin chaining
Using a new ".configlist" file format that allows specifying
a list of CNI network configurations to run, add new libcni
helper functions to call each plugin in the list, injecting
the overall name, CNI version, and previous plugin's Result
structure into the configuration of the next plugin.
2017-01-19 22:28:21 -06:00
Dan Williams
0a1b48f520 noop: allow specifying debug file in config JSON
Chaining sends different config JSON to each plugin, but the same
environment, and if we want to test multiple noop plugin runs in
the same chain we need a way of telling each run to use a different
debug file.
2017-01-19 09:56:42 -06:00
Konstantinos Karampogias
accac60053 plugins/noop: return a helpful message for test authors
Signed-off-by: Gabe Rosenhouse <grosenhouse@pivotal.io>
2016-12-02 15:04:01 -08:00
Mark St.Godard
48d3b46eb2 noop plugin: support multiple CNI_ARGS
Updated noop plugin to parse the CNI_ARGS pairs, to allow more than just
the DEBUG arg.
2016-11-10 16:04:42 -06:00
Gabe Rosenhouse
7958b9f0cc versioning: revert spec version to 0.2.0 2016-09-06 15:37:42 -04:00
Gabe Rosenhouse
d5e2e375d4 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
536cb5b99b 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
d3ecadb860 invoke: backfill tests for plugin execution 2016-08-30 23:52:47 -04:00
Gabe Rosenhouse
5835c2bbb1 plugins: adds new no-op plugin that may be used as a test-double
Plugin can be configured to record all inputs and to respond with
arbitrary stdout or error message.  Will support upcoming integration
testing.
2016-07-15 12:48:02 -07:00