You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/02/07 21:04:12 UTC

[13/51] [abbrv] git commit: refs/heads/ui-plugins - ApiDiscovery: Discovery apis provided by PluggableServices as well

ApiDiscovery: Discovery apis provided by PluggableServices as well

Signed-off-by: Rohit Yadav <bh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/1b9e5c30
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/1b9e5c30
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/1b9e5c30

Branch: refs/heads/ui-plugins
Commit: 1b9e5c3006b5b9ee6b301d65fc8d81675914c826
Parents: dfcd9b0
Author: Rohit Yadav <bh...@apache.org>
Authored: Wed Feb 6 16:54:00 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Wed Feb 6 16:54:46 2013 +0530

----------------------------------------------------------------------
 .../discovery/ApiDiscoveryServiceImpl.java         |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1b9e5c30/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
----------------------------------------------------------------------
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 7689ba4..e3bc4d3 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<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");