summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-07 15:14:44 +0200
committerGitHub <noreply@github.com>2021-06-07 15:14:44 +0200
commit448b582909c958f339a531b4651a0315bef21497 (patch)
treee9bb8d800965bec635fcaa83764d7f93b2ff00f5 /cmd/podman/common
parenteaf53b6bb8d24b533ca4ca0f45ae69abd1086fdd (diff)
parente23c5b25f128a18b5b5c8d76cc0991f62005ae25 (diff)
downloadpodman-448b582909c958f339a531b4651a0315bef21497.tar.gz
podman-448b582909c958f339a531b4651a0315bef21497.tar.bz2
podman-448b582909c958f339a531b4651a0315bef21497.zip
Merge pull request #10381 from adrianreber/2021-05-18-publish
Add --publish to container restore
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/netflags.go2
-rw-r--r--cmd/podman/common/util.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/common/netflags.go b/cmd/podman/common/netflags.go
index 4f634f355..78cfe2f13 100644
--- a/cmd/podman/common/netflags.go
+++ b/cmd/podman/common/netflags.go
@@ -170,7 +170,7 @@ func NetFlagsToNetOptions(cmd *cobra.Command, netnsFromConfig bool) (*entities.N
return nil, err
}
if len(inputPorts) > 0 {
- opts.PublishPorts, err = createPortBindings(inputPorts)
+ opts.PublishPorts, err = CreatePortBindings(inputPorts)
if err != nil {
return nil, err
}
diff --git a/cmd/podman/common/util.go b/cmd/podman/common/util.go
index afee55914..6a0af4dff 100644
--- a/cmd/podman/common/util.go
+++ b/cmd/podman/common/util.go
@@ -89,8 +89,8 @@ func createExpose(expose []string) (map[uint16]string, error) {
return toReturn, nil
}
-// createPortBindings iterates ports mappings into SpecGen format.
-func createPortBindings(ports []string) ([]specgen.PortMapping, error) {
+// CreatePortBindings iterates ports mappings into SpecGen format.
+func CreatePortBindings(ports []string) ([]specgen.PortMapping, error) {
// --publish is formatted as follows:
// [[hostip:]hostport[-endPort]:]containerport[-endPort][/protocol]
toReturn := make([]specgen.PortMapping, 0, len(ports))