Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no script available that converts jboss-cli output to json block #21

Open
rbrackma opened this issue Sep 30, 2014 · 0 comments
Open

no script available that converts jboss-cli output to json block #21

rbrackma opened this issue Sep 30, 2014 · 0 comments

Comments

@rbrackma
Copy link

to start easily with jcliff you need to add a shell function that lets you :
convert_jboss-cli_to_json.sh "localhost:9999" "/subsystem=infinispan/cache-container=web:read-resource(recursive=true)"
which returns the JSON block that can be read by JCliff !

Example :

this is the starting point

/subsystem=infinispan/cache-container=web:read-resource(recursive=true)

the whole JSON part of the jboss-cli (the return value has to be taken out)

{
"outcome" => "success",
"result" => {
"aliases" => ["standard-session-cache"],
"default-cache" => "local-web",
"eviction-executor" => undefined,
"jndi-name" => undefined,
"listener-executor" => undefined,
"module" => "org.jboss.as.clustering.web.infinispan",
"replication-queue-executor" => undefined,
"start" => undefined,
"statistics-enabled" => undefined,
"distributed-cache" => undefined,
"invalidation-cache" => undefined,
"local-cache" => {"local-web" => {
"batching" => true,
"indexing" => undefined,
"indexing-properties" => undefined,
"jndi-name" => undefined,
"module" => undefined,
"start" => undefined,
"statistics-enabled" => undefined,
"binary-keyed-jdbc-store" => undefined,
"eviction" => undefined,
"expiration" => undefined,
"file-store" => {"FILE_STORE" => {
"fetch-state" => true,
"passivation" => false,
"path" => undefined,
"preload" => false,
"purge" => false,
"relative-to" => "jboss.server.data.dir",
"shared" => false,
"singleton" => false,
"property" => undefined,
"write-behind" => undefined
}},
"locking" => undefined,
"mixed-keyed-jdbc-store" => undefined,
"remote-store" => undefined,
"store" => undefined,
"string-keyed-jdbc-store" => undefined,
"transaction" => undefined
}},
"replicated-cache" => undefined,
"transport" => undefined
},
"response-headers" => {"process-state" => "reload-required"}
}

adding 3 json hierarchies in front of result : infinispan cache-container web

the expected result !!!

{
"infinispan" => {
"cache-container" => {
"web" => {

    "aliases" => ["standard-session-cache"],
    "default-cache" => "local-web",
    "eviction-executor" => undefined,
    "jndi-name" => undefined,
    "listener-executor" => undefined,
    "module" => "org.jboss.as.clustering.web.infinispan",
    "replication-queue-executor" => undefined,
    "start" => undefined,
    "statistics-enabled" => undefined,
    "distributed-cache" => undefined,
    "invalidation-cache" => undefined,
    "local-cache" => {"local-web" => {
        "batching" => true,
        "indexing" => undefined,
        "indexing-properties" => undefined,
        "jndi-name" => undefined,
        "module" => undefined,
        "start" => undefined,
        "statistics-enabled" => undefined,
        "binary-keyed-jdbc-store" => undefined,
        "eviction" => undefined,
        "expiration" => undefined,
        "file-store" => {"FILE_STORE" => {
            "fetch-state" => true,
            "passivation" => false,
            "path" => undefined,
            "preload" => false,
            "purge" => false,
            "relative-to" => "jboss.server.data.dir",
            "shared" => false,
            "singleton" => false,
            "property" => undefined,
            "write-behind" => undefined
        }},
        "locking" => undefined,
        "mixed-keyed-jdbc-store" => undefined,
        "remote-store" => undefined,
        "store" => undefined,
        "string-keyed-jdbc-store" => undefined,
        "transaction" => undefined
    }},
    "replicated-cache" => undefined,
    "transport" => undefined





       }
   }

}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants