Fix usage of oci in other packages.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin
2017-11-22 15:45:47 -05:00
parent 081f8c7ce0
commit cdf62f69a1
13 changed files with 80 additions and 68 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/containers"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/oci"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
@@ -116,7 +117,10 @@ func test(c config) error {
logrus.Info("starting stress test run...")
for i := 0; i < c.Concurrency; i++ {
wg.Add(1)
spec, err := containerd.GenerateSpec(ctx, client, &containers.Container{ID: ""}, containerd.WithImageConfig(image), containerd.WithProcessArgs("true"))
spec, err := oci.GenerateSpec(ctx, client,
&containers.Container{},
oci.WithImageConfig(image),
oci.WithProcessArgs("true"))
if err != nil {
return err
}