Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-2005

Collect data from script stdout output

      Goal: 

      Acceptance Criteria:

      A list of verification conditions, successful functional tests, or expected outcomes in order to declare this story/task successfully completed.

      • Capture the stdout output from the bash script and wrap it around a struct to dump its content as a JSON before submitting this over to RHC.
      • Both the script and the worker have some responsibility to format this data correctly.

      Notes:

      The script's responsibility, the script will output to its stdout:

      • Anything that should be logged in the Tasks App
      • A begin marker (Talk to Dank when you have decided what this will be)
      • a json dictionary with the following fields:
        • Alert
          • will be True if convert2thel had exit code != 0, otherwise False 
        • Summary
          • Short message like: "convert2rhel did not detect issues", "convert2rhel detected 5 issues"
        • Report
          • Empty
        • Report_json 
          • The json output from convert2rhel
      • An end marker (Talk to Dank when you have decided what this will be)
      • Anything else that should be logged in the Task app

      The Worker's responsibility is to return data formatted like this:

      • Worker will create a dictionary with two fields: 
        • stdout
          • holds stdout from the script
        • correlaction_id
          • The correlation_id from the request (metadata)
      • Turn the dictionary into a json string
      • send the string to rhcd to deliver to ingress

              awaltlov@redhat.com Andrea Waltlova
              rolivier@redhat.com Rodolfo Olivieri
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: