CLOUDSTACK-2554: CloudStack fails to load XCP 1.6 hypervisors

Missing default constructor fails the agent manager reloading the XCP
resource on reboot of management server. This is fixed by using the
default constructor as do other Xen resources and include a new resource
ala XenServers for XCP1.6.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Fixing multiple minor annoyances:

1. Keeping the description consistent - Memory not RAM when referring to
overcommit
2. getters And setters grouped, provided right casing.
3. Removed wildcard imports

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
CLOUDSTACK-2554: Ensuring that we honor hypervisor xen's memory constraints

When setting memory constraints on Xen guests we should honor:
static-min <= dynamic-min <= dynamic-max <= static-max

Our VmSpec while allows the guests to like between dynamic-min and
dynamic-max the memory set by the resource set the static min to be
equal to the dynamic max. This restricts the hypervisor from ensuring
optimized memory handling of guests.

see: http://wiki.xen.org/wiki/XCP_FAQ_Dynamic_Memory_Control#How_does_XCP_choose_targets_for_guests_in_dynamic_range_mode.3F

Another fix was related the restrict_dmc option. when enabled (true)
this option disallows scaling a vm. The logic was reverse handled
allowing scaling when restrict_dmc was on. This control flow is now
fixed.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
CLOUDSTACK-2554: Incorrect compute of minmemory and cpu

23e54bb0 introduced multiple hypervisors support for cpu and memory
overcommit. Here the HypervisorGuru base which determines the min, max
range for the memory for all hypervisors computes the minCpu using the
MemoryOverCommit ratio and minMemory using the CpuOverCommit ratio.

Minor typo/logic issue but massive damage across all HV if enabled ;)

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
CLOUDSTACK-1871 : domainId parameter to uploadVolume not working

1. Remove duplicated lines for setting domainId.
2. Set domainId with owner's domain if the owner is specified.
CLOUDSTACK-1901 : API:MS: DeleteEvents deletes Archived events as well
CLOUDSTACK-2297 : Delete Account/Domain is not updating the resources usage of the parent domain
CLOUDSTACK-2576. AWS API not returning values in CFSimpleXML Object format.
PHP SDK calls the CFSimpleXML parser class to parse the response body into CFSimpleXML Object format.
In AWSAPI added an XML declaration during serialization of Axis beans to XML output
CLOUDSTACK-2287: Tests for the LDAP system

API tests for the LDAP config/remove commands

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
CLOUDSTACK-2085: DMC enable guest scaling

When dmc is enabled allow cloudstack to scale the VM between dynamic
ranges. This requires a further commit where there is enough memory
available between dynamic-max and static-max for the VM to scale under
memory pressure. See the TODO in Xenserver56FP1Resource.java

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Detect the second zone for copyImage operation

When copying templates and ISOs detect that a second zone is available.
Else skip the test.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
migrate only when hosts are available

Identify the hosts that are suitable for migration before proceeding
with migrateVM

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
LDAP moved to regression suite.

LDAP requires a Directory server which isn't available by default in
most environments. Moving this to the regression suite so it can be run
on demand.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
CLOUDSTACK-2553: Made ACL item action case-insensitive
CLOUDSTACK-2379: Fix for issue destroy vm causing NPE. Made the following changes.
1. Made a fix to make sure a null object is added to the exception.
2. Also fixed the marvin test cases for the feature. Account cleanup will remove the vms deployed for the account. There is no need to explicitly delete the vms for the account.
3. Fixed the assertion checks for the vm created for an account. If there are multiple vms for an account, the test script needs to compare the ids with the correct instance.
CLOUDSTACK-652: meging 'portable public ip' feature

Squashed commit of the following:

commit f244f9ce7982db16984dd87c31545f1c0240c704
Merge: 993cbb0 f5c8e38
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 20 18:54:05 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java

commit 993cbb0df9fa6e64b96b18ed775b73cdf4a8f5d7
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 20 18:49:54 2013 +0530

    introduce 'transferPortableIP' interface method in network manger. This
    method will transfer association of portable ip from one network to
    another network.

commit 0c1c2652c1b39e9a81ca35464360e11ed9ef23f1
Merge: a718d35 a29e393
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Fri May 17 02:48:54 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	utils/src/com/cloud/utils/net/NetUtils.java

commit a718d353f7acf0328d928673df6f22de1abc0acb
Merge: ecca117 c211818
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 21:22:19 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	api/src/org/apache/cloudstack/api/ResponseGenerator.java
    	server/src/com/cloud/api/ApiResponseHelper.java
    	server/src/com/cloud/network/NetworkServiceImpl.java
    	server/src/com/cloud/network/addr/PublicIp.java
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/com/cloud/network/MockNetworkManagerImpl.java
    	server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
    	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
    	setup/db/db/schema-410to420.sql

commit ecca117e345224059297f5c1ffa0f442209b3160
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 20:05:29 2013 +0530

    added integration tests for testing portable ip ranges

commit 895a27c2771dbb497ecc6fe0d212589f012a48d8
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 15:12:19 2013 +0530

    - establish model for transferring portable IP association from a network
      with which it is associated to another network.

    - enabling static nat api, extended to transfer potrtable IP across the
      networks if the VM/network is different from the current associate
      network of the portable ip

commit 51509751b290c0e51cbdd104a9aebff189cbe806
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 12:05:33 2013 +0530

    seperate out associate/disassociate with guest network operations from
    alloc and release of portable ip

commit bd058f58c2d8d36ec25e31ed9de4cd414e0ca051
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sun May 12 21:14:48 2013 +0530

    enhance disasociateIPAddr API to release protable IP associated with a
    guest network or VPC

commit 27504d9098729e8c3ac3b33f053f2d66ac2c4401
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sun May 12 16:53:45 2013 +0530

    enhance asociateIPAddr API to acquire a protable IP and associate with a
    guest network or VPC

commit f82c6a8431647114462665c1306c6215cb92afd3
Merge: 3dbfb44 0749013
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 23:32:13 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	api/src/com/cloud/network/IpAddress.java
    	api/src/org/apache/cloudstack/api/ResponseGenerator.java
    	client/tomcatconf/commands.properties.in
    	server/src/com/cloud/api/ApiResponseHelper.java
    	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
    	server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
    	setup/db/db/schema-410to420.sql

commit 3dbfb44eb5b888367375a96b8ae0ac9cf54309a6
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 20:33:19 2013 +0530

    - add 'portable' boolean as property of IpAddress, persist the property in
    IPAddressVO, return the property in IpAddressResponse

    - add ability to request portable IP in associateIpAddress api

commit bf3cb274cfeb1ef41c63794ced83c7c6940f34cc
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 16:08:40 2013 +0530

    add the status of each portable IP (its state, details of associated data
    center/VPC/guest network etc) in the PortableIpRangeResponse returned by
    listPortableIpRanges API

commit e7b2fb22557cb4ef0ce9c8dde3ed1b9c857038bf
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 14:36:01 2013 +0530

    Introdcues notion of 'portable IP' pool at region level.

    Introduces root admin only API's to provision portable ip to a region
       - createPortableIpRange
       - deletePortableIpRange
       - listPortableIpRanges
CLOUDSTACK-2543: [Multiple_IP_Ranges] Failed to create IP alias on router vm
createipAlias.sh/deleteipAlias.sh won't be copied to XenServer host.
The directory of the scripts should be ".." rather "../../.." in all the xenserver patches file.
Corrected the path to ".." because the scripts are located at scripts/vm/hypervisor/xenserver/xenserver56/patch
Fixing TestVMLifeCycle class

Missed the reference to zone listed in setUpClass()

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Fix all occurrences of account.account

Fixes the dereference of account objects with account.account. This is
to conform to recent library changes in Marvin

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Adding package declaration to MidoNetElementTest