summaryrefslogtreecommitdiff
path: root/cmd/podman/common/createparse.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-04-18 08:49:46 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-04-19 05:19:30 -0400
commit426eccee63fc7add4b37a9c246cf83b08379cb62 (patch)
treec28ece34d0b01c4f85aebc7cab63c1a21a7e9472 /cmd/podman/common/createparse.go
parente4e42b28dfef0ffd12f2087048dec61f9cb03976 (diff)
downloadpodman-426eccee63fc7add4b37a9c246cf83b08379cb62.tar.gz
podman-426eccee63fc7add4b37a9c246cf83b08379cb62.tar.bz2
podman-426eccee63fc7add4b37a9c246cf83b08379cb62.zip
Cleanup network option parsing
We were not handling the parsing of --ip. This pr adds validation checks and now will support the flag. Move validation to the actual parsing of the network flags. We should only parse the dns flags if the user changed them. We don't want to pass default options if set in containers.conf to the server. Potential for duplicating defaults. Add support for --dns-opt flag passing Begin handling of --network flag, although we don't have a way right now to translate a string into a specgen.Namespace. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common/createparse.go')
-rw-r--r--cmd/podman/common/createparse.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/cmd/podman/common/createparse.go b/cmd/podman/common/createparse.go
index aca6f752e..fe6e322c2 100644
--- a/cmd/podman/common/createparse.go
+++ b/cmd/podman/common/createparse.go
@@ -1,7 +1,6 @@
package common
import (
- "github.com/containers/libpod/cmd/podman/parse"
"github.com/containers/libpod/pkg/util"
"github.com/pkg/errors"
)
@@ -17,27 +16,7 @@ func (c *ContainerCLIOpts) validate() error {
if _, err := util.ValidatePullType(c.Pull); err != nil {
return err
}
- // Verify the additional hosts are in correct format
- for _, host := range c.Net.AddHosts {
- if _, err := parse.ValidateExtraHost(host); err != nil {
- return err
- }
- }
- if dnsSearches := c.Net.DNSSearch; len(dnsSearches) > 0 {
- // Validate domains are good
- for _, dom := range dnsSearches {
- if dom == "." {
- if len(dnsSearches) > 1 {
- return errors.Errorf("cannot pass additional search domains when also specifying '.'")
- }
- continue
- }
- if _, err := parse.ValidateDomain(dom); err != nil {
- return err
- }
- }
- }
var imageVolType = map[string]string{
"bind": "",
"tmpfs": "",