invoke: Enable plugin file names with extensions
authorOnur Filiz <onur.filiz@microsoft.com>
Sat, 4 Feb 2017 20:01:47 +0000 (12:01 -0800)
committerOnur Filiz <onur.filiz@microsoft.com>
Sat, 4 Feb 2017 20:01:47 +0000 (12:01 -0800)
commit271be6c8dfe862f604567c069d514b382a246b7a
treedb785c25fb28272bf2a1a763ac9738ca72525691
parentc4271dba67fa09ee07170364d2f97a3c95d651f3
invoke: Enable plugin file names with extensions

A CNI network configuration file contains the plugin's executable file name.
Some platforms like Windows require a file name extension for executables.
This causes unnecessary burden on admins as they now have to maintain two
versions of each type of netconfig file, which differ only by the ".exe"
extension. A much simpler design is for invoke package to also look for
well-known extensions on platforms that require it. Existing tests are
improved and new tests are added to cover the new behavior.

Fixes #360
pkg/invoke/find.go
pkg/invoke/find_test.go
pkg/invoke/os_unix.go [new file with mode: 0644]
pkg/invoke/os_windows.go [new file with mode: 0644]