122 Commits

Author SHA1 Message Date
Daan Hoogland
62c9343658 compare null to non-null or not-empty-string 2014-01-06 11:28:50 +01:00
Daan Hoogland
b477e4e830 some xtra cases 2013-12-31 12:52:51 +01:00
Daan Hoogland
2cf356e047 isSameIsolationId 2013-12-31 12:25:17 +01:00
Jayapal
07de75191c Revert "CLOUDSTACK-4622:If a VM from guest network is added to network tier of VPC then IP reservation allows the CIDR to be a superset of Network CIDR for that VPC tier"
Reverting this commit as it is breaking vpc deployment, CLOUDSTACK-5652

This reverts commit ab4f095c68d4a4b4fb354b3d95096b193706987d.
2013-12-27 11:15:33 +05:30
Saksham Srivastava
ab4f095c68 CLOUDSTACK-4622:If a VM from guest network is added to network tier of VPC then IP reservation allows the CIDR to be a superset of Network CIDR for that VPC tier
Signed-off-by: Jayapal <jayapal@apache.org>
2013-12-26 16:58:04 +05:30
Min Chen
f420b74890 CLOUDSTACK-5355: addImageStore should not log password in clear text in
the log.
2013-12-03 16:55:26 -08:00
Alex Huang
d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang
224f479974 Removed trailing spaces 2013-11-21 04:08:01 -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
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
323bbccd50 Add unit tests for Transaction 2013-10-17 16:07:11 -07:00
Marcus Sorensen
d430473fe0 add missing license headers to PasswordGeneratorTest.java and an agent.properties 2013-10-14 11:56:21 -06: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
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
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
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
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
Wei Zhou
eb59c3c601 CLOUDSTACK-4314: fix dir error in ProcessUtil.pidCheck and Revert commit 9375aa9467c3855f28c6753d1eb4932a6f1a0e6f 2013-08-14 09:41:13 +02:00
Wei Zhou
9375aa9467 fix build failure with master branch for ProcessUtilTest 2013-08-13 23:22:21 +02:00
Hugo Trippaers
d57796b94f Fix XML validation errors 2013-08-13 08:25:45 +02:00
frank
ed97a03762 add license header to ProcessUtilTest.java 2013-08-12 18:08:20 -07:00
Laszlo Hornyak
f081092b80 ProcessUtil cleanup
- possible resource leak closed
- file content read uses now commons-lang FileUtils
- Added unit tests
2013-08-12 14:50:09 -07:00
John Burwell
1ae682de78 - CLOUDSTACK-3229: Properly serialize the https property to the s3Xen
plugin
  - Extracts the duplicated serializeProperties methods to
    ReflectUtils#flattenProperties
  - Adds unit tests for ReflectUtils#flattenProperties
2013-08-01 00:14:43 -04: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
Prasanna Santhanam
2c5388afac For some reason cat is under /bin on some linuses
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit b8129d6a8e6634f6a101e09d8f0a9620a2379d67)
2013-07-25 19:18:21 +05:30
Laszlo Hornyak
76e283687f test for Script
a unit test for the most frequently used methods in the Script class

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-07-25 16:46:10 +05:30
Min Chen
d423a755f5 CLOUDSTACK-3274: API Refactoring: secretkey and accesskey of the backing
store is found in plaintext in the logs.

Conflicts:
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/api/ApiServlet.java
2013-07-20 18:01:49 -07:00
Alex Huang
b18c72626b Moved the SprintUtils which is for testing only to be in test directory. Changed pom.xml for different projects to use the utils test-jar. Removed some @Component annotations. Moved majority of the dependencies from cloudstack pom to utils pom 2013-07-18 21:53:51 -07:00
Prasanna Santhanam
168fb29d69 add some logging to NioTest
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-19 09:28:16 +05:30
Laszlo Hornyak
c88d8fb3a2 use commons-lang StringUtils
commons-lang is already a transitive dependency of the utils project, which allows removing some duplicated functionality.
This patch replaces StringUtils.join(String, Object...) with it's commons-lang counterpart.
It also replaces calls to String join(Iterable<? extends Object>, String) in cases where an array is already exist and it is only wrapped into a List.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-06-17 19:17:22 +01:00
Laszlo Hornyak
564013bec0 String instantiation is not needed
Removed a String instntiation, test case added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2013-06-17 19:17:22 +01:00
Hugo Trippaers
b0ea02e65a Allow DSA public keys.
DSA can't be used for encryption with the bouncycastle library, so make
sure this situation is properly handled.
2013-06-17 10:04:59 -07:00
Sheng Yang
fbe6b273e3 CLOUDSTACK-1170: Redundant Router: Ensure MACs are same on other than first public nic 2013-06-13 16:05:15 -07:00
Chiradeep Vittal
971c40d98e Fix RAT check broken by a1a68ed0c4b722 2013-06-10 20:38:24 -07:00
Alex Huang
a1a68ed0c4 Review 11752 applied 2013-06-10 16:07:05 -07:00
Saksham Srivastava
5dc7387d3b CLOUDSTACK-1647: IP Reservation should not happen if the guest-vm cidr and network cidr is not same but their start ip and end ip are same.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-06-07 16:54:40 +05:30
Sheng Yang
9c9e2ec9cc PVLAN: Add pvlan in createNetworkCommand 2013-05-01 13:23:08 -07:00
Brian Spindler
469c4dd139 Removing ^M's from code.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-04-04 00:53:20 +05:30
Kelven Yang
3ab744d100 CLOUDSTACK-1795: implement custom AOP to fully support legacy CloudStack AOP semantcis
Signed-off-by: Chip Childers <chip.childers@gmail.com>
2013-03-29 11:12:36 -07:00
Kelven Yang
0b84958a66 Fix an out-dated unit test assertion 2013-03-05 19:47:37 -05:00
Sheng Yang
a0762bc4a7 CLOUDSTACK-1303: Fix NPE when extend vlan with ipv4 only 2013-02-21 18:02:50 -08:00
Min Chen
5147fb16ac CLOUDSTACK-1253: Remove @author tag. 2013-02-15 10:42:06 -08:00
Sheng Yang
fda8ec3c59 IPv6: CLOUDSTACK-1153: Fix integer overflow on IPv6 address calcuation
Use BigInteger, which is 128 bits long.
2013-02-05 17:41:37 -08:00