Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-22776

Implement the ability to pass "options" to an availability check request

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
      • Check that the information added is in the kafka message
      • Test in ephemeral (might not be possible) - might need to be tested in stage 
      • Make sure that it works as before too (no body) 
    • Unset
    • No

      A customer would like to know whether or not an availability check was initiated by the user or not - so I was thinking instead of supporting a one-off flag that we could extend availability checking a bit more while retaining the current behavior. 

      Note from github comment:

      Since the route is POST /sources/:id/check_availability, but we don't currently specify a body, but I think we could add a body that has various options (like user_initiated) which we would just pass along in the HTTP body and Kafka. This way if we did want to add another flag we'd just update the body struct to accept the flag.

      We'd then update the UI to pass that body with the option, and the checker jobs would just stay the way they are (no extra options passed).

      On your end you would just check the body for the options map with the user_initiated flag and key off of that.

      To sum up:

      1. Check for body on /sources/:id/check_availability (no body is ok still)
      2. Parse body if present (to struct, so we can control what options are available)
      3. Pass along through availability check request (http + kafka)

      Maybe something like:

      { "source_id": 42, "options": { "user_initiated": true}}

      (wow jira can't handle preformatted json well)

              rh-ee-gduval Guillaume Duval
              jlindgre@redhat.com Jacob Lindgren
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: