Migrate to non-deprecated functions of api/types/filters

- Use `Contains` instead of `Include`
- Use `ToJSON` instead of `ToParam`
- Remove usage of `ParseFlag` as it is deprecated too

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2018-07-27 15:37:43 +02:00
parent a3464c0a20
commit 55edeb497a
4 changed files with 18 additions and 8 deletions

View File

@ -140,7 +140,7 @@ loop:
}
func updateNodeFilter(ctx context.Context, client client.APIClient, filter filters.Args) error {
if filter.Include("node") {
if filter.Contains("node") {
nodeFilters := filter.Get("node")
for _, nodeFilter := range nodeFilters {
nodeReference, err := node.Reference(ctx, client, nodeFilter)