Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
| ... | ... |
@@ -11,7 +11,7 @@ import ( |
| 11 | 11 |
) |
| 12 | 12 |
|
| 13 | 13 |
// Register registers all the builtin drivers (ie. default, windowsipam, null |
| 14 |
-// and remote). If 'pg' is nil, the remote driver won't be registered. |
|
| 14 |
+// and remote). 'pg' is nil here in case of non-managed plugins which Windows is using. |
|
| 15 | 15 |
func Register(r ipamapi.Registerer, pg plugingetter.PluginGetter, lAddrPools, gAddrPools []*ipamutils.NetworkToSplit) error {
|
| 16 | 16 |
if err := defaultipam.Register(r, lAddrPools, gAddrPools); err != nil {
|
| 17 | 17 |
return err |
| ... | ... |
@@ -22,10 +22,8 @@ func Register(r ipamapi.Registerer, pg plugingetter.PluginGetter, lAddrPools, gA |
| 22 | 22 |
if err := null.Register(r); err != nil {
|
| 23 | 23 |
return err |
| 24 | 24 |
} |
| 25 |
- if pg != nil {
|
|
| 26 |
- if err := remoteIpam.Register(r, pg); err != nil {
|
|
| 27 |
- return err |
|
| 28 |
- } |
|
| 25 |
+ if err := remoteIpam.Register(r, pg); err != nil {
|
|
| 26 |
+ return err |
|
| 29 | 27 |
} |
| 30 | 28 |
return nil |
| 31 | 29 |
} |