diff options
author | baude <bbaude@redhat.com> | 2019-01-15 09:56:50 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-01-15 09:56:50 -0600 |
commit | 61ca8e548762dce827f3a26d593db66d14793677 (patch) | |
tree | 6d06b5d753e124e6e69eb23c0d7eda6e373dd4b6 | |
parent | 077156d45cfea915cc249e92a5a45280e5ed71e1 (diff) | |
download | podman-61ca8e548762dce827f3a26d593db66d14793677.tar.gz podman-61ca8e548762dce827f3a26d593db66d14793677.tar.bz2 podman-61ca8e548762dce827f3a26d593db66d14793677.zip |
Rename localRuntime to runtime in cmd/podman
Signed-off-by: baude <bbaude@redhat.com>
-rw-r--r-- | cmd/podman/exists.go | 6 | ||||
-rw-r--r-- | cmd/podman/images.go | 10 | ||||
-rw-r--r-- | cmd/podman/info.go | 8 | ||||
-rw-r--r-- | cmd/podman/pull.go | 8 | ||||
-rw-r--r-- | cmd/podman/tag.go | 6 |
5 files changed, 19 insertions, 19 deletions
diff --git a/cmd/podman/exists.go b/cmd/podman/exists.go index bd1bc24ec..e6d2c8a11 100644 --- a/cmd/podman/exists.go +++ b/cmd/podman/exists.go @@ -67,12 +67,12 @@ func imageExistsCmd(c *cli.Context) error { if len(args) > 1 || len(args) < 1 { return errors.New("you may only check for the existence of one image at a time") } - localRuntime, err := adapter.GetRuntime(c) + runtime, err := adapter.GetRuntime(c) if err != nil { return errors.Wrapf(err, "could not get runtime") } - defer localRuntime.Runtime.Shutdown(false) - if _, err := localRuntime.NewImageFromLocal(args[0]); err != nil { + defer runtime.Runtime.Shutdown(false) + if _, err := runtime.NewImageFromLocal(args[0]); err != nil { //TODO we need to ask about having varlink defined errors exposed //so we can reuse them if errors.Cause(err) == image.ErrNoSuchImage || err.Error() == "io.podman.ImageNotFound" { diff --git a/cmd/podman/images.go b/cmd/podman/images.go index 8b8ce78bd..2b4187a9a 100644 --- a/cmd/podman/images.go +++ b/cmd/podman/images.go @@ -152,13 +152,13 @@ func imagesCmd(c *cli.Context) error { return err } - localRuntime, err := adapter.GetRuntime(c) + runtime, err := adapter.GetRuntime(c) if err != nil { return errors.Wrapf(err, "Could not get runtime") } - defer localRuntime.Runtime.Shutdown(false) + defer runtime.Runtime.Shutdown(false) if len(c.Args()) == 1 { - newImage, err = localRuntime.NewImageFromLocal(c.Args().Get(0)) + newImage, err = runtime.NewImageFromLocal(c.Args().Get(0)) if err != nil { return err } @@ -171,7 +171,7 @@ func imagesCmd(c *cli.Context) error { ctx := getContext() if len(c.StringSlice("filter")) > 0 || newImage != nil { - filterFuncs, err = CreateFilterFuncs(ctx, localRuntime, c, newImage) + filterFuncs, err = CreateFilterFuncs(ctx, runtime, c, newImage) if err != nil { return err } @@ -195,7 +195,7 @@ func imagesCmd(c *cli.Context) error { children to the image once built. until buildah supports caching builds, it will not generate these intermediate images. */ - images, err := localRuntime.GetImages() + images, err := runtime.GetImages() if err != nil { return errors.Wrapf(err, "unable to get images") } diff --git a/cmd/podman/info.go b/cmd/podman/info.go index 4b80f94db..1ec4011da 100644 --- a/cmd/podman/info.go +++ b/cmd/podman/info.go @@ -39,20 +39,20 @@ func infoCmd(c *cli.Context) error { } info := map[string]interface{}{} - localRuntime, err := adapter.GetRuntime(c) + runtime, err := adapter.GetRuntime(c) if err != nil { return errors.Wrapf(err, "could not get runtime") } - defer localRuntime.Runtime.Shutdown(false) + defer runtime.Runtime.Shutdown(false) - infoArr, err := localRuntime.Runtime.Info() + infoArr, err := runtime.Runtime.Info() if err != nil { return errors.Wrapf(err, "error getting info") } // TODO This is no a problem child because we don't know if we should add information // TODO about the client or the backend. Only do for traditional podman for now. - if !localRuntime.Remote && c.Bool("debug") { + if !runtime.Remote && c.Bool("debug") { debugInfo := debugInfo(c) infoArr = append(infoArr, libpod.InfoData{Type: "debug", Data: debugInfo}) } diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go index 78b28e36e..d81457c67 100644 --- a/cmd/podman/pull.go +++ b/cmd/podman/pull.go @@ -64,11 +64,11 @@ specified, the image with the 'latest' tag (if it exists) is pulled // pullCmd gets the data from the command line and calls pullImage // to copy an image from a registry to a local machine func pullCmd(c *cli.Context) error { - localRuntime, err := adapter.GetRuntime(c) + runtime, err := adapter.GetRuntime(c) if err != nil { return errors.Wrapf(err, "could not get runtime") } - defer localRuntime.Runtime.Shutdown(false) + defer runtime.Runtime.Shutdown(false) args := c.Args() if len(args) == 0 { @@ -116,14 +116,14 @@ func pullCmd(c *cli.Context) error { if err != nil { return errors.Wrapf(err, "error parsing %q", image) } - newImage, err := localRuntime.LoadFromArchiveReference(getContext(), srcRef, c.String("signature-policy"), writer) + newImage, err := runtime.LoadFromArchiveReference(getContext(), srcRef, c.String("signature-policy"), writer) if err != nil { return errors.Wrapf(err, "error pulling image from %q", image) } imgID = newImage[0].ID() } else { authfile := getAuthFile(c.String("authfile")) - newImage, err := localRuntime.New(getContext(), image, c.String("signature-policy"), authfile, writer, &dockerRegistryOptions, image2.SigningOptions{}, true) + newImage, err := runtime.New(getContext(), image, c.String("signature-policy"), authfile, writer, &dockerRegistryOptions, image2.SigningOptions{}, true) if err != nil { return errors.Wrapf(err, "error pulling image %q", image) } diff --git a/cmd/podman/tag.go b/cmd/podman/tag.go index c99e5d173..8e92ca2fa 100644 --- a/cmd/podman/tag.go +++ b/cmd/podman/tag.go @@ -23,13 +23,13 @@ func tagCmd(c *cli.Context) error { if len(args) < 2 { return errors.Errorf("image name and at least one new name must be specified") } - localRuntime, err := adapter.GetRuntime(c) + runtime, err := adapter.GetRuntime(c) if err != nil { return errors.Wrapf(err, "could not create runtime") } - defer localRuntime.Runtime.Shutdown(false) + defer runtime.Runtime.Shutdown(false) - newImage, err := localRuntime.NewImageFromLocal(args[0]) + newImage, err := runtime.NewImageFromLocal(args[0]) if err != nil { return err } |