From 7bc96f05bb046ddd5dc366ff33fb1815d6306925 Mon Sep 17 00:00:00 2001 From: Gabe Rosenhouse Date: Thu, 21 Jul 2016 12:59:08 -0700 Subject: [PATCH] spec: add version command and increment version to 0.2.0 --- SPEC.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SPEC.md b/SPEC.md index 06ae36aa..cf752226 100644 --- a/SPEC.md +++ b/SPEC.md @@ -62,9 +62,14 @@ The operations that the CNI plugin needs to support are: - **Extra arguments**, as defined above. - **Name of the interface inside the container**, as defined above. +- Report version + - Parameters: NONE. + - Result: + - The version of the CNI spec implemented by the plugin: `{ "cniVersion": "0.2.0" }` + The executable command-line API uses the type of network (see [Network Configuration](#network-configuration) below) as the name of the executable to invoke. It will then look for this executable in a list of predefined directories. Once found, it will invoke the executable using the following environment variables for argument passing: -- `CNI_COMMAND`: indicates the desired operation; either `ADD` or `DEL` +- `CNI_COMMAND`: indicates the desired operation; `ADD`, `DEL` or `VERSION`. - `CNI_CONTAINERID`: Container ID - `CNI_NETNS`: Path to network namespace file - `CNI_IFNAME`: Interface name to set up @@ -80,7 +85,7 @@ Success is indicated by a return code of zero and the following JSON printed to ``` { - "cniVersion": "0.1.0", + "cniVersion": "0.2.0", "ip4": { "ip": , "gateway": , (optional) @@ -109,7 +114,7 @@ Examples include generating an `/etc/resolv.conf` file to be injected into the c Errors are indicated by a non-zero return code and the following JSON being printed to stdout: ``` { - "cniVersion": "0.1.0", + "cniVersion": "0.2.0", "code": , "msg": , "details": (optional) @@ -146,7 +151,7 @@ Plugins may define additional fields that they accept and may generate an error ```json { - "cniVersion": "0.1.0", + "cniVersion": "0.2.0", "name": "dbnet", "type": "bridge", // type (plugin) specific @@ -165,7 +170,7 @@ Plugins may define additional fields that they accept and may generate an error ```json { - "cniVersion": "0.1.0", + "cniVersion": "0.2.0", "name": "pci", "type": "ovs", // type (plugin) specific @@ -215,7 +220,7 @@ Success is indicated by a zero return code and the following JSON being printed ``` { - "cniVersion": "0.1.0", + "cniVersion": "0.2.0", "ip4": { "ip": , "gateway": , (optional)