ApiDiscoveryService: Move refactor, interface should be in plugins and not in cloud-api

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
APIAccessChecker: Make it check based on role type and not user

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Summary: Add devcloud-kvm files

Detail: Working on getting a KVM-based devcloud so that development that
requires the KVM hypervisor can be simpler. This adds some setup devcloud files.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1357852438 -0700
CLOUDSTACK-683: Fixed missing image in Accessing VM Section
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-cloudstack
RoleType: public enum to get presently defined static role in CloudStack

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
PropertiesUtil: Refactor process config file method in utils, return map of key=value

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
AccountManager: Add method to translate account type to role type

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
ApiServer: get role type from account manager using account

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
PluggableService: Refactor method to return map of key value pairs

- Makes plugins self contained so they decide their properties file format
- PluggableService creates the contract that implementing entity will return a
  properties map which is apiname:rolemask (both are strings)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
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>
ManagementServerImpl: Fix missing import of PropertiesUtil

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
plugins: Check access based on roleType, remove unnecessary properties.in file

- Fix StaticRoleBasedAPIAccessChecker to check api access based on roletype
- Remove properties file which is not needed now for api discovery plugin

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
ApiServer: Log a better message if api access fails and debug it

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
APIAccessChecker: Refactor and simply plugin implementation using better data structures

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
APIChecker: Rename refactor and add interface checkExistence

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
ApiDiscoveryServiceImpl: Implement listApis to return response based on role

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
ApiDiscovery: Fix response add response class that will hold api response

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
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>
Docs. CLOUDSTACK-959. A sub-heading was inadvertently left out of the System Service Offerings section of documentation. Adding the section "Creating a New System Service Offering".