Browse code

Updating the network driver document with IPAM data

Signed-off-by: Madhu Venugopal <madhu@docker.com>

Madhu Venugopal authored on 2015/10/04 08:36:06
Showing 1 changed files
... ...
@@ -17,7 +17,7 @@ This design ensures that the details of driver registration mechanism are owned
17 17
 
18 18
 The remote driver implementation uses a `plugins.Client` to communicate with the remote driver process. The `driverapi.Driver` methods are implemented as RPCs over the plugin client.
19 19
 
20
-The payloads of these RPCs are mostly direct translations into JSON of the arguments given to the method. There are some exceptions to account for the use of the interfaces `EndpointInfo` and `JoinInfo`, and data types that do not serialise to JSON well (e.g., `net.IPNet`). The protocol is detailed below under "Protocol".
20
+The payloads of these RPCs are mostly direct translations into JSON of the arguments given to the method. There are some exceptions to account for the use of the interfaces `InterfaceInfo` and `JoinInfo`, and data types that do not serialise to JSON well (e.g., `net.IPNet`). The protocol is detailed below under "Protocol".
21 21
 
22 22
 ## Usage
23 23
 
... ...
@@ -65,12 +65,42 @@ When the proxy is asked to create a network, the remote process shall receive a
65 65
 
66 66
     {
67 67
 		"NetworkID": string,
68
+		"IPv4Data" : [
69
+		{
70
+			"AddressSpace": string,
71
+			"Pool": ipv4-cidr-string,
72
+			"Gateway" : ipv4-address"
73
+			"AuxAddresses": {
74
+				"<identifier1>" : "<ipv4-address1>",
75
+				"<identifier2>" : "<ipv4-address2>",
76
+				...
77
+			}
78
+		},
79
+		],
80
+		"IPv6Data" : [
81
+		{
82
+			"AddressSpace": string,
83
+			"Pool": ipv6-cidr-string,
84
+			"Gateway" : ipv6-address"
85
+			"AuxAddresses": {
86
+				"<identifier1>" : "<ipv6-address1>",
87
+				"<identifier2>" : "<ipv6-address2>",
88
+				...
89
+			}
90
+		},
91
+		],
68 92
 		"Options": {
69 93
 			...
70 94
 		}
71 95
     }
72 96
 
73
-The `NetworkID` value is generated by LibNetwork. The `Options` value is the arbitrary map given to the proxy by LibNetwork.
97
+* `NetworkID` value is generated by LibNetwork which represents an unique network. 
98
+* `Options` value is the arbitrary map given to the proxy by LibNetwork. 
99
+* `IPv4Data` and `IPv6Data` are the ip-addressing data configured by the user and managed by IPAM driver. The network driver is expected to honor the ip-addressing data supplied by IPAM driver. The data include,
100
+* `AddressSpace` : A unique string represents an isolated space for IP Addressing 
101
+* `Pool` : A range of IP Addresses represted in CIDR format address/mask. Since, the IPAM driver is responsible for allocating container ip-addresses, the network driver can make use of this information for the network plumbing purposes.
102
+* `Gateway` : Optionally, the IPAM driver may provide a Gateway for the subnet represented by the Pool. the network driver can make use of this information for the network plumbing purposes.
103
+* `AuxAddresses` : A list of pre-allocated ip-addresses with an associated identifier as provided by the user to assist network driver if it requires specific ip-addresses for its operation.
74 104
 
75 105
 The response indicating success is empty:
76 106