summaryrefslogtreecommitdiff
path: root/cmd/kpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2017-12-11 14:00:46 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-12 14:24:13 +0000
commit88121e0747c03084c233d22fadfd3c227e73a885 (patch)
tree88d7c00212dd97775dd2ae9d791fc9fc62e28402 /cmd/kpod
parent7f5aa42de01d9154440cd7f0929ec1eff83bd2d2 (diff)
downloadpodman-88121e0747c03084c233d22fadfd3c227e73a885.tar.gz
podman-88121e0747c03084c233d22fadfd3c227e73a885.tar.bz2
podman-88121e0747c03084c233d22fadfd3c227e73a885.zip
We don't support VolumesFrom or links
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #118 Approved by: mheon
Diffstat (limited to 'cmd/kpod')
-rw-r--r--cmd/kpod/create.go2
-rw-r--r--cmd/kpod/parse.go30
2 files changed, 0 insertions, 32 deletions
diff --git a/cmd/kpod/create.go b/cmd/kpod/create.go
index 1b340f96d..fc6e519fa 100644
--- a/cmd/kpod/create.go
+++ b/cmd/kpod/create.go
@@ -115,7 +115,6 @@ type createConfig struct {
group uint32 // group
utsMode container.UTSMode //uts
volumes []string //volume
- volumesFrom []string //volumes-from
workDir string //workdir
mountLabel string //SecurityOpts
processLabel string //SecurityOpts
@@ -478,7 +477,6 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime) (*createConfig, er
user: uid,
group: gid,
volumes: c.StringSlice("volume"),
- volumesFrom: c.StringSlice("volumes-from"),
workDir: c.String("workdir"),
}
diff --git a/cmd/kpod/parse.go b/cmd/kpod/parse.go
index 7f6fc78df..53d49c36c 100644
--- a/cmd/kpod/parse.go
+++ b/cmd/kpod/parse.go
@@ -449,36 +449,6 @@ func validateMACAddress(val string) (string, error) { //nolint
return val, nil
}
-// validateLink validates that the specified string has a valid link format (containerName:alias).
-func validateLink(val string) (string, error) { //nolint
- if _, _, err := parseLink(val); err != nil {
- return val, err
- }
- return val, nil
-}
-
-// parseLink parses and validates the specified string as a link format (name:alias)
-func parseLink(val string) (string, string, error) {
- if val == "" {
- return "", "", fmt.Errorf("empty string specified for links")
- }
- arr := strings.Split(val, ":")
- if len(arr) > 2 {
- return "", "", fmt.Errorf("bad format for links: %s", val)
- }
- if len(arr) == 1 {
- return val, val, nil
- }
- // This is kept because we can actually get a HostConfig with links
- // from an already created container and the format is not `foo:bar`
- // but `/foo:/c1/bar`
- if strings.HasPrefix(arr[0], "/") {
- _, alias := path.Split(arr[1])
- return arr[0][1:], alias, nil
- }
- return arr[0], arr[1], nil
-}
-
// parseLoggingOpts validates the logDriver and logDriverOpts
// for log-opt and log-driver flags
func parseLoggingOpts(logDriver string, logDriverOpt []string) (map[string]string, error) { //nolint