vendor: bump to libcni v1.0.1

Signed-off-by: Casey Callendrello <cdc@redhat.com>
This commit is contained in:
Casey Callendrello
2021-09-07 15:43:35 +02:00
parent 8632ace977
commit 62952ffdac
4 changed files with 21 additions and 3 deletions

View File

@ -19,7 +19,7 @@ import (
"fmt"
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/types/100"
types100 "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/cni/pkg/types/create"
)
@ -38,6 +38,22 @@ func Current() string {
var Legacy = PluginSupports("0.1.0", "0.2.0")
var All = PluginSupports("0.1.0", "0.2.0", "0.3.0", "0.3.1", "0.4.0", "1.0.0")
// VersionsFrom returns a list of versions starting from min, inclusive
func VersionsStartingFrom(min string) PluginInfo {
out := []string{}
// cheat, just assume ordered
ok := false
for _, v := range All.SupportedVersions() {
if !ok && v == min {
ok = true
}
if ok {
out = append(out, v)
}
}
return PluginSupports(out...)
}
// Finds a Result object matching the requested version (if any) and asks
// that object to parse the plugin result, returning an error if parsing failed.
func NewResult(version string, resultBytes []byte) (types.Result, error) {

2
vendor/modules.txt vendored
View File

@ -37,7 +37,7 @@ github.com/alexflint/go-filemutex
github.com/buger/jsonparser
# github.com/containerd/cgroups v1.0.1
github.com/containerd/cgroups/stats/v1
# github.com/containernetworking/cni v1.0.0
# github.com/containernetworking/cni v1.0.1
## explicit
github.com/containernetworking/cni/libcni
github.com/containernetworking/cni/pkg/invoke