-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ui,api,server: template categorization based on os #10773
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
ui,api,server: template categorization based on os #10773
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10773 +/- ##
============================================
+ Coverage 16.57% 16.61% +0.03%
- Complexity 13868 13927 +59
============================================
Files 5719 5729 +10
Lines 507178 508070 +892
Branches 61571 61769 +198
============================================
+ Hits 84085 84398 +313
- Misses 413674 414236 +562
- Partials 9419 9436 +17
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:
|
looks nice. would be great for end-users. |
Adds new interface for image selection (template/iso) for an instance in UI. Old interface can still be used and it can be configured using UI configuration (config.json) OS categories/Guest OS categories have been improved with ability to create new categories, delete an existing category, and marking a category as featured to allow it to show up in the UI in the image selection interface. New APIs added: - addOsCategory - deleteOsCategory - updateOsCategory APIs updated: - updateOsType - listTemplates - listOsCategories Several improvements in UI especially related to forms - DeloyVM, ReinstallVM, CreateVnfAppliance, AddAutoscaleGroup. DeployVM form can now be opened from template details view with query params. Signed-off-by: Abhishek Kumar <[email protected]>
f9852f0
to
90294a6
Compare
Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
@shwstppr 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 ✔️ debian ✔️ suse15. SL-JID 13202 |
show only required elements when query params are passed Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
@shwstppr 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 ✔️ debian ✔️ suse15. SL-JID 13221 |
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
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.
Pull Request Overview
This PR introduces an enhanced OS categorization interface for both the UI and API by adding new endpoints and updating existing ones to support operations such as adding, updating, and deleting OS categories. Key changes include:
- New API commands for managing OS categories (add, update, delete).
- Enhancements in the DAO and VO layers to support the new category properties such as featured and sortKey.
- Updates to tests and response objects to incorporate the new fields.
Reviewed Changes
Copilot reviewed 55 out of 55 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
engine/schema/src/main/java/com/cloud/storage/dao/GuestOSDaoImpl.java | Added a new method to list IDs by category. |
engine/schema/src/main/java/com/cloud/storage/GuestOSCategoryDaoImpl.java | Adjusted SQL count query for consistency. |
engine/schema/src/main/java/com/cloud/storage/GuestOSCategoryVO.java | Included new columns (featured, sortKey) with their getters/setters. |
api/.../*.java | Introduced and updated API commands and responses for managing OS categories. |
api/src/main/java/org/apache/cloudstack/api/ApiConstants.java | Added new constant for ISO support. |
api/src/main/java/com/cloud/server/ResourceTag.java | Added a new resource tag for Guest OS category. |
api/src/main/java/org/apache/cloudstack/api/ResponseGenerator.java | Added response generation method for Guest OS categories. |
api/src/main/java/org/apache/cloudstack/api/ManagementService.java | Declared new methods for OS category operations. |
@@ -71,7 +77,7 @@ public String getOsDisplayName() { | |||
return osDisplayName; | |||
} | |||
|
|||
public Map getDetails() { | |||
public Map<String, String> getDetails() { |
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.
The getDetails() method initializes a new empty map and then checks if it is not empty, which will always return false, effectively ignoring the 'details' parameter intended to be processed. Also, remove the redundant semicolon in the map initialization ("new HashMap<>();;").
Copilot uses AI. Check for mistakes.
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
@shwstppr 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 ✔️ debian ✔️ suse15. SL-JID 13602 |
@blueorangutan test |
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
@blueorangutan test |
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13470)
|
[SF] Trillian test result (tid-13471)
|
Signed-off-by: Abhishek Kumar <[email protected]>
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.
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 - great UX feature. I've always found the template/ISO selection confusing. Hope this will improve that significantly.
Some statements to add new columns to cloud.guest_os_category have been added twice by mistake as part of #10773. These statements are idempotent and won't affect upgrade as such but better to cleanup Signed-off-by: Abhishek Kumar <[email protected]>
In PR #10773, 'AlmaLinux' was incorrectly written as 'Alma Linux' in the guest OS category name and OS classification. This PR corrects the naming to 'AlmaLinux'. Signed-off-by: Abhishek Kumar <[email protected]>
Adds new interface for image selection (template/iso) for an instance in UI. Old interface can still be used and it can be configured using UI configuration (config.json) OS categories/Guest OS categories have been improved with ability to create new categories, delete an existing category, and marking a category as featured to allow it to show up in the UI in the image selection interface. New APIs added: - addOsCategory - deleteOsCategory - updateOsCategory APIs updated: - updateOsType - listTemplates - listOsCategories Several improvements in UI especially related to forms - DeloyVM, ReinstallVM, CreateVnfAppliance, AddAutoscaleGroup. DeployVM form can now be opened from template/ISO details view with query params. Reorganized (removed and added some) OS categories to the following (in the same order): ``` 1. Ubuntu 2. Debian 3. Fedora 4. CentOS 5. Rocky Linux 6. Alma Linux 7. Oracle 8. RedHat 9. SUSE 10. Windows 11. Other ``` Documentation PR: apache/cloudstack-documentation#500 Signed-off-by: Abhishek Kumar <[email protected]>
Some statements to add new columns to cloud.guest_os_category have been added twice by mistake as part of apache#10773. These statements are idempotent and won't affect upgrade as such but better to cleanup Signed-off-by: Abhishek Kumar <[email protected]>
In PR apache#10773, 'AlmaLinux' was incorrectly written as 'Alma Linux' in the guest OS category name and OS classification. This PR corrects the naming to 'AlmaLinux'. Signed-off-by: Abhishek Kumar <[email protected]>
Description
Adds new interface for image selection (template/iso) for an instance in UI.
Old interface can still be used and it can be configured using UI configuration (config.json)
OS categories/Guest OS categories have been improved with ability to create new categories, delete an existing category, and marking a category as featured to allow it to show up in the UI in the image selection interface.
New APIs added:
APIs updated:
Several improvements in UI especially related to forms - DeloyVM, ReinstallVM, CreateVnfAppliance, AddAutoscaleGroup.
DeployVM form can now be opened from template/ISO details view with query params.
Reorganized (removed and added some) OS categories to the following (in the same order):
Documentation PR: apache/cloudstack-documentation#500
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?