[jboss-jira] [JBoss JIRA] (WFCORE-2042) Improve query operation for nested resources

Lin Gao (JIRA) issues at jboss.org
Thu Nov 24 00:48:00 EST 2016


     [ https://issues.jboss.org/browse/WFCORE-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lin Gao updated WFCORE-2042:
----------------------------
    Description: 
This is another similar RFE as WFCORE-2041.

It would be good if the 'query()' operation can filter the resources by specifying value of attributes which are +inside of  nested child resources(not only by the first level of child resource)+, so that, for example, the following command can work well as expected:

{code:}
[standalone at localhost:9990 /] /subsystem=security:query(select=[security-domain], where={security-domain.authentication.login-modules.code=RealmDirect})
{
    "outcome" => "success",
    "result" => undefined
}
// here the expected output are the security-domain resources which have the loging-module RealmDirect defined.
{code}

The {{security-domain.authentication.login-modules.code}} in 'where' parameter is proposed attribute name in enhanced syntax, other options maybe possible.

The different requirements between this WFCORE-2042 and WFCORE-2041 are:
* WFCORE-2041 focus on complex attributes in one management resource
* WFCORE-2042 focus on nested management resources with or without complex attributes

  was:
The global {{query()}} operation works only for simple attributes like:

{code:java}
[standalone at localhost:9990 /] /subsystem=datasources/jdbc-driver=*:query(select=[driver-xa-datasource-class-name], where={driver-name=h2})
{
    "outcome" => "success",
    "result" => [{
        "address" => [
            ("subsystem" => "datasources"),
            ("jdbc-driver" => "h2")
        ],
        "outcome" => "success",
        "result" => {"driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource"}
    }]
}
{code}

It would be good if the 'query()' operation can filter the resources by specifying value of attributes which are +inside of the complex attribute+, so that, for example, the following commands can work well as expected:

{code:}
[standalone at localhost:9990 /] /core-service=capability-registry:query(select=[possible-capabilities],where={possible-capabilities.name=org.wildfly.data-source})
{code}

{code:}
[standalone at localhost:9990 /] /deployment=batch-chunk.war/subsystem=jaxrs/rest-resource=*:query(select=["rest-resource-paths"], where={"rest-resource-paths.resource-path"=>"batch/jobs"})
{code}

The {{rest-resource-paths.resource-path}} and {{possible-capabilities.name}} in 'where' parameter are proposed attribute names in enhanced syntax, other options maybe possible too.



> Improve query operation for nested resources
> --------------------------------------------
>
>                 Key: WFCORE-2042
>                 URL: https://issues.jboss.org/browse/WFCORE-2042
>             Project: WildFly Core
>          Issue Type: Feature Request
>          Components: Domain Management
>            Reporter: Lin Gao
>            Assignee: Brian Stansberry
>
> This is another similar RFE as WFCORE-2041.
> It would be good if the 'query()' operation can filter the resources by specifying value of attributes which are +inside of  nested child resources(not only by the first level of child resource)+, so that, for example, the following command can work well as expected:
> {code:}
> [standalone at localhost:9990 /] /subsystem=security:query(select=[security-domain], where={security-domain.authentication.login-modules.code=RealmDirect})
> {
>     "outcome" => "success",
>     "result" => undefined
> }
> // here the expected output are the security-domain resources which have the loging-module RealmDirect defined.
> {code}
> The {{security-domain.authentication.login-modules.code}} in 'where' parameter is proposed attribute name in enhanced syntax, other options maybe possible.
> The different requirements between this WFCORE-2042 and WFCORE-2041 are:
> * WFCORE-2041 focus on complex attributes in one management resource
> * WFCORE-2042 focus on nested management resources with or without complex attributes



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list