2017-02-12 13:03:39 +03:00
|
|
|
// Copyright 2017 Microsoft. All rights reserved.
|
|
|
|
// MIT License
|
2016-12-01 05:00:08 +03:00
|
|
|
|
|
|
|
package cni
|
|
|
|
|
|
|
|
import (
|
2016-12-10 05:05:33 +03:00
|
|
|
cniSkel "github.com/containernetworking/cni/pkg/skel"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2017-01-20 03:34:03 +03:00
|
|
|
// CNI commands.
|
2016-12-10 05:05:33 +03:00
|
|
|
CmdAdd = "ADD"
|
|
|
|
CmdDel = "DEL"
|
2016-12-01 05:00:08 +03:00
|
|
|
)
|
|
|
|
|
2017-02-06 10:52:35 +03:00
|
|
|
// Supported CNI versions.
|
|
|
|
var supportedVersions = []string{"0.1.0", "0.2.0", "0.3.0"}
|
|
|
|
|
2016-12-10 05:05:33 +03:00
|
|
|
// CNI contract.
|
2017-01-25 02:21:57 +03:00
|
|
|
type PluginApi interface {
|
2016-12-10 05:05:33 +03:00
|
|
|
Add(args *cniSkel.CmdArgs) error
|
|
|
|
Delete(args *cniSkel.CmdArgs) error
|
|
|
|
}
|