mirror of
https://github.com/containers/podman.git
synced 2025-12-15 11:42:28 +08:00
network create: add support for ipam-driver none
Add a new flag to set the ipam-driver. Also adds a new ipam driver none mode which only creates interfaces but does not assign addresses. Fixes #13521 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -1119,4 +1119,17 @@ EXPOSE 2004-2005/tcp`, ALPINE)
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
})
|
||||
|
||||
It("podman run with ipam none driver", func() {
|
||||
net := "ipam" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", "--ipam-driver=none", net})
|
||||
session.WaitWithDefaultTimeout()
|
||||
defer podmanTest.removeNetwork(net)
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"run", "--network", net, ALPINE, "ip", "addr", "show", "eth0"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.OutputToStringArray()).To(HaveLen(4), "output should only show link local address")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user