diff --git a/docs/remote.md b/docs/remote.md index cfd2023..d56eccb 100644 --- a/docs/remote.md +++ b/docs/remote.md @@ -17,7 +17,7 @@ This design ensures that the details of driver registration mechanism are owned 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. -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". +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". ## Usage @@ -65,12 +65,42 @@ When the proxy is asked to create a network, the remote process shall receive a { "NetworkID": string, + "IPv4Data" : [ + { + "AddressSpace": string, + "Pool": ipv4-cidr-string, + "Gateway" : ipv4-address" + "AuxAddresses": { + "" : "", + "" : "", + ... + } + }, + ], + "IPv6Data" : [ + { + "AddressSpace": string, + "Pool": ipv6-cidr-string, + "Gateway" : ipv6-address" + "AuxAddresses": { + "" : "", + "" : "", + ... + } + }, + ], "Options": { ... } } -The `NetworkID` value is generated by LibNetwork. The `Options` value is the arbitrary map given to the proxy by LibNetwork. +* `NetworkID` value is generated by LibNetwork which represents an unique network. +* `Options` value is the arbitrary map given to the proxy by LibNetwork. +* `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, +* `AddressSpace` : A unique string represents an isolated space for IP Addressing +* `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. +* `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. +* `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. The response indicating success is empty: