forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateNetworkCmd.java
More file actions
78 lines (56 loc) · 1.95 KB
/
Copy pathCreateNetworkCmd.java
File metadata and controls
78 lines (56 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.github.dockerjava.api.command;
import com.github.dockerjava.api.model.Network;
import com.github.dockerjava.api.model.Network.Ipam;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import java.util.Map;
/**
* Create a network.
*
* @since {@link RemoteApiVersion#VERSION_1_21}
*/
public interface CreateNetworkCmd extends SyncDockerCmd<CreateNetworkResponse> {
@CheckForNull
String getName();
@CheckForNull
String getDriver();
@CheckForNull
Network.Ipam getIpam();
@CheckForNull
Map<String, String> getOptions();
@CheckForNull
Boolean getCheckDuplicate();
@CheckForNull
Boolean getInternal();
@CheckForNull
Boolean getEnableIPv6();
@CheckForNull
Boolean getAttachable();
@CheckForNull
Map<String, String> getLabels();
/** The new network's name. Required. */
CreateNetworkCmd withName(@Nonnull String name);
/** Name of the network driver to use. Defaults to <code>bridge</code>. */
CreateNetworkCmd withDriver(String driver);
/** Ipam config, such as subnet, gateway and ip range of the network */
CreateNetworkCmd withIpam(Ipam ipam);
/** Driver specific options */
CreateNetworkCmd withOptions(Map<String, String> options);
CreateNetworkCmd withCheckDuplicate(boolean checkForDuplicate);
CreateNetworkCmd withInternal(boolean internal);
CreateNetworkCmd withEnableIpv6(boolean enableIpv6);
/**
* If enabled, and the network is in the global scope, non-service containers on worker nodes will be able to connect to the network.
*
* @since {@link RemoteApiVersion#VERSION_1_21}
*/
CreateNetworkCmd withAttachable(Boolean attachable);
/**
* Add label for network
*
* @since {@link RemoteApiVersion#VERSION_1_24}
*/
CreateNetworkCmd withLabels(Map<String, String> labels);
interface Exec extends DockerCmdSyncExec<CreateNetworkCmd, CreateNetworkResponse> {
}
}