Skip to content

Service offering category feature - #12144

Open
Hanarion wants to merge 26 commits into
apache:mainfrom
Hanarion:service_offering_category_feature
Open

Service offering category feature#12144
Hanarion wants to merge 26 commits into
apache:mainfrom
Hanarion:service_offering_category_feature

Conversation

@Hanarion

Copy link
Copy Markdown

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)
  • 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

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

image image image image

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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants