summaryrefslogtreecommitdiff
path: root/pkg/specgen/namespaces.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-29 11:25:56 -0500
committerBrent Baude <bbaude@redhat.com>2020-04-03 15:43:03 -0500
commit6514a5c80ef91ef6e16e283339cd0b5f78a42322 (patch)
tree33ced51adee58d38b39416191e2e8a207ce4ec47 /pkg/specgen/namespaces.go
parent35f586783388cdff6b4f15e7aff4df1ee72d9b67 (diff)
downloadpodman-6514a5c80ef91ef6e16e283339cd0b5f78a42322.tar.gz
podman-6514a5c80ef91ef6e16e283339cd0b5f78a42322.tar.bz2
podman-6514a5c80ef91ef6e16e283339cd0b5f78a42322.zip
v2podman container create
create a container in podmanv2 using specgen approach. this is the core implementation and still has quite a bit of code commented out specifically around volumes, devices, and namespaces. need contributions from smes on these parts. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/specgen/namespaces.go')
-rw-r--r--pkg/specgen/namespaces.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index fa2dee77d..2a7bb3495 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -16,6 +16,9 @@ import (
type NamespaceMode string
const (
+ // Default indicates the spec generator should determine
+ // a sane default
+ Default NamespaceMode = "default"
// Host means the the namespace is derived from
// the host
Host NamespaceMode = "host"
@@ -83,7 +86,7 @@ func validateNetNS(n *Namespace) error {
return nil
}
-// validate perform simple validation on the namespace to make sure it is not
+// Validate perform simple validation on the namespace to make sure it is not
// invalid from the get-go
func (n *Namespace) validate() error {
if n == nil {
@@ -103,7 +106,7 @@ func (n *Namespace) validate() error {
return nil
}
-func (s *SpecGenerator) generateNamespaceContainerOpts(rt *libpod.Runtime) ([]libpod.CtrCreateOption, error) {
+func (s *SpecGenerator) GenerateNamespaceContainerOpts(rt *libpod.Runtime) ([]libpod.CtrCreateOption, error) {
var portBindings []ocicni.PortMapping
options := make([]libpod.CtrCreateOption, 0)