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-1126: [EC2 Query API] RunInstances ignores the UserData input parameter

When EC2RunInstances is called with UserData parameter, the parameter is not propogated to CS
CLOUDSTACK-1127: [EC2 Query API] DescribeSecurityGroups, support for additional filters

Add support for filters ip-permission.group-name and ip-permission.user-id
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>
maven: don't use process-test-resources lifecycles, target are skipped if test are

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>
CLOUDSTACK-1066: Add random password for cloud, fix trailing whitespaces, cleanup isos

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
CLOUDSTACK-1066: Fix FIXMEs, rename script to postinstall.sh

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Don't forget the environment.properties when packaging
(cherry picked from commit 5594b1d622adb07203d4549aee426268ecee092d)

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
CLOUDSTACK-1106: Fix documentation for cloud-setup-databases

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
If filesystem in virtual router is in read-only state, reports error to
commands send to virtual router, instead of keeping silence.

Test:

Before change:
(1) Acquire IP. always in "Allocating" state.
(2) EnableStaticNat, the result is success(it is incorrect).
(3) DisableStaticNat, will get error message.. This is correct.
(4) Add Firewalls. always in "Adding" state.
(5) The AgentManager report statistics every 60 minutes(normally it
should be router.stats.interval=5 minutes).

After change:
(1) Acquire IP, will get error message.
(2) EnableStaticNat, will get error message.
(3) DisableStaticNat, will get error message.
(4) Add Firewalls, will get error message. But the firewall rules are
saved in database.
(5) The AgentManager report statistics every 5 minutes, except the
network with read-only FS virtual router.
CLOUDSTACK-713: Limit Resources(CPU and Memory) to domain/accounts

Addition of two new resource types i.e. CPU and Memory in the existing pool of
resource types.
Added some methods to set the limits on these resources using updateResourceLimit
API command and to get a count using updateResourceCount. Also added calls in the
Virtual machine life cycle to check these limits and to increment/decrement the new
resource types

Resource Name  :: Resource type number
    CPU               8
    Memory            9

Also added Unit Tests for the same.
CLOUDSTACK-1128: [EC2 Query API] DescribeAvailabilityZones, support for message filter

Add message in the response element of EC2DesrcibeAvailibilityZones. Add support for filter 'message'.
The value of 'message' should be set to the allocation_state of the zone
Code cleanup
CLOUDSTACK-1129: [EC2 Query API] DescribeVolumes, add support for filter attachment.status

1. If volume is attached to a VM set attachment state based on the state of the VM it is attached to.
Running, Starting, Stopped -> Attached
Starting -> Attaching
Destroyed, Error -> Detached
2. If volume is not attached to a VM set attachment state as 'detached'
CLOUDSTACK-1125: [EC2 Query API] Permission denied exception when a parameter value contains space

Convert space characters in the parameters to %20 while forming a query string after url-encode because java.net.URLEncoder performs application/x-www-form-urlencoded-type encoding and not percent-encoding. According to RFC 3986 as required by Amazon, we need to percent-encode.
CLOUDSTACK-1131

[EC2 Query API] RunInstances allows negative values for paramters 'MinCount' and 'MaxCount'
Add parameter validation to ensure MinCount is greater than 0 and MaxCount is great than or equal to MinCount
CLOUDSTACK-1133: [EC2 Query API] In StopInstances add support for parameter 'force'

Propagate this parameter to CS to force stop an instance
CLOUDSTACK-1135: [EC2 Query API] AuthorizeSecurityGroupIngress and RevokeSecurityGroupIngress fails when icmp code and type is provided

For AuthorizeSecurityGroupIngress RevokeSecurityGroupIngress query calls parse and set the icmp code and type