0 Replies Latest reply on Sep 12, 2014 1:52 PM by Steve Cohen

    Is there a way to have the commands echoed in non-interactive CLI?

    Steve Cohen Newbie

      Given a simple set of command line commands, say

       

      #add driver

      /profile=full-ha/subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-datasource-class-name=oracle/jdbc/pool/OracleDataSource.class)

       

      #add datasource using driver

      data-source --profile=full-ha add --name=myds --jndi-name=java:/myds --driver-name=oracle --connection-url=jdbc:oracle:thin:@thdracdev:1521/mydb

       

       

      ########modify data source

      cd profile=full-ha/subsystem=datasources/data-source=myds

      :write-attribute(name=user-name,value=me)

      :write-attribute(name=password,value=mypw)

      :write-attribute(name=max-pool-size,value=5)

      :write-attribute(name=check-valid-connection-sql,value="select sysdate from dual")

       

      #enable it

      :enable

       

      It is simple to put these into a file and execute it by specifying --file= on the command line.

      However, if I then execute that file, I see:

       

      $ ./jboss-cli.sh -c  --file=/home/wevs/cliscripts/init-datasources.cli

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

      {

          "outcome" => "success",

          "result" => undefined,

          "server-groups" => undefined

      }

       

      While comforting in some sense to see that everything worked, I would like the option of having the each commands echoed to the output before the result output so that I could see which commands succeeded or failed.  This would be useful in developing scripts.  Some sort of "verbose mode".  Has anything like that ever been considered or proposed?