Skip to content

Replace the subclasses of CCE pools with map strcuture and class factory - #15239

Merged
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
teacup-on-rockingchair:cce_fix_rules_use_simplify_new_platform
Oct 26, 2026
Merged

Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
teacup-on-rockingchair:cce_fix_rules_use_simplify_new_platform

Conversation

@teacup-on-rockingchair

Copy link
Copy Markdown
Contributor

Description:

  • Improve ability to extend the support of cce tool with new platforms

Rationale:

When adding new platform with CCEs pool file, instead of adding class definition, rework the implementation to:

  • Generate CCE pool classes from a static table

  • Replace the hand-written RedhatCCEFile, SLE12CCEFile, SLE15CCEFile and SLE16CCEFile subclasses with a factory driven by CCE_POOL_FILES

  • Each row maps a --cce-pool name to the generated class name and its available-CCE file in shared/references, so supporting a new product is a one-line change instead of a new class.

  • Add the slmicro6 pool backed by cce-slmicro6-avail.txt, which makes utils/fix_rules.py add-cce --cce-pool slmicro6 usable.

Review Hints:

  • The generated classes keep their previous names and are still exported from ssg.cce, so existing imports and CCE_POOLS lookups should be unchanged.

@teacup-on-rockingchair teacup-on-rockingchair added this to the 0.1.83 milestone Oct 23, 2026
@teacup-on-rockingchair teacup-on-rockingchair added usability Enhancements related to usability. refactoring Improvement which, once completed, will enable the project to progress faster. python Pull requests that update python code labels Oct 23, 2026
@Mab879 Mab879 self-assigned this Oct 23, 2026
@Mab879

Mab879 commented Oct 23, 2026

Copy link
Copy Markdown
Member

Seems this needs a rebase.

…factory

When adding new platform with CCEs pool file, instead of adding class definition,
rework the implementation to:
- Generate CCE pool classes from a static table
- Replace the hand-written RedhatCCEFile, SLE12CCEFile, SLE15CCEFile and
SLE16CCEFile subclasses with a factory driven by CCE_POOL_FILES

Each row maps a --cce-pool name to the generated class name and its
available-CCE file in shared/references, so supporting a new product is
a one-line change instead of a new class.

The generated classes keep their previous names and are still exported
from ssg.cce, so existing imports and CCE_POOLS lookups should be unchanged.

- Add the slmicro6 pool backed by cce-slmicro6-avail.txt, which makes
`utils/fix_rules.py add-cce --cce-pool slmicro6` usable.
@teacup-on-rockingchair
teacup-on-rockingchair force-pushed the cce_fix_rules_use_simplify_new_platform branch from 027aae4 to a797266 Compare October 24, 2026 08:26
@teacup-on-rockingchair

Copy link
Copy Markdown
Contributor Author

/retest

@Mab879
Mab879 merged commit 54f0906 into ComplianceAsCode:master Oct 26, 2026
79 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update python code refactoring Improvement which, once completed, will enable the project to progress faster. usability Enhancements related to usability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants