summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/networks.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers/compat/networks.go')
-rw-r--r--pkg/api/handlers/compat/networks.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go
index 28727a22b..b1456ed9e 100644
--- a/pkg/api/handlers/compat/networks.go
+++ b/pkg/api/handlers/compat/networks.go
@@ -224,7 +224,8 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
// FIXME can we use the IPAM driver and options?
}
- network, err := runtime.Network().NetworkCreate(network)
+ ic := abi.ContainerEngine{Libpod: runtime}
+ newNetwork, err := ic.NetworkCreate(r.Context(), network)
if err != nil {
utils.InternalServerError(w, err)
return
@@ -234,7 +235,7 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
ID string `json:"Id"`
Warning []string
}{
- ID: network.ID,
+ ID: newNetwork.ID,
}
utils.WriteResponse(w, http.StatusCreated, body)
}