Version 1

    Each management resource has an operation named 'query()' to filter resources according to the condition passed by 'selector' and 'where' parameters, however it does not work for complex attributes like: core-service.capability-registry.capabilities, jaxrs.rest-resource-paths, etc.

     

    Proposed improvements:

    • Provides the possibility to query resources by specifying value of nested resources
    [standalone@localhost:9990 /] /subsystem=security/security-domain=other:query(select=[authentication], where={authentication.login-modules.code=RealmDirect})
    {
        "outcome" => "success",
        "result" => .... // omitted result
    }
    
    • Provides the possibility to select matched resources only for complex attributes if the matched resources are LIST, like: core-service.capability-registry.capabilities:

    So that the following command lists the possible-capabilities with name equal to org.wildfly.data-source instead of listing all:

    /core-service=capability-registry:query(select=[possible-capabilities],where={possible-capabilities.name=org.wildfly.data-source})
    {
        .... // other headers are omitted
        "name" => "org.wildfly.data-source",
        "dynamic" => true,
        "registration-points" => [
            "/subsystem=datasources/data-source=*",
            "/subsystem=datasources/xa-data-source=*"
        ]
    }
    
    • The improved output must follow same format as before so that it won't break anything.

     

    Linked Jiras: