Hanarion opened a new pull request, #12144: URL: https://github.com/apache/cloudstack/pull/12144
### Description When using Cloudstack, when creating instance with a lot of offerings, it could be hard to differentiate between all of the offerings. For that, categories could be useful. This pull request introduces the concept of "Service Offering Categories" to the API, allowing service offerings to be grouped, managed, and queried by category. It adds a new interface for categories, updates the API to support creating, updating, deleting, and listing categories, and enables associating service offerings with a category. The changes also extend existing API commands and responses to work with categories. **Service Offering Category API Support:** * Added new API commands for service offering categories: `CreateServiceOfferingCategoryCmd`, `DeleteServiceOfferingCategoryCmd`, `UpdateServiceOfferingCategoryCmd`, and `ListServiceOfferingCategoriesCmd`, enabling full CRUD operations and listing for categories. * Updated `ConfigurationService` interface to include methods for creating, deleting, and updating service offering categories. * Added a new interface `ServiceOfferingCategory` that defines category properties and behaviors. **API Parameter and Response Enhancements:** * Introduced new API parameters and constants for category ID and name (`SERVICE_OFFERING_CATEGORY_ID`, `SERVICE_OFFERING_CATEGORY_NAME`) in `ApiConstants`, and updated related commands (`CreateServiceOfferingCmd`, `UpdateServiceOfferingCmd`, `ListServiceOfferingsCmd`) to accept or filter by category. * Extended `ResponseGenerator` to support generating responses for service offering categories. **Service Offering Model Update:** * Added a `getCategoryId()` method to the `ServiceOffering` interface, allowing offerings to be associated with a specific category. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [X] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [X] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): <img width="2560" height="1300" alt="image" src="https://github.com/user-attachments/assets/a597c5f8-2378-4cd0-91b4-875e84ec10a0" /> <img width="2179" height="507" alt="image" src="https://github.com/user-attachments/assets/ba834798-edd5-4040-90bb-5a6e90a98a4b" /> <img width="1134" height="618" alt="image" src="https://github.com/user-attachments/assets/df1dcf4d-d1fc-47be-9e07-2c3b7f8febba" /> <img width="1479" height="738" alt="image" src="https://github.com/user-attachments/assets/3c264762-8565-4968-ad3b-7268d86f8773" /> ### How Has This Been Tested? On my dev environment, through the API and cloudmonkey #### How did you try to break this feature and the system with this change? Those changes should not break any features as it is only adding a new column to serviceoffering and adding a new table, it is only a way to filter and categorize. -- I'm sorry if the formatting isn't perfect, i couldn't get the pre-commit to work, and it is my first code PR. Warning, i put the SQL where i thought it made sense, but i think you will want to move it where it really should be. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
