bump CNI to spec v1.0.0

Signed-off-by: zounengren <zouyee1989@gmail.com>
This commit is contained in:
zounengren
2021-10-22 09:10:21 +08:00
parent 006b44181a
commit a217b5ac8f
32 changed files with 1180 additions and 499 deletions

View File

@@ -20,6 +20,7 @@ import (
"os"
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/types/create"
"github.com/containernetworking/cni/pkg/version"
)
@@ -83,14 +84,7 @@ func ExecPluginWithResult(ctx context.Context, pluginPath string, netconf []byte
return nil, err
}
// Plugin must return result in same version as specified in netconf
versionDecoder := &version.ConfigDecoder{}
confVersion, err := versionDecoder.Decode(netconf)
if err != nil {
return nil, err
}
return version.NewResult(confVersion, stdoutBytes)
return create.CreateFromBytes(stdoutBytes)
}
func ExecPluginWithoutResult(ctx context.Context, pluginPath string, netconf []byte, args CNIArgs, exec Exec) error {