bernardodemarco commented on PR #9225: URL: https://github.com/apache/cloudstack/pull/9225#issuecomment-2173872677
> 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. @bigsys-it, yes, for sure. With the Quota Plugin, this can be achieved through activation rules. These rules consist of logical expressions, written in JavaScript, which should evaluate to either a boolean or a numeric value. If the expression evaluates to a boolean, the tariff's value will be applied based on the result. If it evaluates to a numeric value, that value will directly become the tariff's value. For instance, if there's a need to assign a specific value for a given domain, the following activation rule could be applied: ```js if (domain.id === 'ba820fc7-12ea-11ef-9500-d283eea8b15e') { return 150; } else { return 175; } ``` Currently, applying a rule to a tariff can only be done through CloudMonkey and its UI support is beyond the scope of this PR. I strongly advise reviewing the PR that introduced this feature (#5909) along with its specifications (#5891). They provide more detailed examples and technical insights that could be extremely helpful. -- 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