You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- So that a DHCP based plugin can express it needs
the endpoint MAC address when requested for an IP address.
- In such case libnetwork will allocate one if not already
provided by user
Signed-off-by: Alessandro Boch <aboch@docker.com>
Copy file name to clipboardExpand all lines: libnetwork/docs/ipam.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Communication protocol is the same as the remote network driver.
15
15
16
16
## Handshake
17
17
18
-
During driver registration, libnetwork will query the remote driver about the default local and global address spaces strings.
18
+
During driver registration, libnetwork will query the remote driver about the default local and global address spaces strings, and about the driver capabilities.
19
19
More detailed information can be found in the respective section in this document.
20
20
21
21
## Datastore Requirements
@@ -249,3 +249,27 @@ Where:
249
249
*`PoolID` is the pool identifier
250
250
*`Address` is the IP address to release
251
251
252
+
253
+
254
+
### GetCapabilities
255
+
256
+
During the driver registration, libnetwork will query the driver about its capabilities. It is not mandatory for the driver to support this URL endpoint. If driver does not support it, registration will succeed with empty capabilities automatically added to the internal driver handle.
257
+
258
+
During registration, the remote driver will receive a POST message to the URL `/IpamDriver.GetCapabilities` with no payload. The driver's response should have the form:
259
+
260
+
261
+
{
262
+
"RequiresMACAddress": bool
263
+
}
264
+
265
+
266
+
267
+
## Capabilities
268
+
269
+
Capabilities are requirements, features the remote ipam driver can express during registration with libnetwork.
270
+
As of now libnetwork accepts the following capabilities:
271
+
272
+
### RequiresMACAddress
273
+
274
+
It is a boolean value which tells libnetwork whether the ipam driver needs to know the interface MAC address in order to properly process the `RequestAddress()` call.
275
+
If true, on `CreateEndpoint()` request, libnetwork will generate a random MAC address for the endpoint (if an explicit MAC address was not already provided by the user) and pass it to `RequestAddress()` when requesting the IP address inside the options map. The key will be the `netlabel.MacAddress` constant: `"com.docker.network.endpoint.macaddress"`.
0 commit comments