github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/domain/entities/network.go (about)

     1  package entities
     2  
     3  import (
     4  	"net"
     5  
     6  	"github.com/containers/common/libnetwork/types"
     7  )
     8  
     9  // NetworkListOptions describes options for listing networks in cli
    10  type NetworkListOptions struct {
    11  	Format  string
    12  	Quiet   bool
    13  	Filters map[string][]string
    14  }
    15  
    16  // NetworkReloadOptions describes options for reloading container network
    17  // configuration.
    18  type NetworkReloadOptions struct {
    19  	All    bool
    20  	Latest bool
    21  }
    22  
    23  // NetworkReloadReport describes the results of reloading a container network.
    24  type NetworkReloadReport struct {
    25  	// nolint:stylecheck,revive
    26  	Id  string
    27  	Err error
    28  }
    29  
    30  // NetworkRmOptions describes options for removing networks
    31  type NetworkRmOptions struct {
    32  	Force   bool
    33  	Timeout *uint
    34  }
    35  
    36  // NetworkRmReport describes the results of network removal
    37  type NetworkRmReport struct {
    38  	Name string
    39  	Err  error
    40  }
    41  
    42  // NetworkCreateOptions describes options to create a network
    43  type NetworkCreateOptions struct {
    44  	DisableDNS bool
    45  	Driver     string
    46  	Gateways   []net.IP
    47  	Internal   bool
    48  	Labels     map[string]string
    49  	MacVLAN    string
    50  	Ranges     []string
    51  	Subnets    []string
    52  	IPv6       bool
    53  	// Mapping of driver options and values.
    54  	Options map[string]string
    55  }
    56  
    57  // NetworkCreateReport describes a created network for the cli
    58  type NetworkCreateReport struct {
    59  	Name string
    60  }
    61  
    62  // NetworkDisconnectOptions describes options for disconnecting
    63  // containers from networks
    64  type NetworkDisconnectOptions struct {
    65  	Container string
    66  	Force     bool
    67  }
    68  
    69  // NetworkConnectOptions describes options for connecting
    70  // a container to a network
    71  type NetworkConnectOptions struct {
    72  	Container string `json:"container"`
    73  	types.PerNetworkOptions
    74  }
    75  
    76  // NetworkPruneReport containers the name of network and an error
    77  // associated in its pruning (removal)
    78  // swagger:model NetworkPruneReport
    79  type NetworkPruneReport struct {
    80  	Name  string
    81  	Error error
    82  }
    83  
    84  // NetworkPruneOptions describes options for pruning
    85  // unused cni networks
    86  type NetworkPruneOptions struct {
    87  	Filters map[string][]string
    88  }