summaryrefslogtreecommitdiff
path: root/cmd/podmanV2/pods/create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-13 21:57:39 +0200
committerGitHub <noreply@github.com>2020-04-13 21:57:39 +0200
commit0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb (patch)
tree6d777c6e7bf9d542633a936a0bb03decceaeaaa8 /cmd/podmanV2/pods/create.go
parentd7695dd957b162ed24c807dc91200fe1abaecff1 (diff)
parent90ead05903e9c42758c1052c2ee623dca8de5e98 (diff)
downloadpodman-0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb.tar.gz
podman-0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb.tar.bz2
podman-0b067b67e6fa9e7ce8c1b460f5347c8ae89d1ecb.zip
Merge pull request #5800 from baude/v2edtests
Fixes for load and other system tests
Diffstat (limited to 'cmd/podmanV2/pods/create.go')
-rw-r--r--cmd/podmanV2/pods/create.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/podmanV2/pods/create.go b/cmd/podmanV2/pods/create.go
index ab8957ee3..2aaf0cd2c 100644
--- a/cmd/podmanV2/pods/create.go
+++ b/cmd/podmanV2/pods/create.go
@@ -123,6 +123,21 @@ func create(cmd *cobra.Command, args []string) error {
}
}
+ if !createOptions.Infra {
+ if cmd.Flag("infra-command").Changed {
+ return errors.New("cannot set infra-command without an infra container")
+ }
+ createOptions.InfraCommand = ""
+ if cmd.Flag("infra-image").Changed {
+ return errors.New("cannot set infra-image without an infra container")
+ }
+ createOptions.InfraImage = ""
+ if cmd.Flag("share").Changed {
+ return errors.New("cannot set share namespaces without an infra container")
+ }
+ createOptions.Share = nil
+ }
+
response, err := registry.ContainerEngine().PodCreate(context.Background(), createOptions)
if err != nil {
return err