Documentation ¶
Index ¶
- Constants
- func Create(ctx context.Context, client client.APIClient, name string, ...) (string, error)
- func CreateNoError(ctx context.Context, t *testing.T, client client.APIClient, name string, ...) string
- func IsRemoved(ctx context.Context, client client.NetworkAPIClient, networkID string) func(log poll.LogT) poll.Result
- func RemoveNoError(ctx context.Context, t *testing.T, apiClient client.APIClient, name string)
- func StartDaftDNS(t *testing.T, addr string)
- func WithAttachable() func(*network.CreateOptions)
- func WithDriver(driver string) func(*network.CreateOptions)
- func WithIPAM(subnet, gateway string) func(*network.CreateOptions)
- func WithIPAMRange(subnet, iprange, gateway string) func(*network.CreateOptions)
- func WithIPv4(enable bool) func(*network.CreateOptions)
- func WithIPv6() func(*network.CreateOptions)
- func WithIPvlan(parent, mode string) func(*network.CreateOptions)
- func WithInternal() func(*network.CreateOptions)
- func WithMacvlan(parent string) func(*network.CreateOptions)
- func WithMacvlanPassthru(parent string) func(options *network.CreateOptions)
- func WithOption(key, value string) func(*network.CreateOptions)
- func WriteTempResolvConf(t *testing.T, addr string) string
Constants ¶
const DNSRespAddr = "10.11.12.13"
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(ctx context.Context, client client.APIClient, name string, ops ...func(*network.CreateOptions)) (string, error)
Create creates a network with the specified options
func CreateNoError ¶
func CreateNoError(ctx context.Context, t *testing.T, client client.APIClient, name string, ops ...func(*network.CreateOptions)) string
CreateNoError creates a network with the specified options and verifies there were no errors
func IsRemoved ¶
func IsRemoved(ctx context.Context, client client.NetworkAPIClient, networkID string) func(log poll.LogT) poll.Result
IsRemoved verifies the network is removed.
func RemoveNoError ¶
func StartDaftDNS ¶
StartDaftDNS starts and returns a really, really daft DNS server that only responds to type-A requests, and always with address dnsRespAddr. The DNS server will be stopped automatically by a t.Cleanup().
func WithAttachable ¶
func WithAttachable() func(*network.CreateOptions)
WithAttachable sets Attachable flag on the create network request
func WithDriver ¶
func WithDriver(driver string) func(*network.CreateOptions)
WithDriver sets the driver of the network
func WithIPAM ¶
func WithIPAM(subnet, gateway string) func(*network.CreateOptions)
WithIPAM adds an IPAM with the specified Subnet and Gateway to the network
func WithIPAMRange ¶
func WithIPAMRange(subnet, iprange, gateway string) func(*network.CreateOptions)
WithIPAM adds an IPAM with the specified Subnet, IPRange and Gateway to the network
func WithIPv4 ¶
func WithIPv4(enable bool) func(*network.CreateOptions)
WithIPv4 enables/disables IPv4 on the network
func WithIPvlan ¶
func WithIPvlan(parent, mode string) func(*network.CreateOptions)
WithIPvlan sets the network as ipvlan with the specified parent and mode
func WithInternal ¶
func WithInternal() func(*network.CreateOptions)
WithInternal enables Internal flag on the create network request
func WithMacvlan ¶
func WithMacvlan(parent string) func(*network.CreateOptions)
WithMacvlan sets the network as macvlan with the specified parent
func WithMacvlanPassthru ¶
func WithMacvlanPassthru(parent string) func(options *network.CreateOptions)
WithMacvlanPassthru sets the network as macvlan with the specified parent in passthru mode
func WithOption ¶
func WithOption(key, value string) func(*network.CreateOptions)
WithOption adds the specified key/value pair to network's options
Types ¶
This section is empty.