Krikri::PluginHelpers::RhsmRepository
RhsmRepository - pure logic for the rhsm_repository plugin: parsing
subscription-manager repos --list output, fnmatch-style glob
matching, and deciding which repos need enabling/disabling. Split
out of plugins/rhsm_repository.cr so the argv/planning logic is
unit-spec-able (the execution path needs a real registered RHEL
system, which no spec environment has).
Class methods
Python's fnmatch on repo IDs: '*' any run, '?' any one char, everything else literal (fnmatch is case-insensitive on some platforms but repo IDs are lowercase hex/alnum anyway, so the case handling never decides a match here).
Mirrors the real module's Rhsm.list_repositories line walk: skip empty/header/indented lines, start a repo at "Repo ID: ", close it at the "Enabled: 1|0" line that follows its block.