ApiDiscovery: Discovery apis provided by PluggableServices as well

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2013-02-06 16:54:00 +05:30
parent 20b74249d5
commit e234fcff5a
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ public class ApiDiscoveryServiceImpl implements ApiDiscoveryService {
//TODO: Fix and use PluggableService to get the classes
Set<Class<?>> 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");