2 Replies Latest reply on Dec 1, 2016 3:39 AM by Bernd Koecke

    Is it planned to extend WildFly CLI client commands?

    Bernd Koecke Novice

      Hello,

       

      I tried to use the CLI of WildFly 10.1. to migrate a configuration from an earlier version to 10.1. and found some limitations:

       

      It isn't possible to nest if-statements

      if (outcome == "success") of /subsystem=name1/...
        if (outcome == "success") of /subsystem=name2/
        end-if
      else
      ...
      end-if
      

       

      I can't use a variable in a condition:

      set name1="true"
      if (outcome == "success" && name1 == "true") of ...
      

       

      And I always have to access the server model, I can't do an if-statement only with a condition against local variables. If I try this, I get an error message that the "of" is missing.

       

      Maybe I doesn't use it the right way, but if it's not my fault, are there any plans to extend the client side CLI language?

       

      The reason why I ask is, that I think about some kind of script to change one configuration to another. The normal workflow is to check if an extension and subsystem is present and if not to add it. Regarding the version of th extension I have to use a different way to add the corresponding subsystem. To do this easily nested if-statements, extended local variables and maybe a loop statement would be nice. Currently I have two solutions for this:

      1. Extending the client side CLI with new commands
      2. Using JavaScript together with Nashorn to build a small library for accessing a WildFly instance and use JS for control statements and CLI to configure the server

      I tend to go the second way, because I don't like to define a new language for control statements for client side CLI. But if you say that you are planning to extend the CLI commands in future I would be happy to help in implementing and testing it.

       

      Regards

      Bernd