946 Commits

Author SHA1 Message Date
Laszlo Hornyak
cff5ea0949 FileUtil: use commons-io FileUtils
- removed the method body ot FileUtil.copyFile and replaced with FleUtils.copyFile

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-11-07 22:36:02 +01:00
Kishan Kavala
3f5b8f7063 CLOUDSTACK-4793 : Added UpgradeRouterTemplate API. Added filters to listRouters API. listRouters response includes verion and required upgrade flag. Min VR version is checked before sending commands to router 2013-11-07 19:49:05 +05:30
Darren Shepherd
68ce3f56ac Missed a null check 2013-11-06 09:44:08 -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
fa35490fef InputStream use fix in ProcessUtil
- use PropertiesUtil to load Properties from file

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-26 17:47:34 +02: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
Laszlo Hornyak
58477834b6 InputStream use fix in PropertiesUtil
- use PropertiesUtil.loadFromFile to read the properties
- test added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-26 17:47:34 +02:00
Darren Shepherd
81d01369d7 Merge commit 'df728fcf41ba0dfddabfaadea8cbcb77d18bfa96'
Conflicts:
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
2013-10-23 12:31:53 -07:00
Laszlo Hornyak
4b530c874f Safe properties loader
- new utility method introduced in PropertiesUtil to load properties objects from files
- RegionManagerImpl modified to use the utility method
- Tests added for both

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-23 20:50:00 +02: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
205a77a5bb Merge remote-tracking branch 'origin/txn-refactor'
Conflicts:
	engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
2013-10-23 10:40:44 -07:00
Sateesh Chodapuneedi
00e57c0713 CLOUDSTACK-4911 [Mixed Hypervisor] VM Status is marked as alive when exit status of ping command is not available within command timeout
Supplementing the fix/commit 748315620bbbc472652e38df960d136beee4882e
While remote executing commands through ssh, wait for channel condition of EXIT_STATUS.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-10-23 08:51:43 +05:30
Sateesh Chodapuneedi
748315620b CLOUDSTACK-4911 - [Mixed Hypervisor] VM Status is marked as alive when exit status of ping command is not available within command timeout
Currently during ssh execution of remote command, if no response is received within timeout, Cloudstack is returning success result.
This is resulting in false positives. Fix is to check if exit status of remote command is available or not. If not, return failure result.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-10-21 16:34:57 +05:30
Hugo Trippaers
7623c4527a Fix wome warning due to conflicting xml libraries 2013-10-21 09:45:31 +01:00
Prachi Damle
9d625405d3 CLOUDSTACK-4895: Management server fails to start because snapshot policy time zones have day light savings
Changes:

-     Calendar throws IllegalArgumentException when the hour of the day happens to be skipped due to DST changes.
-     Fix will ask Calendar to adjust the time accordingly and get the next closest time
2013-10-18 17:25:14 -07:00
Damodar Reddy
a92095a4a6 CLOUDSTACK-4811:Fixed zone creation wizard is allowing to accept wrong sub net mask which is cauing wrong cidr value for a given ip range
Signed-off-by: Jayapal <jayapal@apache.org>
2013-10-18 15:51:51 +05:30
Darren Shepherd
323bbccd50 Add unit tests for Transaction 2013-10-17 16:07:11 -07:00
Min Chen
25acfbad78 CLOUDSTACK-4816:provide configurable option to choose single vs
multipart upload to S3 object storage based on object size.
2013-10-17 10:28:59 -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
Marcus Sorensen
d430473fe0 add missing license headers to PasswordGeneratorTest.java and an agent.properties 2013-10-14 11:56:21 -06:00
Hugo Trippaers
795366019b Don't capture stderr, this will return an error when the runscript command expects null when there is no default route. 2013-10-14 09:58:37 +02:00
Laszlo Hornyak
47dd1c1e95 PasswordGenerator tests
- StringBuffer replaced with a StringBuilder
- tests added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-11 20:09:37 +02:00
Laszlo Hornyak
b76e501d26 removed PasswordGenerator.main
unused method, probably for debugging/testing purposes

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-11 20:09:37 +02:00
Laszlo Hornyak
982db550eb test fix: no assertion on the number of fileds returned
Removed the assertion on the number of fields from ReflectUtil because it did not work with bytecode manipulation like what sonar works with.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-11 18:49:10 +02:00
Laszlo Hornyak
d1dd85a4c4 ReflectUtil: test for getAllFieldsForClass
- code comment turned to javadoc
- added braces to if and for statements to make it look more like the rest
- tests added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-09 20:39:41 +02:00
Laszlo Hornyak
66fe3abe3b ReflectUtil: findMethod removed
findMethod was not used, it is removed

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-09 20:39:41 +02:00
Min Chen
f1895ea39a CLOUDSTACK-4816: Make S3 upload multipart or singlepart configurable. 2013-10-04 18:21:25 -07:00
Laszlo Hornyak
826c69fd29 ConstantTimeBackoff test and cleanup
- javadoc changed - the old one was copy-pasted from AgentShell
- start and stop method removed - they did the same as the overridden methods
- _counter removed as it was only written, but never read
- remove from _asleep map was moved to a finally block, to make sure it is removed even in case of the thread gets interrupted
- Tests created for the above scenarios.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-10-04 11:24:43 -07:00
Wei Zhou
3a999e70af CLOUDSTACK-4813: add function to get ExitValue when run bash commands
(cherry picked from commit b4397acfccd651bc67bb842097def5ded995c125)
2013-10-04 11:06:16 +02:00
Darren Shepherd
8cf00de51d Configuration to enable Spring Modularization
All of the code changes for the Spring Modularization will work in
a modularized context or a non-modularized context.  This commit
is the final commit to turn modularization on.  Revert this commit
to disable the modularization and go back to monolithic Spring
configuration.
2013-10-02 15:43:11 -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
Laszlo Hornyak
b44bc9db02 NumbersUtil cleanup
- removed methods that were not used
- parseLong, parseInt and parseFloat replaced with the commons-lang NumberUtils call
- Test for the remaining methods

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2013-10-02 10:55:00 +02:00
Darren Shepherd
cba8e40e4b Add license headers to fix build 2013-09-30 09:51:45 -07:00
Darren Shepherd
766a0a2229 Add ability to programatically disable CloudStack ComponentConext intialization
As we moved to a more Spring managed lifecycle, the lifecycle management
in ComponentContext is not needed.  The transition to fully spring managed
will not happen all at once.  The management server will be done first and
then AWSAPI and UsageServer will come later.  This change allows the
ComponentContext in the context of the management server to be bypassed.
Note, by default, the ComponentContext will run its initialization.
2013-09-30 09:30:54 -07:00
Darren Shepherd
78040f8769 Add registry interface
Registry interface will be used to store and discover extensions
2013-09-30 09:26:17 -07:00
Darren Shepherd
9a083b9e66 Add Named interface to recognize objects with a getName() 2013-09-30 09:23:23 -07:00
Laszlo Hornyak
13e7a7308b Test for URLEncoder
- test added
- source formatted

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-09-30 15:03:12 +02:00
Daan Hoogland
5338aaa39f use locale when formatting numbers 2013-09-24 15:53:32 +02:00
Hugo Trippaers
5ada5e88f3 This test appears to be locale sensitive, so fix the locale in the test 2013-09-24 18:30:00 +08:00
Hugo Trippaers
8b6dcf8b6e Clean out a few warnings on potential resource leakage 2013-09-21 15:32:52 +08:00
Daan Hoogland
2614b00c51 sdn hosted vpc gateways (using lswitch) 2013-09-18 16:56:56 +02:00
Donal Lafferty
e958f22ff3 CIFS support for secondary storage is documented here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/CIFS+Support
It was implemented by extending the NFS provider. Its validation was updated so that you can pass it a URL containing the
details of a CIFS share.  The code that mounts NFS shares was extended to allow it do the same for CIFS shares.  Otherwise,
the secondary storage code is left unchanged.
2013-09-11 14:23:29 +05:30
Alex Huang
8f556e6d88 Made changes to configuration. Eliminated ConfigValue and only use ConfigKey 2013-09-06 15:40:38 -07:00
Alex Huang
b8e79c30a8 Compile complete 2013-09-06 15:40:37 -07:00
Alex Huang
5b439f0748 Revert "Revert "Added missing files""
This reverts commit 48053001fb2303d4acfb77d23fe3733941e83781.
2013-09-06 15:40:35 -07:00
Alex Huang
06493d5b5c Revert "Added missing files"
This reverts commit a1dfc227e895d724f68c0206643825b3ba43116c.
2013-09-06 15:40:35 -07:00
Alex Huang
375eadd3d3 Added missing files 2013-09-06 15:40:34 -07:00
Alex Huang
435e74e914 Commit to try something on removing getZone 2013-09-06 15:40:33 -07:00
Daan Hoogland
d9c06e538b CLOUDSTACK-4346 replace URI getHost() and create(String) calls with BroadcastDomainType methods 2013-09-01 22:53:23 +02:00