summaryrefslogtreecommitdiff
path: root/pkg/spec/createconfig.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-09-19 10:12:04 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-21 10:13:39 +0000
commit8b9b493b539ee2985b0f4470d62d456e2288d161 (patch)
tree9ea73614bdc99ea173d14470f9a7987cda79614c /pkg/spec/createconfig.go
parentfbd1392a46558eb4adb368ba37fdce2b45013c1f (diff)
downloadpodman-8b9b493b539ee2985b0f4470d62d456e2288d161.tar.gz
podman-8b9b493b539ee2985b0f4470d62d456e2288d161.tar.bz2
podman-8b9b493b539ee2985b0f4470d62d456e2288d161.zip
spec: refactor ns modes to a common interface
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1507 Approved by: rhatdan
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r--pkg/spec/createconfig.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 328e3763c..518ea5731 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -374,9 +374,9 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime) ([]lib
if IsNS(string(c.NetMode)) {
// pass
} else if c.NetMode.IsContainer() {
- connectedCtr, err := c.Runtime.LookupContainer(c.NetMode.ConnectedContainer())
+ connectedCtr, err := c.Runtime.LookupContainer(c.NetMode.Container())
if err != nil {
- return nil, errors.Wrapf(err, "container %q not found", c.NetMode.ConnectedContainer())
+ return nil, errors.Wrapf(err, "container %q not found", c.NetMode.Container())
}
options = append(options, libpod.WithNetNSFrom(connectedCtr))
} else if !c.NetMode.IsHost() && !c.NetMode.IsNone() {