summaryrefslogtreecommitdiff
path: root/pkg/domain/entities
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r--pkg/domain/entities/container_ps.go4
-rw-r--r--pkg/domain/entities/containers.go3
-rw-r--r--pkg/domain/entities/engine_container.go7
-rw-r--r--pkg/domain/entities/network.go14
4 files changed, 8 insertions, 20 deletions
diff --git a/pkg/domain/entities/container_ps.go b/pkg/domain/entities/container_ps.go
index 572d6b9e9..7c255b0ea 100644
--- a/pkg/domain/entities/container_ps.go
+++ b/pkg/domain/entities/container_ps.go
@@ -5,8 +5,8 @@ import (
"strings"
"time"
+ "github.com/containers/podman/v3/libpod/network/types"
"github.com/containers/podman/v3/pkg/ps/define"
- "github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
)
@@ -54,7 +54,7 @@ type ListContainer struct {
// boolean to be set
PodName string
// Port mappings
- Ports []ocicni.PortMapping
+ Ports []types.OCICNIPortMapping
// Size of the container rootfs. Requires the size boolean to be true
Size *define.ContainerSize
// Time when container started
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go
index 607e68256..a302cdb7d 100644
--- a/pkg/domain/entities/containers.go
+++ b/pkg/domain/entities/containers.go
@@ -11,7 +11,6 @@ import (
nettypes "github.com/containers/podman/v3/libpod/network/types"
"github.com/containers/podman/v3/pkg/specgen"
"github.com/containers/storage/pkg/archive"
- "github.com/cri-o/ocicni/pkg/ocicni"
)
// ContainerRunlabelOptions are the options to execute container-runlabel.
@@ -422,7 +421,7 @@ type ContainerPortOptions struct {
// the CLI to output ports
type ContainerPortReport struct {
Id string //nolint
- Ports []ocicni.PortMapping
+ Ports []nettypes.OCICNIPortMapping
}
// ContainerCpOptions describes input options for cp.
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go
index 3da31d8a0..b916d6fc6 100644
--- a/pkg/domain/entities/engine_container.go
+++ b/pkg/domain/entities/engine_container.go
@@ -6,6 +6,7 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/network/types"
"github.com/containers/podman/v3/pkg/domain/entities/reports"
"github.com/containers/podman/v3/pkg/specgen"
)
@@ -58,11 +59,11 @@ type ContainerEngine interface {
HealthCheckRun(ctx context.Context, nameOrID string, options HealthCheckOptions) (*define.HealthCheckResults, error)
Info(ctx context.Context) (*define.Info, error)
NetworkConnect(ctx context.Context, networkname string, options NetworkConnectOptions) error
- NetworkCreate(ctx context.Context, name string, options NetworkCreateOptions) (*NetworkCreateReport, error)
+ NetworkCreate(ctx context.Context, network types.Network) (*NetworkCreateReport, error)
NetworkDisconnect(ctx context.Context, networkname string, options NetworkDisconnectOptions) error
NetworkExists(ctx context.Context, networkname string) (*BoolReport, error)
- NetworkInspect(ctx context.Context, namesOrIds []string, options InspectOptions) ([]NetworkInspectReport, []error, error)
- NetworkList(ctx context.Context, options NetworkListOptions) ([]*NetworkListReport, error)
+ NetworkInspect(ctx context.Context, namesOrIds []string, options InspectOptions) ([]types.Network, []error, error)
+ NetworkList(ctx context.Context, options NetworkListOptions) ([]types.Network, error)
NetworkPrune(ctx context.Context, options NetworkPruneOptions) ([]*NetworkPruneReport, error)
NetworkReload(ctx context.Context, names []string, options NetworkReloadOptions) ([]*NetworkReloadReport, error)
NetworkRm(ctx context.Context, namesOrIds []string, options NetworkRmOptions) ([]*NetworkRmReport, error)
diff --git a/pkg/domain/entities/network.go b/pkg/domain/entities/network.go
index a89501664..b61297d41 100644
--- a/pkg/domain/entities/network.go
+++ b/pkg/domain/entities/network.go
@@ -2,8 +2,6 @@ package entities
import (
"net"
-
- "github.com/containernetworking/cni/libcni"
)
// NetworkListOptions describes options for listing networks in cli
@@ -13,15 +11,6 @@ type NetworkListOptions struct {
Filters map[string][]string
}
-// NetworkListReport describes the results from listing networks
-type NetworkListReport struct {
- *libcni.NetworkConfigList
- Labels map[string]string
-}
-
-// NetworkInspectReport describes the results from inspect networks
-type NetworkInspectReport map[string]interface{}
-
// NetworkReloadOptions describes options for reloading container network
// configuration.
type NetworkReloadOptions struct {
@@ -48,7 +37,6 @@ type NetworkRmReport struct {
}
// NetworkCreateOptions describes options to create a network
-// swagger:model NetworkCreateOptions
type NetworkCreateOptions struct {
DisableDNS bool
Driver string
@@ -65,7 +53,7 @@ type NetworkCreateOptions struct {
// NetworkCreateReport describes a created network for the cli
type NetworkCreateReport struct {
- Filename string
+ Name string
}
// NetworkDisconnectOptions describes options for disconnecting