github.com/ssdev-go/moby@v17.12.1-ce-rc2+incompatible/runconfig/errors.go (about)

     1  package runconfig
     2  
     3  const (
     4  	// ErrConflictContainerNetworkAndLinks conflict between --net=container and links
     5  	ErrConflictContainerNetworkAndLinks validationError = "conflicting options: container type network can't be used with links. This would result in undefined behavior"
     6  	// ErrConflictSharedNetwork conflict between private and other networks
     7  	ErrConflictSharedNetwork validationError = "container sharing network namespace with another container or host cannot be connected to any other network"
     8  	// ErrConflictHostNetwork conflict from being disconnected from host network or connected to host network.
     9  	ErrConflictHostNetwork validationError = "container cannot be disconnected from host network or connected to host network"
    10  	// ErrConflictNoNetwork conflict between private and other networks
    11  	ErrConflictNoNetwork validationError = "container cannot be connected to multiple networks with one of the networks in private (none) mode"
    12  	// ErrConflictNetworkAndDNS conflict between --dns and the network mode
    13  	ErrConflictNetworkAndDNS validationError = "conflicting options: dns and the network mode"
    14  	// ErrConflictNetworkHostname conflict between the hostname and the network mode
    15  	ErrConflictNetworkHostname validationError = "conflicting options: hostname and the network mode"
    16  	// ErrConflictHostNetworkAndLinks conflict between --net=host and links
    17  	ErrConflictHostNetworkAndLinks validationError = "conflicting options: host type networking can't be used with links. This would result in undefined behavior"
    18  	// ErrConflictContainerNetworkAndMac conflict between the mac address and the network mode
    19  	ErrConflictContainerNetworkAndMac validationError = "conflicting options: mac-address and the network mode"
    20  	// ErrConflictNetworkHosts conflict between add-host and the network mode
    21  	ErrConflictNetworkHosts validationError = "conflicting options: custom host-to-IP mapping and the network mode"
    22  	// ErrConflictNetworkPublishPorts conflict between the publish options and the network mode
    23  	ErrConflictNetworkPublishPorts validationError = "conflicting options: port publishing and the container type network mode"
    24  	// ErrConflictNetworkExposePorts conflict between the expose option and the network mode
    25  	ErrConflictNetworkExposePorts validationError = "conflicting options: port exposing and the container type network mode"
    26  	// ErrUnsupportedNetworkAndIP conflict between network mode and requested ip address
    27  	ErrUnsupportedNetworkAndIP validationError = "user specified IP address is supported on user defined networks only"
    28  	// ErrUnsupportedNetworkNoSubnetAndIP conflict between network with no configured subnet and requested ip address
    29  	ErrUnsupportedNetworkNoSubnetAndIP validationError = "user specified IP address is supported only when connecting to networks with user configured subnets"
    30  	// ErrUnsupportedNetworkAndAlias conflict between network mode and alias
    31  	ErrUnsupportedNetworkAndAlias validationError = "network-scoped alias is supported only for containers in user defined networks"
    32  	// ErrConflictUTSHostname conflict between the hostname and the UTS mode
    33  	ErrConflictUTSHostname validationError = "conflicting options: hostname and the UTS mode"
    34  )
    35  
    36  type validationError string
    37  
    38  func (e validationError) Error() string {
    39  	return string(e)
    40  }
    41  
    42  func (e validationError) InvalidParameter() {}