-
Notifications
You must be signed in to change notification settings - Fork 1.3k
B&R: Show backup offerings with userDrivenBackupsAllowed=false to all users #11889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.22
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #11889 +/- ##
============================================
- Coverage 17.56% 17.56% -0.01%
+ Complexity 15533 15531 -2
============================================
Files 5909 5909
Lines 528970 529006 +36
Branches 64602 64602
============================================
- Hits 92917 92912 -5
- Misses 425603 425646 +43
+ Partials 10450 10448 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
vishesh92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16329 |
|
[SF] Trillian test result (tid-15165)
|
vishesh92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Tested the listing in the dashboard for a normal user for backup offerings. Before, non-user driver backup offerings were not showing up in the dropdown. After the changes, it's listing all the backup offerings.
Test Case 1: Admin creates SLA backup offering (userDrivenBackupsAllowed=false)Objective: Verify that an administrator can successfully create an SLA-type backup offering with Environment:
Test Steps:
Expected Result: SLA backup offering is created successfully with Evidence:
Test Result: PASS - Admin successfully created SLA backup offering with Test Case 2: Admin creates ADHOC backup offering (userDrivenBackupsAllowed=true)Objective: Verify that an administrator can successfully create an ADHOC-type backup offering with Environment:
Test Steps:
Expected Result: ADHOC backup offering is created successfully with Evidence:
Test Result: PASS - Admin successfully created ADHOC backup offering with Test Case 3: Regular user can list both SLA and ADHOC backup offeringsObjective: Verify that a non-admin user can list both SLA ( Environment:
Preconditions:
Test Steps:
Expected Result: Regular user can see BOTH SLA and ADHOC backup offerings Evidence: Test Result: PASS - Regular user can now list both SLA and ADHOC backup offerings. PR #11889 fixes the bug reported in #11878. Test Case 4: Regular user can assign SLA offering to VMObjective: Verify that a non-admin user can assign an SLA backup offering ( Environment:
Preconditions:
Test Steps:
Expected Result: Regular user can successfully assign SLA backup offering to their VM Evidence:
Test Result: PASS - Regular user successfully assigned SLA backup offering to their VM. This confirms PR #11889 fixes the assignment issue reported in #11878. Test Case 5: Regular user cannot manually trigger backup on SLA offeringObjective: Verify that a non-admin user cannot manually create a backup when assigned an SLA backup offering ( Environment:
Preconditions:
Test Steps:
Expected Result: Operation should fail with error indicating ad-hoc backups are not allowed Evidence: Test Result: PASS - Regular user correctly denied manual backup creation on SLA offering. Security model is preserved. Test Case 6: Regular user cannot schedule backups on SLA offeringObjective: Verify that a non-admin user cannot create a backup schedule when assigned an SLA backup offering ( Preconditions:
Test Steps:
Expected Result: Operation should fail with error indicating user-defined schedules are not allowed Evidence: Test Result: PASS - Regular user correctly denied backup schedule creation on SLA offering. Security model is preserved. Test Case 7: Regular user can trigger and schedule backups on ADHOC offeringObjective: Verify that a non-admin user can manually create backups and define schedules when assigned an ADHOC backup offering ( Preconditions:
Test Steps:
Expected Result: All operations should succeed with ADHOC offering Evidence:
Test Result: PASS - Regular user can successfully create manual backups and schedules with ADHOC offering. This confirms the differentiation between SLA and ADHOC offerings works correctly. Test Case 8: Domain admin behavior with both offering typesObjective: Verify that a Domain Admin can list both SLA and ADHOC backup offerings, and can assign SLA offerings to VMs within their domain. Environment:
Preconditions:
Test Steps:
Expected Result: Domain Admin can list both offering types and assign SLA offerings to VMs Evidence:
Test Result: PASS - Domain Admin can list both SLA and ADHOC offerings and assign SLA offerings to VMs within their domain. Test Case 9: Assign/unassign SLA offering, then reassignObjective: Verify that SLA backup offerings can be assigned, removed, and reassigned to VMs without issues. Environment:
Preconditions:
Test Steps:
Expected Result: Full cycle of assign/unassign/reassign works correctly Evidence:
Test Result: PASS - Full cycle of assign/unassign/reassign works correctly for SLA offerings. Test Case 10: API filtering with
|
RosiKyu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tested PR #11889 on CloudStack 4.22 environment with dummy backup provider.
Test Summary
| # | Test Case | Result |
|---|---|---|
| 1 | Admin creates SLA offering (allowuserdrivenbackups=false) |
PASS |
| 2 | Admin creates ADHOC offering (allowuserdrivenbackups=true) |
PASS |
| 3 | Regular user can list both SLA and ADHOC offerings | PASS |
| 4 | Regular user can assign SLA offering to VM | PASS |
| 5 | Regular user cannot manually trigger backup on SLA offering | PASS |
| 6 | Regular user cannot schedule backups on SLA offering | PASS |
| 7 | Regular user can trigger/schedule on ADHOC offering | PASS |
| 8 | Domain admin can list and assign both offering types | PASS |
| 9 | Assign/unassign/reassign SLA offering cycle | PASS |
| 10 | API filtering (keyword parameter) |
Pre-existing bug (unrelated to PR) #12466 |
| 11 | Pagination of backup offerings list | PASS |
| 12 | Existing VMs with backup offerings unaffected | PASS |
| 13 | UI: Regular user sees both offerings in dropdown | PASS |
Environment
- Management Server:
ref-trl-10594-k-Mol9-rositsa-kyuchukova-mgmt1 - Backup Provider: dummy
- Tested roles: Root Admin, Domain Admin, Regular User
Conclusion
PR fixes #11878 correctly. Regular users can now list and assign SLA backup offerings while security restrictions (no manual backup/schedule on SLA) are preserved.
Note: The keyword filter in listBackupOfferings API does not work, but this is a pre-existing issue unrelated to this PR.


Description
This PR fixes #11878
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
allowuserdrivenbackups=falseHow did you try to break this feature and the system with this change?