summaryrefslogtreecommitdiff
path: root/libpod/networking_linux.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-26 13:37:09 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-26 15:54:26 -0500
commit2fa78938a94e90e41755b68dd1af36f5b817ed55 (patch)
treef6a1161387751d8a413c0ebe66ba253f4a91a1af /libpod/networking_linux.go
parent6a46a87d08bd1e9ddda3dd3c9c30d21d2226a654 (diff)
downloadpodman-2fa78938a94e90e41755b68dd1af36f5b817ed55.tar.gz
podman-2fa78938a94e90e41755b68dd1af36f5b817ed55.tar.bz2
podman-2fa78938a94e90e41755b68dd1af36f5b817ed55.zip
podmanv2 container inspect
add ability to inspect a container Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r--libpod/networking_linux.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index a7f501bfe..ab6ec4439 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -573,8 +573,8 @@ func getContainerNetIO(ctr *Container) (*netlink.LinkStatistics, error) {
// Produce an InspectNetworkSettings containing information on the container
// network.
-func (c *Container) getContainerNetworkInfo() (*InspectNetworkSettings, error) {
- settings := new(InspectNetworkSettings)
+func (c *Container) getContainerNetworkInfo() (*define.InspectNetworkSettings, error) {
+ settings := new(define.InspectNetworkSettings)
settings.Ports = []ocicni.PortMapping{}
if c.config.PortMappings != nil {
// TODO: This may not be safe.
@@ -600,13 +600,13 @@ func (c *Container) getContainerNetworkInfo() (*InspectNetworkSettings, error) {
return nil, errors.Wrapf(define.ErrInternal, "network inspection mismatch: asked to join %d CNI networks but have information on %d networks", len(c.config.Networks), len(c.state.NetworkStatus))
}
- settings.Networks = make(map[string]*InspectAdditionalNetwork)
+ settings.Networks = make(map[string]*define.InspectAdditionalNetwork)
// CNI results should be in the same order as the list of
// networks we pass into CNI.
for index, name := range c.config.Networks {
cniResult := c.state.NetworkStatus[index]
- addedNet := new(InspectAdditionalNetwork)
+ addedNet := new(define.InspectAdditionalNetwork)
addedNet.NetworkID = name
basicConfig, err := resultToBasicNetworkConfig(cniResult)
@@ -640,8 +640,8 @@ func (c *Container) getContainerNetworkInfo() (*InspectNetworkSettings, error) {
// resultToBasicNetworkConfig produces an InspectBasicNetworkConfig from a CNI
// result
-func resultToBasicNetworkConfig(result *cnitypes.Result) (InspectBasicNetworkConfig, error) {
- config := InspectBasicNetworkConfig{}
+func resultToBasicNetworkConfig(result *cnitypes.Result) (define.InspectBasicNetworkConfig, error) {
+ config := define.InspectBasicNetworkConfig{}
for _, ctrIP := range result.IPs {
size, _ := ctrIP.Address.Mask.Size()