CLOUDSTACK-4324: need to clean up snapshot_store_ref, if creating snapshot failed.
CLOUDSTACK-4318: clean up snapshot stored in staging area, after backup snapshot to object store
Revert "fix CLOUDSTACK-2989, do not list network offering with specifyvlan=true for non-root-admin user"

This reverts commit 94254e3c2bd38573adac22d0c66817db3cfa1873.

Conflicts:
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java

Regular user should be able to list the network offering with specifyVlan=true. He just can't use when create the network as he is unaware of the physical network topology. But as the admin can create the network on the user's behalf using this kind of offering, so the user should be able to see the offering's details
CLOUDSTACK-4325: if userdispersing algorithm is used, then zone wide storages never been picked up
CLOUDSTACK-4315: add code to clean up libvirt data structure after plug/unplug, that's the only thing I can do to fix this kind of libvirt issue
CLOUDSTACK-4341: UI > zone wizard > call dedicateZone API right after createZone API returns success.
CLOUDSTACK-4302: UI > VM wizard > affinity group step > if selected zone is dedicated, pre-select ExplicitDedication affinity group and make it non-editable.
CLOUDSTACK-4302: UI > affinity group > hide delete action when affinity group type is ExplicitDedication for regular user.
CLOUDSTACK-2583: [Object_Store_Refactor] Failed to create snapshot from
root disk of a guest VM.
CLOUDSTACK-4318:[Object_Store_Refactor] Failed to delete snapshot copied
to Staging storage during snapshot creation.
CLOUDSTACK-4338: catch up exception in case of deleting volume in parallel: it's possible that two threads can delete one volume at the same time, if the volume state is in Expunging
CLOUDSTACK-3594: New affinity group tests

- list all vms in affinity group
- delete an affinity group by id
- admin deletes affinity groups
- list affinity groups as admin
- list affinity groups by accountid/domainid
- list affinity groups by group id
- user deletes his affinity group

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 682e995a4a21e2d74b79bc26513055b913f3545d)
Removed Invalid test from TestRemoveUserFromAccount see -> http://markmail.org/message/vk7wyl3b57cltj44

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 84e81df2a393ee6e6c123583a400dc3e59723680)
Additional tests for custom_hostname

- vm with existing displayname
- change display name post deploy
- deploy with unsupported chars in display name
- vm.instancename.flag = true and deploy vm
- vm.instancename.flag = false and deploy vm

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
CLOUDSTACK-4317 make the regular expressions in dnsmasq.sh more tighter to avoid matching of ip6dns

Signed-off-by: Jayapal <jayapal@apache.org>
uri code per broadcast/isolation type , default is to accept anything as uri , vlan and lswitch need some extra tlc

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
CLOUDSTACK-4308: UI > volume page > if hypervisor is KVM, show/hide takeSnapshot, recurringSnapshot action upon KVMsnapshotenabled property returned by listCapabilities API.
CLOUDSTACK-2989: UI > Networks menu > Add Isolated Network dialog > network offering dropdown > populate network offerings whose specifyvlan=false to normal user.
CLOUDSTACK-4287: Template sync should remove template_store_ref entry
for corrupted template.
CLOUDSTACK-4277:listTemplate should return empty list without any zone
configuration.