Uploaded image for project: 'Red Hat Insights Engineering'
  1. Red Hat Insights Engineering
  2. RHINENG-7969

Not able to filter hosts based on operating_system version using system_profile filter from API

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Normal
    • None
    • None
    • Inventory
    • Low
    • False
    • False
    • Hide

      None

      Show
      None

    Description

      ** Note that this is a public ticket, please refrain from adding any sensitive data. **

      Description of Problem

      Trying to retrieve all hosts in the inventory with a filter on the operating_system value located in system_profile. For some reason, the filter does not work when specifying operating_system with version.

      I'm using the following filter:

      {"system_profile": {"operating_system": {"major": "8"}}}

      It gives the following error:

       

      {
        "detail": "Incomplete path provided: {'major': '8'} ",
        "status": 400,
        "title": "Validation Error",
        "type": "about:blank"
      }

       

      How reproducible

      Always

      Steps to Reproduce

      1. Go to https://console.redhat.com/docs/api/inventory/v1#operations-hosts-api\.host\.get_host_list
      2. In the filter object, use following:
      {"system_profile": {"operating_system": {"major": "8"}}}
      or
      {"system_profile": {"operating_system": {"major": 8, "minor": 8, "name": "RHEL"}}}

      Actual Behavior

      It is giving error "Incomplete path provided".

      Expected Behavior

      It should filter the hosts depending on the operating system version.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-ngupta Nikhil Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: