aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/pod_create.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-02-03 15:30:17 -0600
committerBrent Baude <bbaude@redhat.com>2020-02-03 15:30:17 -0600
commitb438cb2cce33ac727f3b0c24154055e287fead4d (patch)
treeac4e9f8f8f9671d09e48fbfc2032fb9c56d8068b /cmd/podman/pod_create.go
parent23f795786224c27f737e9043e9d513f54fa35ba8 (diff)
downloadpodman-b438cb2cce33ac727f3b0c24154055e287fead4d.tar.gz
podman-b438cb2cce33ac727f3b0c24154055e287fead4d.tar.bz2
podman-b438cb2cce33ac727f3b0c24154055e287fead4d.zip
seperate container create network options
this pr splits off some of the network container create options into a different flag set. the options in question are: --add-host --dns --dns-opt --dns-search --ip --mac-address --network --no-hosts --publish in the future, these options are going to be added to the pod create flags. this makes that transition easier and provides for less code duplication. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/pod_create.go')
-rw-r--r--cmd/podman/pod_create.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd/podman/pod_create.go b/cmd/podman/pod_create.go
index ad3c00aa8..cee6476ea 100644
--- a/cmd/podman/pod_create.go
+++ b/cmd/podman/pod_create.go
@@ -44,6 +44,18 @@ func init() {
podCreateCommand.SetUsageTemplate(UsageTemplate())
flags := podCreateCommand.Flags()
flags.SetInterspersed(false)
+ // When we are ready to add the network options to the create commmand, we need to uncomment
+ // the following
+
+ //flags.AddFlagSet(getNetFlags())
+
+ // Once this is uncommented, then the publish option below needs to be removed because it
+ // conflicts with the publish in getNetFlags. Upon removal, the c.Publish will not work
+ // anymore and needs to be cleaned up. I suggest starting with removing the Publish attribute
+ // from PodCreateValues structure. Running make should then expose all areas that need to be
+ // addressed. To get the value of publish (and other flags in getNetFlags, use the syntax:
+ // c.<type>("<flag_name") or c.Bool("publish")
+ // Remember to do this safely by checking len, etc.
flags.StringVar(&podCreateCommand.CgroupParent, "cgroup-parent", "", "Set parent cgroup for the pod")
flags.BoolVar(&podCreateCommand.Infra, "infra", true, "Create an infra container associated with the pod to share namespaces with")