feat: Add process sub resource to VirtualMachineTemplate - #2775
feat: Add process sub resource to VirtualMachineTemplate#2775RoniKishner wants to merge 1 commit into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 20 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughChangesVirtualMachineTemplate processing
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Cherry-pick Operations
Branch Management
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ocp_resources/virtual_machine_template.py`:
- Around line 68-101: Add tests for VirtualMachineTemplate.process covering the
generated process subresource path, ProcessOptions request body, empty default
and supplied parameters, injected client usage, and returning
response.to_dict(). Follow the existing ocp_resources test patterns and verify
the request and result without changing process behavior.
- Around line 96-100: Update the _client.request call in the virtual machine
template process operation to use the client’s accepted argument names or
positional arguments, supplying the POST method, subresource path, and body to
the required parameters _method, _path, and _body so the request executes
without TypeError.
- Line 70: Update the parameters annotation in the affected public wrapper to
dict[str, str] | None = None, matching KubeVirt’s ProcessOptions contract and
preventing unsupported value types from being accepted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3025c10c-9a75-497f-8a94-26fe42a120e2
📒 Files selected for processing (1)
ocp_resources/virtual_machine_template.py
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_virtual_machine_template.py`:
- Around line 23-37: Replace the standalone MagicMock clients created by
_make_init_client and _make_process_client with repository-standard
get_client(fake=True) instances. Retain only the targeted mocks for
resources.search and request().to_dict() needed by each test, and update any
related fixture setup in the referenced sections to use the same fake-client
path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b991a87c-7fcf-4c80-903d-fa6a85b43bac
📒 Files selected for processing (2)
ocp_resources/virtual_machine_template.pytests/test_virtual_machine_template.py
🚧 Files skipped from review as they are similar to previous changes (1)
- ocp_resources/virtual_machine_template.py
Signed-off-by: rkishner <rkishner@redhat.com>
Short description:
Add the process action to
VirtualMachineTemplateMore details:
A
VirtualMachineTemplateis able to be processed, thus creating a manifest for aVirtualMachineresource to be created from.This allows a user to call
processon theVirtualMachineTemplateobject.What this PR does / why we need it:
Ability to create a
VirtualMachinemanifest from aVirtualMachineTemplateWhich issue(s) this PR fixes:
Special notes for reviewer:
Bug:
Summary by CodeRabbit
New Features
Tests