You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Rayees Namathponnan (JIRA)" <ji...@apache.org> on 2014/06/09 21:21:01 UTC
[jira] [Commented] (CLOUDSTACK-6882) Doc generator should be
generate doc for plugins
[ https://issues.apache.org/jira/browse/CLOUDSTACK-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14025590#comment-14025590 ]
Rayees Namathponnan commented on CLOUDSTACK-6882:
-------------------------------------------------
As part below implementation, cloudstack can automatically load plugin
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Plug-ins%2C+Modules%2C+and+Extensions
There is no option to create doc for plugin, there are hardcode package values in server/src/com/cloud/api/doc/ApiXmlDocWriter.java,
Currently you need to update this manually with you package name to create doc, instead of manually modifying this, we should get the packages from loaded plugins
101 public static void main(String[] args) {
102
103 Set<Class<?>> cmdClasses = ReflectUtil.getClassesWithAnnotation(APICommand.class, new String[] {"org.apache.cloudstack.api", "com.cloud.api"});
104
105 for (Class<?> cmdClass : cmdClasses) {
106 String apiName = cmdClass.getAnnotation(APICommand.class).name();
107 if (s_apiNameCmdClassMap.containsKey(apiName)) {
108 // handle API cmd separation into admin cmd and user cmd with the common api name
109 Class<?> curCmd = s_apiNameCmdClassMap.get(apiName);
110 if (curCmd.isAssignableFrom(cmdClass)) {
111 // api_cmd map always keep the admin cmd class to get full response and parameters
> Doc generator should be generate doc for plugins
> -------------------------------------------------
>
> Key: CLOUDSTACK-6882
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6882
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the default.)
> Components: API, Doc
> Reporter: Rayees Namathponnan
> Priority: Critical
> Fix For: 4.4.0
>
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)