Project

General

Profile

Actions

Bug #30908

open

Content View Filter Rule controller does not support the same parameters for CREATE and UPDATE

Added by Evgeni Golov about 4 years ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Content Views
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Ohai,

looking at app/controllers/katello/api/v2/content_view_filter_rules_controller.rb, I see the following difference between POST /content_view_filters/:content_view_filter_id/rules and PUT /content_view_filters/:content_view_filter_id/rules/:id

@@ -75,15 +75,19 @@ module Katello
         N_("Update a filter rule. The parameters included should be based upon the filter type.")
     param :content_view_filter_id, :number, :desc => N_("filter identifier"), :required => true
     param :id, :number, :desc => N_("rule identifier"), :required => true
-    param :name, String, :desc => N_("package, package group, or docker tag: name")
+    param :name, Array, of: [String], :desc => N_("package, package group, or docker tag names")
+    param :uuid, String, :desc => N_("package group: uuid")
     param :version, String, :desc => N_("package: version")
     param :architecture, String, :desc => N_("package: architecture")
     param :min_version, String, :desc => N_("package: minimum version")
     param :max_version, String, :desc => N_("package: maximum version")
     param :errata_id, String, :desc => N_("erratum: id")
+    param :errata_ids, Array, :desc => N_("erratum: IDs or a select all object")
     param :start_date, String, :desc => N_("erratum: start date (YYYY-MM-DD)")
     param :end_date, String, :desc => N_("erratum: end date (YYYY-MM-DD)")
     param :types, Array, :desc => N_("erratum: types (enhancement, bugfix, security)")
+    param :date_type, String, :desc => N_("erratum: search using the 'Issued On' or 'Updated On' column of the errata. Values are 'issued'/'updated'")
+    param :module_stream_ids, Array, :desc => N_("module stream ids")
     def update
       update_params = rule_params
       update_params[:name] = update_params[:name].first if update_params[:name]

The diff is from todays master (3.18.0), but similar differences can be found in older releases (e.g. 3.12, which I accidentally happen to have at hand).

The discrepancy breaks API clients like foreman-ansible-modules which take the APIdoc as the source of truth what the server accepts.

I have no idea what implications the Array[String] vs String for name have, btw…


Related issues 1 (1 open0 closed)

Related to Foreman - Tracker #27680: API bugs that need workarounds in foreman-ansible-modulesNew

Actions
Actions #1

Updated by Evgeni Golov about 4 years ago

  • Category changed from Backup & Restore to API
Actions #2

Updated by Evgeni Golov about 4 years ago

  • Related to Tracker #27680: API bugs that need workarounds in foreman-ansible-modules added
Actions #3

Updated by John Mitsch about 4 years ago

  • Status changed from New to Need more information

Thanks Evgeni,

Was this a breakage or has this behavior been present for a while?

Actions #4

Updated by Evgeni Golov about 4 years ago

  • Status changed from Need more information to New

as far as I've seen, the level of difference differs (lol), but it's been out of sync for a while now.

Actions #5

Updated by Evgeni Golov about 4 years ago

at least back to 3.15, didn't look further

Actions #6

Updated by Jonathon Turel about 4 years ago

  • Category changed from API to Content Views
  • Target version set to Katello Backlog
  • Triaged changed from No to Yes
Actions #7

Updated by Ian Ballou 2 months ago

  • Target version deleted (Katello Backlog)
Actions

Also available in: Atom PDF