cli: refactor to align with katautils package

refactor the cli codes which can be shared with shimv2.

Signed-off-by: fupan <lifupan@gmail.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
fupan
2018-11-09 11:16:17 +08:00
parent 780cd5f7b9
commit f0cb0c7ef7
45 changed files with 1677 additions and 1203 deletions

View File

@@ -14,6 +14,7 @@ import (
"os"
"syscall"
"github.com/kata-containers/runtime/pkg/katautils"
vc "github.com/kata-containers/runtime/virtcontainers"
"github.com/kata-containers/runtime/virtcontainers/pkg/oci"
specs "github.com/opencontainers/runtime-spec/specs-go"
@@ -188,7 +189,7 @@ func generateExecParams(context *cli.Context, specProcess *oci.CompatOCIProcess)
}
func execute(ctx context.Context, context *cli.Context) error {
span, ctx := trace(ctx, "execute")
span, ctx := katautils.Trace(ctx, "execute")
defer span.Finish()
containerID := context.Args().First()