wildfly / wildfly-plugin-tools

A group of tools for interacting/managing with a WildFly container
Apache License 2.0
0 stars 2 forks source link

Add executeOperation helper methods to the `ServerManager` #33

Closed jamezp closed 3 months ago

jamezp commented 3 months ago

Some simple helper methods should be added to the ServerManager to support execution operations. A failed operation should throw the OperationFailedException while a successful operations should return the result. This means from a result response of:

{
    "outcome" => "success",
    "result" => {
        "launch-type" => "STANDALONE",
        "management-major-version" => 25,
        "management-micro-version" => 0,
        "management-minor-version" => 0,
        "name" => "stalefish",
        "namespaces" => [],
        "organization" => undefined,
        "process-type" => "Server",
        "product-name" => "WildFly Full",
        "product-version" => "32.0.0.Final",
        "profile-name" => undefined,
        "release-codename" => "",
        "release-version" => "24.0.0.Final",
        "running-mode" => "NORMAL",
        "runtime-configuration-state" => "ok",
        "schema-locations" => [],
        "server-state" => "running",
        "suspend-state" => "RUNNING",
        "uuid" => "330c9aaa-cea5-4759-b599-cac672f9668c"
    }
}

Only the value of "result" should be returned.

{
    "launch-type" => "STANDALONE",
    "management-major-version" => 25,
    "management-micro-version" => 0,
    "management-minor-version" => 0,
    "name" => "stalefish",
    "namespaces" => [],
    "organization" => undefined,
    "process-type" => "Server",
    "product-name" => "WildFly Full",
    "product-version" => "32.0.0.Final",
    "profile-name" => undefined,
    "release-codename" => "",
    "release-version" => "24.0.0.Final",
    "running-mode" => "NORMAL",
    "runtime-configuration-state" => "ok",
    "schema-locations" => [],
    "server-state" => "running",
    "suspend-state" => "RUNNING",
    "uuid" => "330c9aaa-cea5-4759-b599-cac672f9668c"
}