Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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