10 Commits

Author SHA1 Message Date
Rohit Yadav
38eaa04b98 Pull changes from master into javelin
- Disables simulator plugin, breaks build, available via simulator profile
- Fixes spring injections
- Fix api,acl plugins, ApiServer, ApiDispatcher
- Fix other merge conflicts

Conflicts:
	docs/en-US/external-firewalls-and-load-balancers.xml
	plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java
	server/src/com/cloud/api/ApiDispatcher.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
	utils/test/com/cloud/utils/log/CglibThrowableRendererTest.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-12 06:02:54 -08:00
Rohit Yadav
86a77e29dc ApiDiscovery: Fix listApis to return api response, related apis etc.
- Fix method to return listApis per api name basis
- Return api response, api related cmd etc. as part of response
- Caching and processing all cmd, response classes when plugin starts, made class
  list, maps static so they are shared by multiple instances in case, takes about
  1306ms to do the processsing but only on load time
- Cache for first listApi() and return precached data thereon, takes 2.2ms
  for first call, during runtime and 0ms thereon

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 22:52:10 -08:00
Rohit Yadav
f170075558 ApiDiscovery: Fix response add response class that will hold api response
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 22:48:56 -08:00
Rohit Yadav
3df026bd51 ApiDiscoveryServiceImpl: Implement listApis to return response based on role
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 18:51:38 -08:00
Rohit Yadav
0b1c2a5981 ApiDiscovery: Fix listApis interface, fix getProperties
In case of api discovery, it does not make sense to create a separate properties file
If this plugin is enabled in components.xml, a user should be able to discover
all the apis accessible to their role.

listApis based on role type of caller user

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:02 -08:00
Rohit Yadav
c6d9877d64 ApiDiscoveryService: Move refactor, interface should be in plugins and not in cloud-api
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 10:59:38 -08:00
Rohit Yadav
d13cc7e7e4 ApiDiscoveryService: Use only as pluggable service
Remove usage and impl as adapter.
We have duplicate code that generates apiname:cmd class maps which is
unavoidable right now as:

- Plugin should not depend on ApiServer or any other component
- cloud-utils cannot depend on cloud-api for the APICommand annotation
- Use java reflect to create a static method in cloud-utils that does the job
  would be unsafe.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 17:25:29 -08:00
Rohit Yadav
2eee2cd999 plugins: Fix getPropertiesFiles() for pluggable service plugins, CiscoNexusVSMEElement
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 04:56:32 -08:00
Rohit Yadav
d613c59dcb plugins: Fix apidiscovery's annotation field values and example plugin's name
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 20:00:13 -08:00
Rohit Yadav
2c04dad529 ApiDiscovery: New plugin to help discover apis on mgmt server
- Introduces api/discovery plugin that helps discover apis on the mgmt server
- It's a pluggable service, therefore has it's own api-discovery_commands.properties
  where the discovery api, listApi can be blacklisted (by removing it), or it's
  role mask can be changed
- By default its response has all the apis
- Changes in other parts of the code to make it work, viz. components.xml, pom.xml,
  and in ApiServer where it is used as an adapter to get apiname, cmd mappings

The ApiDiscoveryService interface is a contract that the implementing class will
provide:

1. A means to get all the apis as a list of response, plugin is free to implement
   the response class, as long as it extends on the BaseResponse:

    ListResponse<? extends BaseResponse> listApis();

2. Provides a map of apiname as the key and cmd class as the value:

    Map<String, Class<?>> getApiNameCmdClassMapping();

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 18:54:29 -08:00