From d4e4878ec3e539e47da8c05227c8020d541a7df2 Mon Sep 17 00:00:00 2001
From: Daniel J Walsh <dwalsh@redhat.com>
Date: Tue, 16 Jan 2018 16:22:20 -0500
Subject: Remove --storage-opt from podman run/create

podman command has storage options as a global option,
these should be set there, rather then in the create and
run commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #234
Approved by: baude
---
 cmd/podman/create.go |  2 --
 cmd/podman/parse.go  | 15 ---------------
 2 files changed, 17 deletions(-)

(limited to 'cmd')

diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 83115c527..d592d5a8d 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -114,7 +114,6 @@ type createConfig struct {
 	SigProxy           bool              //sig-proxy
 	StopSignal         syscall.Signal    // stop-signal
 	StopTimeout        uint              // stop-timeout
-	StorageOpts        []string          //storage-opt
 	Sysctl             map[string]string //sysctl
 	Tmpfs              []string          // tmpfs
 	Tty                bool              //tty
@@ -626,7 +625,6 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime, imageName string,
 		SigProxy:    c.Bool("sig-proxy"),
 		StopSignal:  stopSignal,
 		StopTimeout: c.Uint("stop-timeout"),
-		StorageOpts: c.StringSlice("storage-opt"),
 		Sysctl:      sysctl,
 		Tmpfs:       c.StringSlice("tmpfs"),
 		Tty:         tty,
diff --git a/cmd/podman/parse.go b/cmd/podman/parse.go
index bb45d08c4..33988a3b6 100644
--- a/cmd/podman/parse.go
+++ b/cmd/podman/parse.go
@@ -696,21 +696,6 @@ func parseSecurityOpts(securityOpts []string) ([]string, error) { //nolint
 	return securityOpts, nil
 }
 
-// parses storage options per container into a map
-// for storage-opt flag
-func parseStorageOpts(storageOpts []string) (map[string]string, error) { //nolint
-	m := make(map[string]string)
-	for _, option := range storageOpts {
-		if strings.Contains(option, "=") {
-			opt := strings.SplitN(option, "=", 2)
-			m[opt[0]] = opt[1]
-		} else {
-			return nil, errors.Errorf("invalid storage option %q", option)
-		}
-	}
-	return m, nil
-}
-
 // convertKVStringsToMap converts ["key=value"] to {"key":"value"}
 func convertKVStringsToMap(values []string) map[string]string {
 	result := make(map[string]string, len(values))
-- 
cgit v1.2.3-54-g00ecf