You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "JoaoJandre (via GitHub)" <gi...@apache.org> on 2023/06/07 11:36:01 UTC
[GitHub] [cloudstack] JoaoJandre commented on a diff in pull request #7599: Do not list Quota API's to accounts with Quota disabled
JoaoJandre commented on code in PR #7599:
URL: https://github.com/apache/cloudstack/pull/7599#discussion_r1221432585
##########
plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java:
##########
@@ -84,6 +88,9 @@ public boolean start() {
Set<Class<?>> cmdClasses = new LinkedHashSet<Class<?>>();
for (PluggableService service : _services) {
s_logger.debug(String.format("getting api commands of service: %s", service.getClass().getName()));
+ if (service.getClass().getSimpleName().equals("QuotaServiceImpl") && PluginAccessConfigs.QuotaPluginEnabled.value()) {
Review Comment:
The `for` is already being made. I just added an `if` to it, evaluating this if 80+ times is not really a big deal in ACS's scale, it most likely is actually way faster than a call to the database for example (which is done everywhere). Furthermore, this method should only be called once.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org