CLOUDSTACK-1181: Fix Environment so db.properties is in classpath

We export CATALINA_HOME to utils/ which is the path which a lot of utils class would
check and read db.properties file. This is exactly what is done in production.
The utils classes (Transaction, Encryption*Checker etc.) would use PropertiesUtil
which tries to find it in CATALINA_HOME.

The only issue is, even if someone defined an override file, the encryption type
would be still read from the db.properties file. For all other params, the override
file would be re read and datastores would be reinitialized

BUG-ID: CLOUDSTACK-1181

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 23f7267753c3a1b05e61e04b2e8c3f24c54d6975)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
CLOUDSTACK-1181: Find by catalina.home property first

The previous commit fails if a person had defined CATALINA_HOME already.
Instead of system env variable, get any passed variable 'catalina.home' and find
the file in that path.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 44287d20c0c52a57db0c498f7e23793109c920f2)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
CLOUDSTACK-1222: Remove double quotes in upgrade script s/"//g

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 0895c340024ac65edc7a32a70a8fda62c0385a24)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
CLOUDSTACK-1019: Load 4.1-new-db-schema.sql when setting up databases

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec statements

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
CLOUDSTACK-710: mkdir -p destination before scp-ing file in CitrixResourceBase

- Assumption is that mkdir is available on xen host
- We don't know what kind of file we're copying, dirs would have 0777 permission
  by default

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
usage: Add maven target to run usage server

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 1187fb7ed2a9a1669a8b3b4e9742ccfd2ceb2213)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Include the compiled python module, so it will be removed as well when the package is removed
(cherry picked from commit 2f44ed08201e1df9e7a4003058304b1444a522ec)

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
Compileall does not compile single files
(cherry picked from commit 6d952a15ab80480e147359f92c922fa3c5ab150b)

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
Slightly upgraded memory requirements, with 128M the server will crash
after 30 minuted with an OOM on PermGen(cherry picked from commit 1896685d83f88a6fd566697b8e09226fd96a3ac8)

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
CLOUDSTACK-1120 [EC2 Query API] Parameter 'keynames' is not honoured by DescribeKeyPairs

When EC2DesribeKeyPairs is called with filter 'keynames' it ignored the key-name provided and lists all the key-pairs
CLOUDSTACK-1121: [EC2 Query API] RunInstances, instance is always deployed in the default security group

During EC2RunInstances, even if the security group the instance is to be deployed in specified the instance gets deployed in the default security group
CLOUDSTACK-1112 [EC2 Query API] DescribeSnapshots fails, when an invalid 'snapshotId' parameter is provided
CLOUDSTACK-1124 [EC2 Query API] Improve the logging. Having empty response objects is harmless to functionality

This is observed in the awsapi.log for all Describe* EC2 commands when the response object returned by CS has no elements. But with EC2DescribeImages command it is always observed. This is because every time DescribeImage is fired, we call CS listTemplates command multiple times, each time setting a different value for the templateFilter parameter (e.g. featured, executable, community etc.). And for some of these CS calls made we obtain am empty response and hence the message in the logs.
CLOUDSTACK-1136: [EC2 Query API] AssociateAdress, DisassociateAddress and ReleaseAddress fail with NPE

When invalid parameter is provided as input for any of these API's we get an NPE
CLOUDSTACK-1233: Fixed veewee config file legal documentation

The veewee configuration files used for the devcloud base-box build, as
well as the newly introduced files used to create a system vm, were
inappropriately identified as ASLv2 licensed and copyrighted by the ASF.

The fixes:
- The ASF headers stripped to match the source.
- The files are now excluded from RAT checks in the root pom.
- The tools/whisker/descriptor.xml file updated
- The root LICENSE and NOTICE were re-generated

Changes in the Apache Whisker templates for LICENSE and NOTICE files
caused a good bit of whitespace oddness in this commit for those 2
files.

Signed-off-by: Chip Childers <chip.childers@gmail.com>

Conflicts:

	tools/appliance/definitions/systemvmtemplate/base.sh
	tools/appliance/definitions/systemvmtemplate/cleanup.sh
	tools/appliance/definitions/systemvmtemplate/zerodisk.sh
CLOUDSTACK-1206: Change path from /etc/cloud to /etc/cloudstack

Reported-by: Pradeep Soundararajan <pradeep.soundararajan@citrix.com>
maven: don't use process-test-resources lifecycles, target are skipped if test are

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 733ec50d46bf934fe0e83771029d2c5845cd9a97)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
CLOUDSTACK-1241: Network apply rules logic is broken

added logic to check if the network element is configured service
provider for the network before applying rules
CLOUDSTACK-1243: Add @Inject to fix NPE in AccountManagerImpl

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit bd034e0b9f471ca1d0c3a18e135926380dc76e1c)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>