From e234fcff5ab4cdc32be70a85d93eab341de44696 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 6 Feb 2013 16:54:00 +0530 Subject: [PATCH] ApiDiscovery: Discovery apis provided by PluggableServices as well Signed-off-by: Rohit Yadav --- .../apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java b/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java index 7689ba4b3d8..e3bc4d39f20 100644 --- a/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java +++ b/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java @@ -67,6 +67,8 @@ public class ApiDiscoveryServiceImpl implements ApiDiscoveryService { //TODO: Fix and use PluggableService to get the classes Set> cmdClasses = ReflectUtil.getClassesWithAnnotation(APICommand.class, new String[]{"org.apache.cloudstack.api", "com.cloud.api"}); + for(PluggableService service: _services) + cmdClasses.addAll(service.getCommands()); cacheResponseMap(cmdClasses); long endTime = System.nanoTime(); s_logger.info("Api Discovery Service: Annotation, docstrings, api relation graph processed in " + (endTime - startTime) / 1000000.0 + " ms");