aboutsummaryrefslogtreecommitdiff
path: root/cmd/kpod
diff options
context:
space:
mode:
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