cloudstack/plugins
Rohit Yadav b59a18d1a1 CLOUDSTACK-1210: Fix pluggable service, apiserver, mgmt server impl, api-discovery
- Mgmt server impl is a pluggable service, fix it's method
- Fix getCommands() to return all cmd api classes supported by this mgmt server
- For api-discovery, get commands from pluggable services only, don't use reflections
- Don't use reflections in ApiServer, iterate pluggableservices
- Fix api discovery unit test
- The fix was done automatically using following python program along with
  following step:

1. Get all apis provided by default mgmt server, all of them are in cloud-api now
   cd api/src/org/apache/cloudstack/api/command
   find . >> apis
2. For all apis, generate java code that adds the class to the cmdList arraylist:
   f = open('apis', 'r')
   data = f.read()
   f.close()
   output = ""
   for a in data.split('\n'):
     output += "cmdList.add(%s);" % a.split('/')[-1].replace('.java', '.class')
   # wrote output to a file, copied content to mgmt server impl's getCommands()
   # similarly, fixed import statements using same code, splitting on /

Testing:
Ran apiserver, put breakpoints in ApiServer's init() where classes are processed
Total cmd classes found by reflections (ReflectUtil) = 354
Total cmd classes found by getCommands for all pluggable services = 354

Next, copied the comma separated values for each set to a string in ipython, a & b
set(a).difference(set(b)) returned null.

The above test implies both set of cmd classes found by both methods, i.e. using
reflections and using getCommands() had same set of apis and all were unique.

Conclusion:
The changes are idempotent and don't break api server's cmd class api discovery
processing.

BUG-ID: CLOUDSTACK-1210

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-08 16:48:13 +05:30
..
acl/static-role-based All merge conflicts resolved 2013-01-18 12:14:57 -08:00
api CLOUDSTACK-1210: Fix pluggable service, apiserver, mgmt server impl, api-discovery 2013-02-08 16:48:13 +05:30
deployment-planners Separate loadable components like Gurus, Elements, Adapters to componentContext.xml 2013-01-16 16:33:59 -08:00
event-bus/rabbitmq Sync master to javelin one more time 2013-02-01 11:37:33 -08:00
file-systems/netapp netapp: Fix as pluggable service and return list of apis it offers 2013-02-08 16:36:24 +05:30
host-allocators/random Improve component lifecycle management with system run-level concept 2013-01-30 15:21:02 -08:00
hypervisors agent: Rename startDomain to startVM 2013-02-07 23:07:10 +01:00
network-elements bigswitch-vns: Fix since version in apis, add spring annotation to fix NPE 2013-02-08 16:36:24 +05:30
parent Removed all the .project files 2013-01-08 14:11:00 -08:00
storage skip test in cloud engine 2013-01-22 13:25:48 -08:00
storage-allocators/random Removed all the .project files 2013-01-08 14:11:00 -08:00
user-authenticators CLOUDSTACK-1175: PlainTextAuthenticator was being loaded due @Component annotation. Removed the annotation so that MD5 authenticator will be used 2013-02-06 15:27:03 +05:30
pom.xml Merge javelin into master 2013-02-01 14:40:45 -08:00