Project

General

Profile

Bug #25380

DRY up applicability methods in content facet

Added by Partha Aji almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Look at the applicability related methods https://github.com/Katello/katello/blob/master/app/models/katello/host/content_facet.rb
  • insert_rpm_applicability
  • remove_rpm_applicability
  • applicable_rpm_differences
  • import_rpm_applicability

These are identical to

  • insert_errata_applicability
  • remove_errata_applicability
  • applicable_errata_differences
  • import_errata_applicability
And soon we'll have
  • insert_module_stream_applicability
  • remove_module_stream_applicability
  • applicable_module_stream_differences
  • import_module_stream_applicability

We would need to DRY this up

Associated revisions

Revision f3d62346 (diff)
Added by Partha Aji almost 2 years ago

Fixes #25380 - DRY up applicability code (#7810)

This commit attempts to dry up applicability related code in the content
facet object. Main idea here is to delegate the applicability import
related code to the ApplicableContentImporter service class. This code
will become particularly handy when modules come into play cutting a lot
of duplicate logic.

History

#1 Updated by The Foreman Bot almost 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7810 added

#2 Updated by Anonymous almost 2 years ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Justin Sherrill almost 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.10.0

Also available in: Atom PDF