Skip to content

Commit

Permalink
Fill in the plugin version in -about- string (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvindeodhar authored and tamilmani1989 committed Jun 5, 2018
1 parent 509a6ae commit 1876098
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cni/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
// Plugin is the parent class for CNI plugins.
type Plugin struct {
*common.Plugin
version string
}

// NewPlugin creates a new CNI plugin.
Expand All @@ -34,7 +35,8 @@ func NewPlugin(name, version string) (*Plugin, error) {
}

return &Plugin{
Plugin: plugin,
Plugin: plugin,
version: version,
}, nil
}

Expand Down Expand Up @@ -83,7 +85,7 @@ func (plugin *Plugin) Execute(api PluginApi) (err error) {
pluginInfo := cniVers.PluginSupports(supportedVersions...)

// Parse args and call the appropriate cmd handler.
cniErr := cniSkel.PluginMainWithError(api.Add, api.Get, api.Delete, pluginInfo)
cniErr := cniSkel.PluginMainWithError(api.Add, api.Get, api.Delete, pluginInfo, plugin.version)
if cniErr != nil {
cniErr.Print()
return cniErr
Expand Down

0 comments on commit 1876098

Please sign in to comment.