Skip to content

Implement missing release33 methods#84

Merged
SchoolGuy merged 8 commits into
mainfrom
feature/implement-missing-release33-stubs
Jun 24, 2026
Merged

Implement missing release33 methods#84
SchoolGuy merged 8 commits into
mainfrom
feature/implement-missing-release33-stubs

Conversation

@SchoolGuy

@SchoolGuy SchoolGuy commented Jun 24, 2026

Copy link
Copy Markdown
Member

This PR adds missing XML-RPC methods that are present in the release33 branch of Cobbler. This PR is a split-out of #82 to decrease its size and complexity.

Changes:

  • Fix the return value from GetMenus, GetMenuAsRendered
  • Add Get*AsRendered for all missing types
  • Adding GetValidDistroBootLoaders, GetValidProfileBootLoaders, GetValidSystemBootLoaders, GetRepoConfigForProfile, GetRepoConfigForSystem, NewSubprofile, DisableNetboot, UploadLogData and ClearSystemLogs
  • Addition of some tests

This PR is arguably not tested in-depth, but I am willing to release further 0.5.x releases if there are bug reports for it.

SchoolGuy and others added 8 commits June 24, 2026 11:22
GetMenus was declared to return []*Distro and called convertRawDistrosList,
so callers received Distro structs instead of Menu structs. Fix the return
type to []*Menu and switch to convertRawMenusList, which already exists
and handles the Menu-specific sanitisation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GetMenuAsRendered had no parameters and returned only an error, making it
impossible to specify which menu to render or to inspect the result.
Fix the signature to match the pattern used by GetImageAsRendered:
accept a name string and return (map[string]interface{}, error). Add
request/response fixtures and a unit test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add GetDistroAsRendered, GetProfileAsRendered, GetSystemAsRendered,
GetRepoAsRendered, GetNetworkInterfaceAsRendered, GetTemplateAsRendered,
GetDistroGroupAsRendered, GetProfileGroupAsRendered, GetSystemGroupAsRendered.

All follow the pattern established by GetImageAsRendered: accept a name
string and return (map[string]interface{}, error). Add request/response
fixtures and unit tests for each method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Loaders, GetValidSystemBootLoaders

Add three methods that expose the get_valid_*_boot_loaders XML-RPC
endpoints, following the pattern of the existing GetValidImageBootLoaders
in image.go. Add request/response fixtures and unit tests for each.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These wrap the get_repo_config_for_profile and get_repo_config_for_system
XML-RPC endpoints which return the rendered yum/dnf repo file content for
a given profile or system. Neither endpoint requires a token. Add
request/response fixtures and unit tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@SchoolGuy SchoolGuy moved this to Pull Requests in Golang Client Jun 24, 2026
@SchoolGuy SchoolGuy added this to the v0.5.10 milestone Jun 24, 2026
@codacy-production

codacy-production Bot commented Jun 24, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 48 complexity · 0 duplication

Metric Results
Complexity 48
Duplication 0

View in Codacy

🟢 Coverage 68.38% diff coverage · +0.25% coverage variation

Metric Results
Coverage variation +0.25% coverage variation (-1.00%)
Diff coverage 68.38% diff coverage (50.00%)

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e7f2b96) 3384 1983 58.60%
Head commit (25e7d40) 3485 (+101) 2051 (+68) 58.85% (+0.25%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#84) 136 93 68.38%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@SchoolGuy

Copy link
Copy Markdown
Member Author

The build issue is related to a MacOS issue: https://stackoverflow.com/a/79790775

This indicates that we can't do anything at the moment about this sadly. So for the 0.5.x release series we will have to accept a broken CI.

@SchoolGuy SchoolGuy enabled auto-merge June 24, 2026 10:35
@SchoolGuy SchoolGuy disabled auto-merge June 24, 2026 10:35
@SchoolGuy SchoolGuy merged commit 37bf4d1 into main Jun 24, 2026
36 of 51 checks passed
@github-project-automation github-project-automation Bot moved this from Pull Requests to Done in Golang Client Jun 24, 2026
@SchoolGuy SchoolGuy deleted the feature/implement-missing-release33-stubs branch June 24, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant