diff options
author | Brent Baude <bbaude@redhat.com> | 2020-03-24 07:28:36 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-03-27 09:04:10 -0500 |
commit | e56d5295614b745115abf0198f7b67ae157aae1e (patch) | |
tree | 4b18581f6656f2bd6455e797f69ab7d45535ec6a /pkg/specgen/specgen.go | |
parent | 7007680bfdee8c36b855a97ee45d268b24bde7d3 (diff) | |
download | podman-e56d5295614b745115abf0198f7b67ae157aae1e.tar.gz podman-e56d5295614b745115abf0198f7b67ae157aae1e.tar.bz2 podman-e56d5295614b745115abf0198f7b67ae157aae1e.zip |
podmanv2 pod create using podspecgen
using the factory approach similar to container, we now create pods based on a pod spec generator. wired up the podmanv2 pod create command, podcreatewithspec binding, simple binding test, and apiv2 endpoint.
also included some code refactoring as it introduced as easy circular import.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/specgen/specgen.go')
-rw-r--r-- | pkg/specgen/specgen.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go index b123c1da5..89c76c273 100644 --- a/pkg/specgen/specgen.go +++ b/pkg/specgen/specgen.go @@ -394,18 +394,18 @@ type SpecGenerator struct { // NewSpecGenerator returns a SpecGenerator struct given one of two mandatory inputs func NewSpecGenerator(image string) *SpecGenerator { - net := ContainerNetworkConfig{ + networkConfig := ContainerNetworkConfig{ NetNS: Namespace{ NSMode: Bridge, }, } csc := ContainerStorageConfig{Image: image} if rootless.IsRootless() { - net.NetNS.NSMode = Slirp + networkConfig.NetNS.NSMode = Slirp } return &SpecGenerator{ ContainerStorageConfig: csc, - ContainerNetworkConfig: net, + ContainerNetworkConfig: networkConfig, } } |