github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/pkg/domain/entities/network.go (about)

     1  package entities
     2  
     3  import (
     4  	"net"
     5  
     6  	"github.com/containernetworking/cni/libcni"
     7  )
     8  
     9  // NetworkListOptions describes options for listing networks in cli
    10  type NetworkListOptions struct {
    11  	Format string
    12  	Quiet  bool
    13  	Filter string
    14  }
    15  
    16  // NetworkListReport describes the results from listing networks
    17  type NetworkListReport struct {
    18  	*libcni.NetworkConfigList
    19  }
    20  
    21  // NetworkInspectReport describes the results from inspect networks
    22  type NetworkInspectReport map[string]interface{}
    23  
    24  // NetworkRmOptions describes options for removing networks
    25  type NetworkRmOptions struct {
    26  	Force bool
    27  }
    28  
    29  //NetworkRmReport describes the results of network removal
    30  type NetworkRmReport struct {
    31  	Name string
    32  	Err  error
    33  }
    34  
    35  // NetworkCreateOptions describes options to create a network
    36  // swagger:model NetworkCreateOptions
    37  type NetworkCreateOptions struct {
    38  	DisableDNS bool
    39  	Driver     string
    40  	Gateway    net.IP
    41  	Internal   bool
    42  	MacVLAN    string
    43  	Range      net.IPNet
    44  	Subnet     net.IPNet
    45  	IPv6       bool
    46  }
    47  
    48  // NetworkCreateReport describes a created network for the cli
    49  type NetworkCreateReport struct {
    50  	Filename string
    51  }
    52  
    53  // NetworkDisconnectOptions describes options for disconnecting
    54  // containers from networks
    55  type NetworkDisconnectOptions struct {
    56  	Container string
    57  	Force     bool
    58  }
    59  
    60  // NetworkConnectOptions describes options for connecting
    61  // a container to a network
    62  type NetworkConnectOptions struct {
    63  	Aliases   []string
    64  	Container string
    65  }