versioning: plugins require version match with config

infer version 0.1.0 when config is missing an explicit "cniVersion" field
This commit is contained in:
Gabe Rosenhouse
2016-09-19 13:00:49 -07:00
parent 1e4e8fdb5d
commit 04ba7c7761
6 changed files with 169 additions and 24 deletions

View File

@ -112,6 +112,14 @@ type Route struct {
GW net.IP
}
// Well known error codes
// see https://github.com/containernetworking/cni/blob/master/SPEC.md#well-known-error-codes
const (
ErrUnknown uint = iota // 0
ErrIncompatibleCNIVersion // 1
ErrUnsupportedField // 2
)
type Error struct {
Code uint `json:"code"`
Msg string `json:"msg"`