invoke: correctly infer version for 0.1.0-vintage plugins

Older plugins return a known error when issued the VERSION command.
Capture this error and report it as a 0.1.0 version plugin.
This commit is contained in:
Gabe Rosenhouse
2016-09-02 16:01:22 -04:00
parent deb4466041
commit 97192fc979
4 changed files with 84 additions and 4 deletions

View File

@ -67,8 +67,6 @@ func (c *CNIConfig) GetVersionInfo(pluginType string) (version.PluginInfo, error
return nil, err
}
// TODO: if error is because plugin is old and VERSION command is unrecognized
// then do the right thing and return version.PluginSupports("0.1.0"), nil
return invoke.ExecPluginForVersion(pluginPath)
}