vendor: update CNI to 0.6.0
Signed-off-by: Dan Williams <dcbw@redhat.com>
This commit is contained in:
parent
47ef2f66df
commit
aec99d6f80
19 changed files with 1092 additions and 249 deletions
20
vendor/github.com/containernetworking/cni/pkg/version/reconcile.go
generated
vendored
20
vendor/github.com/containernetworking/cni/pkg/version/reconcile.go
generated
vendored
|
@ -17,12 +17,12 @@ package version
|
|||
import "fmt"
|
||||
|
||||
type ErrorIncompatible struct {
|
||||
Config string
|
||||
Plugin []string
|
||||
Config string
|
||||
Supported []string
|
||||
}
|
||||
|
||||
func (e *ErrorIncompatible) Details() string {
|
||||
return fmt.Sprintf("config is %q, plugin supports %q", e.Config, e.Plugin)
|
||||
return fmt.Sprintf("config is %q, plugin supports %q", e.Config, e.Supported)
|
||||
}
|
||||
|
||||
func (e *ErrorIncompatible) Error() string {
|
||||
|
@ -31,17 +31,19 @@ func (e *ErrorIncompatible) Error() string {
|
|||
|
||||
type Reconciler struct{}
|
||||
|
||||
func (*Reconciler) Check(configVersion string, pluginInfo PluginInfo) *ErrorIncompatible {
|
||||
pluginVersions := pluginInfo.SupportedVersions()
|
||||
func (r *Reconciler) Check(configVersion string, pluginInfo PluginInfo) *ErrorIncompatible {
|
||||
return r.CheckRaw(configVersion, pluginInfo.SupportedVersions())
|
||||
}
|
||||
|
||||
for _, pluginVersion := range pluginVersions {
|
||||
if configVersion == pluginVersion {
|
||||
func (*Reconciler) CheckRaw(configVersion string, supportedVersions []string) *ErrorIncompatible {
|
||||
for _, supportedVersion := range supportedVersions {
|
||||
if configVersion == supportedVersion {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return &ErrorIncompatible{
|
||||
Config: configVersion,
|
||||
Plugin: pluginVersions,
|
||||
Config: configVersion,
|
||||
Supported: supportedVersions,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue