[jboss-jira] [JBoss JIRA] (WFCORE-4896) Support iteration over filtered cli query

Georg Tsakumagos (Jira) issues at jboss.org
Tue Mar 31 05:44:54 EDT 2020


Georg Tsakumagos created WFCORE-4896:
----------------------------------------

             Summary: Support iteration over filtered cli query
                 Key: WFCORE-4896
                 URL: https://issues.redhat.com/browse/WFCORE-4896
             Project: WildFly Core
          Issue Type: Enhancement
          Components: CLI, Management
            Reporter: Georg Tsakumagos
            Assignee: Jean Francois Denise


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 foll inside the loop. I like to update all profiles containing elytron subsystem and to spare out all inherited profiles which include the base profiles. 

{code:java|title=CLI query example}
for profile in /profile=*:query(select=[name], where=[includes=undefined])
  echo $profile
done
{code}

{code:JSON|title=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"}}
{code}

{code:java|title=desired result}
default
full
full-ha
gfi
ha
load-balancer
{code}

Maybe it would be a solution to extend the operation extend read-children-names by an property where to apply a filter.

{code:JSON|title=extend read-children-names}
for profile in /:read-children-names(child-type=profile,where=[includes=undefined])
echo $profile
done
{code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list