Commit Graph

265 Commits

Author SHA1 Message Date
Hugo Trippaers 4402685e11 Update master to 4.5.0-SNAPSHOT 2014-03-14 14:55:26 +01:00
Min Chen 48e08fe676 Merge branch 'master' into rbac. 2014-03-06 14:02:20 -08:00
Hugo Trippaers a0f932437c Move mysql ha strategy to a plugin. Activate this plugin using the mysqlha profile or the noredist flag 2014-02-27 09:51:02 +01:00
Hugo Trippaers ac00ab0087 Cleanup all mysql dependencies and set all to provided. 2014-02-21 14:55:11 +01:00
Hugo Trippaers 19b15a1bdc Fix parameter index in getCount function. 2014-02-20 15:13:29 +01:00
Hugo Trippaers 443acac927 Fix functional issue introduced by some findbug changes. 2014-02-14 18:37:47 +01:00
Hugo Trippaers 97bad4f9b3 Fix checkstyle and license issues 2014-02-14 18:37:47 +01:00
Antonio Fornie cbea6d26e8 Fix and test GroupBy SQL query creation
Signed-off-by: Ian Southam <isoutham@schubergphilis.com>
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2014-02-14 18:37:46 +01:00
Ian Southam 5a6ad11fa2 findbugs findings
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2014-02-14 18:37:46 +01:00
Alena Prokharchyk e0de79b170 Resource metadata: by default, all metadata is set with display=true (meaning that the detail is avaialble for display to the regular user). If admin wants to set a specific detail to be false, he has to specify it explicitly in addResourceDetail command 2014-02-10 12:05:59 -08:00
Prachi Damle f84375442e Merge branch 'master' into rbac
Conflicts:
	api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java
	api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java
	plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/api/query/QueryManagerImpl.java
	server/src/com/cloud/template/TemplateAdapterBase.java
	setup/db/db/schema-430to440.sql
	tools/apidoc/gen_toc.py
2014-02-04 12:07:32 -08:00
Laszlo Hornyak dea320f7b9 RAT fix
added license header to test
2014-01-25 20:50:14 +01:00
Laszlo Hornyak e4da3775c9 removed redundant Long, Short, Double, Float and Boolean instantiations
- Added unit tests
- Added javadoc

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-01-25 20:09:45 +01:00
Min Chen 929fbabaa2 Merge branch 'master' into rbac. 2014-01-17 14:37:08 -08:00
Min Chen bae498c89e Handle search of those entities without db view created using new ACL
model.
2014-01-13 21:55:56 -08:00
Antonio Fornie 55a6df4501 Resources leaks, refactoring and testing
Removing resource leaks from UsageSanityChecker and
refactoring it (encapsulation, removal of copy and paste, constants...)

Modularize static method for closing Statments in TransactionLegacy
and reusing this new method from other classes (Upgrade2214to30)

Create Unit and Integration Tests for UsageSanityChecker

Add DBUnit cases and integration profile for nitegration tests as
a base for future DB tests
2013-12-18 10:55:04 +01:00
Alex Huang be5e5cc641 All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
Alex Huang 433a631916 Reformat of source code to set a stable base for the future. I couldn't get checkstyle enabled. There's still about a thousand errors from checkstyle. Most of it from length errors from comments and strings. Will attempt to remove those tonight. This change is so large I just want to get it in before any merge nightmares. The changes are fairly minor though and I did a full compile and start a server with the reformat code. 2013-11-21 07:56:47 -08:00
Hugo Trippaers cf715ff491 Bump 4.3.0 to 4.4.0 in master 2013-11-21 16:01:15 +01:00
Alex Huang d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang eaa250fd3c Formatted again after all the tab expansions and eol removals 2013-11-21 04:47:01 -08:00
Alex Huang 224f479974 Removed trailing spaces 2013-11-21 04:08:01 -08:00
Alex Huang e4b22d0fca Replace all tabs, particularly the ones in the comments 2013-11-21 03:39:58 -08:00
Alex Huang 8d62744681 Reformat all source code. Added checkstyle to check the source code 2013-11-20 07:26:53 -08:00
Laszlo Hornyak 065e5afa08 Tests for DBUtil
This patch adds test for the lock management:
- getGlobalLock
- releaseGlobalLock

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-11-16 15:44:31 +01:00
Damodar Reddy 67fc2f53e2 CLOUDSTACK-4916: Fixing the issue with DB HA when there are more than 2 db nodes (Issue was mysql DriverManager was returning salve db nodes on random basis which was causing issue)
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-11-14 11:10:48 +05:30
Laszlo Hornyak 5420cbe981 added license header
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-11-12 08:09:37 +01:00
Laszlo Hornyak f629d405eb Test for DbUtil
test cases for
- isPersistable
- getColumnName

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-11-10 23:24:01 +01:00
Damodar Reddy dcd3c44279 CLOUDSTACK-4916: To Enable Master High Availability using mysql connector params and mysql's 2 way replication
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-11-08 16:18:14 +05:30
Min Chen dc3d279272 CLOUDSTACK-4833:[Automation][BVT] Template and ISO test cases failing
from BVT suite, during LIST api call.
2013-11-07 15:19:19 -08:00
Alena Prokharchyk 78b1ac4126 CLOUDSTACK-3868: fixed "count" param in listUsageRecords API to return the actual number of records matching the search criteria. Used to return the wrong value - the number of records per page
Conflicts:
	server/src/com/cloud/usage/UsageServiceImpl.java
	utils/src/com/cloud/utils/db/GenericDaoBase.java
2013-10-31 15:25:57 -07:00
Darren Shepherd afaf6370dd Fix change that broke db.properties.override 2013-10-31 09:21:34 -07:00
Darren Shepherd 1460196496 Centralize loading of db.properties to one place
There is now a method DbProperites.getDbProperties() that will load the
db.properties in one place and do the proper decryption of values if needed
2013-10-30 17:03:13 -07:00
Laszlo Hornyak dbaa818d1e InputStream use fix
Closes the FileInputStream opened at configuration in
- ClusterManagerImpl
- ClusterServiceServletAdapter
- TransactionLegacy
- AsyncJobManagerImpl
- DBEncryptionUtil
- EncryptionSecretKeyChecker

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-26 17:47:34 +02:00
Darren Shepherd 891b85d516 Add missing licenses 2013-10-23 15:20:08 -07:00
Darren Shepherd 76c22eae5b Update to use new Transaction API 2013-10-23 11:23:18 -07:00
Darren Shepherd e3280bdba2 Merge remote-tracking branch 'origin/spring-modularization'
Conflicts:
	client/tomcatconf/applicationContext.xml.in
	client/tomcatconf/nonossComponentContext.xml.in
	client/tomcatconf/simulatorComponentContext.xml.in
	framework/db/src/com/cloud/utils/db/Transaction.java
	plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
2013-10-23 11:14:42 -07:00
Darren Shepherd edeaf98117 Cleaner and more type safe Transaction API for checked exceptions 2013-10-23 10:02:43 -07:00
Darren Shepherd 323bbccd50 Add unit tests for Transaction 2013-10-17 16:07:11 -07:00
Darren Shepherd 711ad386d1 Random cleanup 2013-10-16 16:18:49 -07:00
Darren Shepherd 7364d55ccd Removed unneeded method 2013-10-16 09:48:19 -07:00
Darren Shepherd f62e28c1ec New Transaction API
Introduction of a new Transaction API that is more consistent with the style
of Spring's transaction managment.  The existing Transaction class was renamed
to TransactionLegacy.  All of the non-DAO code in the management server has been
updated to use the new Transaction API.
2013-10-16 09:21:00 -07:00
Kishan Kavala 81f1a0b831 CLOUDSTACK-4095 : Remove region_id from Transaction. Read from db.properties whenever required
Conflicts:
	framework/db/src/com/cloud/utils/db/GenericDaoBase.java
2013-10-16 19:28:42 +05:30
Laszlo Hornyak bd8536739c remove txn attribute from DB
txn attribute was never actually used

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-04 10:15:39 -07:00
Darren Shepherd 67186429e1 Spring Modularization
ACS is now comprised of a hierarchy of spring application contexts.
Each plugin can contribute configuration files to add to an existing
module or create it's own module.

Additionally, for the mgmt server, ACS custom AOP is no longer used
and instead we use Spring AOP to manage interceptors.
2013-10-02 15:41:04 -07:00
Darren Shepherd aed5e9dc2a Add Manage Context framework
The managed context framework provides a simple way to add logic
to ACS at the various entry points of the system.  As threads are
launched and ran listeners can be registered for onEntry or onLeave
of the managed context.  This framework will be used specifically
to handle DB transaction checking and setting up the CallContext.
This framework is need to transition away from ACS custom AOP to
Spring AOP.
2013-10-02 13:09:52 -07:00
Alena Prokharchyk 3ae80acb40 Added missing license to SearchBase.java - fixed broken RAT check 2013-09-28 22:18:27 -07:00
Alex Huang b998fba4da Added comments for the search builder classes on how to use them 2013-09-28 11:50:02 -07:00
Alex Huang b60eef3e82 Added comments and finished off the work 2013-09-28 07:53:28 -07:00
Alex Huang 5fd47cc873 Added QueryBuilder 2013-09-28 07:53:28 -07:00
Alex Huang 38e69fb9f9 Changed SearchCriteria2 to GenericQueryBuilder to reflect the same placement 2013-09-28 07:53:27 -07:00
Alex Huang e8cac2c5d8 Changed SearchCriteria2 to GenericQueryBuilder to reflect the same placement 2013-09-28 07:53:26 -07:00
Alex Huang e2988902c9 Changed SearchCriteria2 to GenericQueryBuilder to reflect the same placement 2013-09-28 07:53:25 -07:00
Alex Huang a964cf549e Continue to merge SearchCriteria2 and GenericSearchBuilder 2013-09-28 07:53:24 -07:00
Alex Huang af8832f6bd Unified both the SearchBuilder and SearchCriteriaService 2013-09-28 07:53:24 -07:00
Alex Huang b8e79c30a8 Compile complete 2013-09-06 15:40:37 -07:00
Kelven Yang 249e2e8f59 Correct DAO usage in VmwareDatacenterVO, relax assertion conditions to work with stack calling frame that is not wrapped with @DB injection 2013-09-04 14:49:44 -07:00
Alex Huang abbae2aa87 Fixed the problem with offerings and templates. These two items due to a previous patch all the way back in 2.1.x versions uses the removed column incorrectly. No one fixed since then. Hence, there's a bunch of findbyidincludingremoved calls in the cloudstack code around these two items. 2013-08-26 17:31:10 -07:00
Alex Huang 5495f10bce Revert "Reverting the range of commits that broke the build"
This reverts commit b59e3aaefc.
2013-08-08 15:02:40 -07:00
Prasanna Santhanam b59e3aaefc Reverting the range of commits that broke the build
This reverts commits 30c33415..f6a2c817bc

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-08-08 14:46:56 +05:30
Alex Huang 5287f4c9ec Got everything running through testing 2013-08-07 16:41:06 -07:00
Chip Childers 8225374138 Updating pom.xml version numbers for release 4.3.0-SNAPSHOT
Signed-off-by: Chip Childers <chipchilders@apache.org>
2013-08-01 10:35:00 -04:00
Alex Huang 3d2e49bcfc Changed the log4j config files to log org.apache.cloudstack in debug and change the layout format 2013-07-26 20:35:49 -07:00
Alex Huang f5e5b39c9b Moved the DB layer code into framework-db and change only the necessary projects to refer to it. Cut down on the dependencies introduced with all the code in utils. 2013-07-26 15:02:10 -07:00
Alex Huang 1caa566280 created a project for db framework 2013-07-25 19:00:26 -07:00