Details
-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
It would be usefull to iterate over filtered queries in cli. I need to spare the only alowed level of if expression for the control flow inside the loop. I like to update all profiles containing elytron subsystem and to spare out all inherited profiles which include the base profiles.
CLI query example
for profile in /profile=*:query(select=[name], where=[includes=undefined])
echo $profile
done
actual result
{"address" => [("profile" => "default")],"outcome" => "success","result" => {"name" => "default"}} {"address" => [("profile" => "ha")],"outcome" => "success","result" => {"name" => "ha"}} {"address" => [("profile" => "full")],"outcome" => "success","result" => {"name" => "full"}} {"address" => [("profile" => "full-ha")],"outcome" => "success","result" => {"name" => "full-ha"}} {"address" => [("profile" => "load-balancer")],"outcome" => "success","result" => {"name" => "load-balancer"}}
desired result
default
full
full-ha
gfi
ha
load-balancer
Maybe it would be a solution to extend the operation extend read-children-names by an property where to apply a filter.
extend read-children-names
for profile in /:read-children-names(child-type=profile,where=[includes=undefined]) echo $profile done