Add support for UpToDate filter, for internal use
@@ -53,6 +53,10 @@ func newListTasksFilters(filter filters.Args, transformFunc func(filters.Args) e
"service": true,
"node": true,
"desired-state": true,
+ // UpToDate is not meant to be exposed to users. It's for
+ // internal use in checking create/update progress. Therefore,
+ // we prefix it with a '_'.
+ "_up-to-date": true,
}
if err := filter.Validate(accepted); err != nil {
return nil, err
@@ -68,6 +72,7 @@ func newListTasksFilters(filter filters.Args, transformFunc func(filters.Args) e
Labels: runconfigopts.ConvertKVStringsToMap(filter.Get("label")),
ServiceIDs: filter.Get("service"),
NodeIDs: filter.Get("node"),
+ UpToDate: len(filter.Get("_up-to-date")) != 0,
}
for _, s := range filter.Get("desired-state") {
