2007 Commits

Author SHA1 Message Date
Rohit Yadav
b63b7ddf60 UserContext: Threadsafe singleton, inject using ComponentContext, spring di failsafe
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-24 17:00:12 -08:00
Kelven Yang
a26e075f0e Remove final modifer to ListS3Cmd class as it conflicts with Spring injection 2013-01-23 18:24:03 -08:00
Prachi Damle
1cb0ce44df Removing BareMetalService referrences. We will load UserVMService by default. 2013-01-22 12:54:20 -08:00
Prachi Damle
94e8090bf3 Deploy, Start, Stop, Destroy VM orchestration service changes 2013-01-22 12:54:04 -08:00
Alex Huang
fe6f0457d5 fixed unit tests from merge 2013-01-18 15:58:55 -08:00
Alex Huang
10d9c019a9 All merge conflicts resolved 2013-01-18 12:14:57 -08:00
Chiradeep Vittal
ce4b49d30b network-refactor merge: fix nonoss build
Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-18 09:38:49 -08:00
Kishan Kavala
51c1ca7cbe CLOUDSTACK-1010: Fix count issue for listHosts command 2013-01-18 16:13:25 +05:30
Chiradeep Vittal
56cd809600 Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-cloudstack
Re-merge with network-refactor
2013-01-17 11:32:49 -08:00
Min Chen
3dabd5fbf3 Clean up ApiServer, ApiServlet and ApiDispatcher flow to handle various CloudRuntimeException
and CloudException in one place, and Introduced ApiErrorCode to handle CloudStack API error
code to standard Http code mapping.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-16 22:36:34 -08:00
Chiradeep Vittal
cadca5fc0c Merge branch 'master' into network-refactor-merge2
Conflicts:
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/network/element/RemoteAccessVPNServiceProvider.java
	plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
	server/src/com/cloud/acl/DomainChecker.java
	server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/network/MockNetworkManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
2013-01-16 19:17:14 -08:00
Kelven Yang
497dcd5044 Get rid of PlugService annotation, replace it with Spring standard injection in command classes 2013-01-16 18:44:44 -08:00
Marcus Sorensen
975021dda1 Summary: adding resizeVolume api call
Detail: This merges the resizevolume feature branch, which provides the
ability to migrate a disk between disk offerings, thereby changing its
size, or specifying a new size if current disk offering is custom.

BUG-ID: CLOUDSTACK-644
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358358209 -0700
2013-01-16 17:43:35 -07:00
Murali Reddy
4b67340d8c Revert "Summary: partical check-in for L4-L7 network services in the
shared"

This reverts commits 0de5a145e4f06420a4eb1867309af674c16ace7c,
28bbf6c52798c9bd298952844250fbc3cb92dce0

Reverting due to IP clearance issues for the commits done as part of CLOUDSTACK-312
2013-01-16 16:43:37 +05:30
Murali Reddy
c7840cf91f reverting the earlier commit 432ea9c7d4aff3f7e682f2951f49ed3e95778d9f
done for bug CLOUDSTACK-265 due to IP clearence issues.
2013-01-16 15:10:27 +05:30
Min Chen
939acb0f4c Remove unused CloudExecutionException. 2013-01-15 18:17:35 -08:00
Kelven Yang
df684261cf Put command classes under Spring injection framework 2013-01-15 18:07:19 -08:00
Min Chen
8608925216 Consolidate RuntimeCloudException and CloudRuntimeException into one
class CloudRuntimeException, and removed RuntimeCloudException to avoid
confusion.
2013-01-15 18:07:08 -08:00
Rohit Yadav
f6a8b45de5 ApiDiscovery: Use UserContext getCallerUser, do a lazy eval to get account service
Impl. and use UserContext to get User.
CloudStack's @Inject is horrible, it may sometimes fail to inject account service
during startup. Do a lazy injection using ComponentLocator when needed.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-15 16:11:51 -08:00
Rohit Yadav
b9c020fa7c APIChecker: Fix interface definition to take in User
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 19:01:25 -08:00
Rohit Yadav
896e505da6 APIChecker: Make interface generic, pass user and not just role
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 15:08:45 -08:00
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
ad063ed610 StaticRoleBasedAPIAccessChecker: Throw exception on failed check
Plugin should not be responsible for existence of checking an API, this was wrong.
Throw exception boldly when checkAccess fails.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 19:24:11 -08:00
Rohit Yadav
0dca44efe8 ApiServer: Debug messages, don't spam with info, remove identity helper in ResponseGenerator
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
40779975d3 ExtractVolumeCmd: Fix regression, use Zone Id for getting zone
Fixes regression introduced in b14b39a69fa295d1d20484170b95b97fe310af28

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
a35db97355 NetworkService: Add method to interface to get network by uuid
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
35544f26e5 DeployVmCmd: Remove usage of IdentityDao, use Network to get by id or uuid
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
31dd412626 DomainService: Fix getDomain by uuid string
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:19 -08:00
Kelven Yang
f57dcaa820 Loadable components to be in separted Spring component bundling 2013-01-11 15:33:15 -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
74bb043c37 APIChecker: Rename refactor and add interface checkExistence
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 18:51:30 -08:00
Rohit Yadav
18bdc58ceb APIAccessChecker: Refactor and simply plugin implementation using better data structures
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 17:21:58 -08:00
Alex Huang
1294cdc701 pulled from master 2013-01-10 16:01:01 -08:00
Alex Huang
d6f44a4d6a merged from master 2013-01-10 15:55:42 -08:00
Rohit Yadav
1425736c19 AccountManager: Add method to translate account type to role type
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:01 -08:00
Rohit Yadav
1ac48bc36c RoleType: public enum to get presently defined static role in CloudStack
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:01 -08:00
Rohit Yadav
62a42723f9 APIAccessChecker: Make it check based on role type and not user
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 11:49:15 -08:00
Alex Huang
56e5fbdee2 removed import of componentlocator and inject from all files 2013-01-10 11:44:47 -08:00
Alex Huang
f40e7b7511 removed componentlocator and inject 2013-01-10 11:05:20 -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
Chiradeep Vittal
1776659fe7 Network-refactor: move validateRule to LB manager since it now has access to LB elements.
NetworkServiceImpl does not need a cache of system network offerings
Ensure mocks build to new APIs.

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 18:36:29 -08:00
Chiradeep Vittal
745fae93f6 Network-refactor: some clean up of the NetworkService interface
- remove unused public apis
- remove unused members
- change visibility of methods to protected if they do not implement a method in the interface

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 18:36:23 -08:00
Min Chen
7f8262d45e Remove IdentityProxy and IdentityTypeAdapter class.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-09 17:40:58 -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
3dc7626ebc api: Comment out @APICommand annotation for api cmd classes that are unknown
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 17:20:46 -08:00
Chiradeep Vittal
88df984ff3 Network-refactor: add a method for plugins to get the source nat ip
Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 15:49:02 -08:00
Chiradeep Vittal
0c3001530f Network-refactor: move readonly interface NetworkModel into api project so that plugins can stop depending on the server project
Network-refactor: accidentally injected NetworkModel twice (revert one of them)

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 15:49:01 -08:00
Min Chen
dcbb0ecef5 Fix CLOUDSTACK-936: fix nonoss build due to CloudException IdentityProxy
removal.
2013-01-09 13:47:53 -08:00
Min Chen
9924b64830 commit 3a3cb60e85c0254ebceff55d0b210ca1ff5386a6
Author: Likitha Shetty <likitha.shetty@citrix.com>
Date:   Wed Jan 9 11:54:25 2013 +0530

    CLOUDSTACK-614: ListTemplates API is not returning "Enable SSH Key" attribute for any given template. Update the TemplateResponse by adding 'sshkeyenabled' attribute to it. This attribute is set to the value that the user passes as input for parameter 'sshkeyenabled' while registering the template.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-09 10:42:44 -08:00
Rohit Yadav
7c5c3c5dfc api: Re-add deleted addProxyObject method on CloudException
- This was removed part of the response work
- Re-adding as this kind of method definition is available in several other
  exception classes and is used in a lot of cmd classes and in service layer
- TODO: We need to find a way to replace old code and refactor method with the
  new definition that gets only uuid.
- FIXME: Some tables don't have uuid for ex. ClusterVSMMapVO, in this case
  we should keep the method until we find a way to fix this issue

Partially reverting a88ce6bb7f495dddeb954d1fc7826176646b3590

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 05:43:41 -08:00