CLOUDSTACK-3708, Migration of a volume attached to a running instance isn't working (Storage motion).
The request to migrate was coming till ancient data motion strategy but wasn't worked on and forwarded
to the resource. The code probably got removed by a bad merge. Bringing it back.
CLOUDSTACK-3719: wrong declaration of random_gen call

since random_gen can take an id to prepend a testcase identifier to the
created cloud resource, we need to explicitly specify the size param. In
vmsnapshot test create the random_data string of size (100)

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 5bb3a56acac440b022ed6c45f97d0d85dcc94b96)
CLOUDSTACK-3546, CLOUDSTACK-3548, CLOUDSTACK-3549
CLOUDSTACK-3382. Alert should be raised if a vm is migrated from dedicated to non-dedicated resource and vice versa.
Alerts are generated for VM migration between:
1) Source host is dedicated and destination host is not.
2) Source host is not dedicated and destination host is dedicated.
3) Both hosts are dedicated to different accounts/domains
CLOUDSTACK-3728:  same issue as CLOUDSTACK-3719

Make the size explicit parameter to random_gen() for snapshot data

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 874d59847aa6bfd12e6967891a21f1746987b566)
CLOUDSTACK-3678: Multiple fixes to shared network tests

- No need to cleanup offerings as they are lightweight entities
- Cleanup order changed to clean accounts, networks and then the domains

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit c44fa2cc20ca137dd5524c619c32fd49d3382c86)
CLOUDSTACK-3689: Test case test_accounts.TesttemplateHierarchy.test_01_template_hierarchy failed during ListTemplate call.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 6b2c9bf3ae1653693381431ed2554e7b7e4dfae4)
CLOUDSTACK-3526. When volume upload is in progress the state of the volume is UploadError.
Update volume_view to join volumes table with volume_store_ref table instead of volume_host_ref table.
CLOUDSTACK-3727: Resource Count calculation happens for deleted accounts on restart of managment server.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Fixed account objects CLOUDSTACK-3726

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 1cd435e25a36e8737d37edce1bb5da70d9b670c9)
add midterm review
CLOUDSTACK-3734: remove wrong break in 'for' block in VirtualMachineManagerImpl.java
CLOUDSTACK-3724: Test case "test_vpc_vms_deployment.py" failed to find network offering.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit a06b3f40eba6ebc3af5d7c366ec757703a085f67)
CLOUDSTACK-3733: fixed migrateVm - no need to cast vm to user vm to retrieve the iso information. Extract iso information from VirtualMachineProfile object passed to the method.

Conflicts:
	server/src/com/cloud/storage/VolumeManagerImpl.java
CLOUDSTACK-2760: UI > Infrastructure menu > System VMs > fix a bug that Agent State was not mapped correctly between systemVMs and hosts.
Test commit - apache auth
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack
Test commit - apache auth
Automation: Fix enormous missing tearDown() for test cases

This result in countless test case failure because many test case units didn't
clean up after it.

The regression test result should be improved quite a bit after this change.
Automation: Fix typo in test_redundant_network_rules

It result in failed to setUp and clean up.