| 1 |
# Overview |
| 2 |
|
| 3 |
The `cnitool` is a utility that can be used to test a CNI plugin |
| 4 |
without the need for a container runtime. The `cnitool` takes a |
| 5 |
`network name` and a `network namespace` and a command to `ADD` or |
| 6 |
`DEL`,.i.e, attach or detach containers from a network. The `cnitool` |
| 7 |
relies on the following environment variables to operate properly: |
| 8 |
|
| 9 |
* `NETCONFPATH`: This environment variable needs to be set to a |
| 10 |
directory. It defaults to `/etc/cni/net.d`. The `cnitool` searches |
| 11 |
for CNI configuration files in this directory with the extension |
| 12 |
`*.conf` or `*.json`. It loads all the CNI configuration files in |
| 13 |
this directory and if it finds a CNI configuration with the `network |
| 14 |
name` given to the cnitool it returns the corresponding CNI |
| 15 |
configuration, else it returns `nil`. |
| 16 |
* `CNI_PATH`: For a given CNI configuration `cnitool` will search for |
| 17 |
the corresponding CNI plugin in this path. |
| 18 |
|
| 19 |
For the full documentation of `cnitool` see the [cnitool docs](../cnitool/README.md) |