Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-7135

[DOC RFE] CLI support for response attachments

XMLWordPrintable

      (Background note: this requirement came out of the analysis of EAP7-516 as we considered that there is no valid 516 feature without client support in at least one of HAL or the CLI. HAL support for 516 may not be possible for 7.1, so we want CLI support and this feature seems quite feasible, with a POC already done. It's also a missing thing for the CLI as currently the CLI cannot display or download the log files that the server exposes. We are filing this as a separate requirement from 516 because it's a general purpose feature and will be documented in community as such.)

      CLI doesn't support the streams attached to a response. Incremental deployment support offers today the ability to read the content of a deployment. It would be interesting to operate it from the CLI. Some resource (such as the log file) expose some attributes as stream.

      The following operations are returning streams:
      /subsystem=logging/log-file=server.log:read-attribute(name=stream)
      /subsystem=logging/log-file=server.log:read-resource(include-runtime)
      /deployment=toto:read-content(path=index.html)

      As we can see, streams can be located in attributes, as operation response, inside a resource.

      The CLI offers 2 way to approach the problem:

      1) Extend the Low level operation support with a way to save/display attached streams. This would require some XML configuration and possibly UI workflow to prompt user for the right action. Making from stream to file path would be not ideal and far from being user friendly. The good side is tha tit would work in any case (batch, non batch). The XML configuration can be a bit complex and prompting user is not an ideal workflow.

      2) Define a new high level command that would cope with any operation.
      Such command would look like:
      attachment save --operation=/subsystem=logging/log-file=server.log:read-attribute(name=stream) --file=/my/local/path/to/file
      attachment display --operation=/subsystem=logging/log-file=server.log:read-attribute(name=stream)

      • No risk to impact existing scripts. This is a new feature, so people would have to update their scripts to add the command.
      • The challenge is located in mapping a Stream to a file name. The user provides the name he wants. Furthermore, in interactive mode, the user can use completion to complete this target file.
      • No more prompting, the user knows ahead of time what he wants to do.
      • Problem is that batch mode doesn't re-dispatch each step response to each input command. So some logic should be needed to properly handle streams in batch.

              rhn-support-ahoffer Andrea Hoffer
              rhn-engineering-jpallich Jiri Pallich
              Marek Kopecky Marek Kopecky
              Marek Kopecky Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: