Skip to content

Commit

Permalink
not filter networks when driver is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Oct 17, 2017
1 parent 40998aa commit 57e4e74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion network/sdn/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ func (t *titanium) ListNetworks(ctx context.Context, driver string) ([]*types.Ne
}

filters := enginefilters.NewArgs()
filters.Add("driver", driver)
if driver != "" {
filters.Add("driver", driver)
}
ns, err := engine.NetworkList(context.Background(), enginetypes.NetworkListOptions{Filters: filters})
if err != nil {
return networks, err
Expand Down

0 comments on commit 57e4e74

Please sign in to comment.