Implement missing release33 methods#84
Conversation
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>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 48 |
| Duplication | 0 |
🟢 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%) 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.
|
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. |
This PR adds missing XML-RPC methods that are present in the
release33branch of Cobbler. This PR is a split-out of #82 to decrease its size and complexity.Changes:
GetMenus,GetMenuAsRenderedGet*AsRenderedfor all missing typesGetValidDistroBootLoaders,GetValidProfileBootLoaders,GetValidSystemBootLoaders,GetRepoConfigForProfile,GetRepoConfigForSystem,NewSubprofile,DisableNetboot,UploadLogDataandClearSystemLogsThis 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.