Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-6735

CLI commands which needs a server-connection should not be availalbe if disconnected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • RHDG 8.4.x CD
    • RHDG 8.4.5 GA
    • CLI
    • None

    Description

      CLI commands like "user roles ...." which require a connection are partially shown with tab-completion.
      But the command fail with error if it is in state disconnected.

      Current behavior:
      [disconnected]> user -> <tab>
      create describe encrypt-all groups ls password remove
      [disconnected]> user roles -> <tab>
      create deny grant ls remove
      [disconnected]> user roles ls
      Cannot invoke "org.infinispan.cli.connection.Connection.execute(java.util.function.BiFunction, org.infinispan.cli.connection.Connection$ResponseMode)" because the return value of "org.infinispan.cli.Context.getConnection()" is null

      Expected behavior:
      <tab> should not show further options for commands which are not available.
      If the command is typed it should end in a message like shown below for the backup command
      [disconnected]> backup
      The command is not available in the current context.

      Attachments

        Issue Links

          Activity

            People

              ttarrant@redhat.com Tristan Tarrant
              rhn-support-wfink Wolf Fink
              Anna Manukyan Anna Manukyan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: