bigsys-it commented on PR #9225:
URL: https://github.com/apache/cloudstack/pull/9225#issuecomment-2166054913

   > ### Description
   > This PR proposes some improvements to quota tariffs APIs and UI. Two 
parameters have been added to the `quotaTariffList` API: `id` and 
`listonlyremoved`. The first one refers to the tariff's ID, and the other to a 
flag that indicates whether only the removed tariffs will be listed. The 
`keyword` API parameter has also been changed in order to filter tariffs that 
contain a given keyword in their names.
   > 
   > Additionally, a validation has been added to check if the calling user has 
access to the tariff's activation rules. They will have access if they have 
permission to create or update tariffs.
   > 
   > The quota tariff's UI has also been refactored. Now, more fields of the 
`quotaTariffList` response are displayed, and the operator can easily create, 
edit and filter tariffs.
   > 
   > To filter tariffs by usage type, the `listUsageType` API response has been 
refactored, adding the name of the usage type in uppercase letters, separated 
by underscores, such as `ALLOCATED_VM`.
   > 
   > ### 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)
   > * [x]  Enhancement (improves an existing feature and functionality)
   > * [x]  Cleanup (Code refactoring and cleanup, that may add test cases)
   > * [ ]  build/CI
   > 
   > ### Feature/Enhancement Scale or Bug Severity
   > #### Feature/Enhancement Scale
   > * [x]  Major
   > * [ ]  Minor
   > 
   > ### Screenshots:
   > Tariffs details
   > Tariffs list view
   > Create form
   > Update form
   > ### How Has This Been Tested?
   > #### `listUsageTypes` API
   > I logged in CloudMonkey with a root admin user and I executed the 
`listUsageTypes` command, receiving the following response.
   > 
   > `listUsageTypes`
   > As noticed, the `name` field has been added and is being populated as 
expected. The `id` and `description` fields have not undergone any changes.
   > 
   > #### Quota tariffs
   > ##### Tests setup
   > Before testing, I deleted all default tariffs that existed in the 
database, and I verified that the `quotaTariffList` parameters were being 
identified correctly.
   > 
   > `help quotaTariffList`
   > `quotaTariffList`
   > Quota tariffs view
   > ##### Create quota tariff through UI
   > Once the `Create Quota Tariff` button is clicked, a form is rendered on 
the screen, with all the available API fields, except for `activationrule`.
   > 
   > Create Quota Tariff form
   > ###### Creation of a tariff with only the required values
   > The required fields are name, usage type and value. When creating a tariff 
with only them, the start date is automatically set to now, and the other 
fields are populated correctly.
   > 
   > Tariffs list view
   > Tariff details
   > ###### Creation of a tariff filling all fields
   > Creation form
   > Tariffs list view
   > Tariffs details
   > ##### Update quota tariff through UI
   > When selecting the option to edit a tariff, its description, value and end 
date are populated correctly.
   > 
   > Update form
   > ###### Update all fields
   > If at least one field is changed, then the API request to 
`quotaTariffUpdate` is performed, passing in only the changed values.
   > 
   > Update form
   > HTTP request payload
   > ###### Update no fields
   > If there are no changed fields, the API request to `quotaTariffUpdate` is 
not performed.
   > 
   > ##### Remove quota tariff through UI
   > When the delete button is clicked, a modal is rendered asking for 
confirmation. Once it is confirmed, the quota tariff is removed, and its 
`removed` field is set to the time that the operation was performed.
   > 
   > ##### Filter tariffs
   > The tariffs can be filtered by name, usage type and whether they have been 
removed.
   > 
   > Filtering by usage type
   > Filtering by name
   > Filtering the removed ones
   
   It would be ideal if we could have the possibility of assigning different 
rates for some domains, as, in our day-to-day business with the B2B public, it 
is common to negotiate different rates depending on the level of allocation and 
reservation that the client requests.


-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to