ApiServer: Ask pluggable services to return list of apis to ApiServer Signed-off-by: Rohit Yadav <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/dfcd9b05 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/dfcd9b05 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/dfcd9b05 Branch: refs/heads/master Commit: dfcd9b05a08f93e760bd6bfd8cef7d3174a7b804 Parents: 8c5cd42 Author: Rohit Yadav <[email protected]> Authored: Wed Feb 6 16:53:05 2013 +0530 Committer: Rohit Yadav <[email protected]> Committed: Wed Feb 6 16:54:46 2013 +0530 ---------------------------------------------------------------------- server/src/com/cloud/api/ApiServer.java | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/dfcd9b05/server/src/com/cloud/api/ApiServer.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java index 233da15..e41fcb5 100755 --- a/server/src/com/cloud/api/ApiServer.java +++ b/server/src/com/cloud/api/ApiServer.java @@ -222,6 +222,9 @@ public class ApiServer implements HttpRequestHandler { Set<Class<?>> cmdClasses = ReflectUtil.getClassesWithAnnotation(APICommand.class, new String[]{"org.apache.cloudstack.api", "com.cloud.api"}); + for(PluggableService pluggableService: _pluggableServices) + cmdClasses.addAll(pluggableService.getCommands()); + for(Class<?> cmdClass: cmdClasses) { String apiName = cmdClass.getAnnotation(APICommand.class).name(); if (_apiNameCmdClassMap.containsKey(apiName)) {
