PVLAN: Add pvlan in createNetworkCommand
Implement PVLAN on Xen

Start/stop vm/dhcp server are done. Not done with VM migration.

A new command(PvlanSetupCommand) is sent for setting up PVLAN for vms. Currently
it's focus on OVS implementation. Need to be more abstruct and add vSwitch part.
PVLAN: Simplify OVS policy

We can resubmit the packet against the flow table to get simplier result.

Now we don't need to check if VM is in the same host as DHCP server or not.
PVLAN: Remove bridge parameter in PvlanSetupCommand

Bridge is hypervisor dependent, shouldn't appear in PvlanSetupCommand.
PVLAN: Add network label parameter to PvlanSetupCommand

We need it to find the real bridge/switch to program on the OVS.
PVLAN: PvlanSetupCommand for KVM support
PVLAN: Fix KVM ovs driver cannot get vlan id issue
CLOUDSTACK-2348: PVLAN - UI - infrastructure menu - create guest network - add new field Private VLAN ID.
PVLAN: Optimize pvlan scripts
CLOUDSTACK-2348: PVLAN - UI - Infrastructure menu - guest network - add broadcast URI field to listView and detailView.
CLOUDSTACK-2392: Not allow create pvlan network with ipv6
PVLAN: Add integration test
Fixed applyLbRules for Netscaler.
CLOUDSTACK-747: internalLb in VPC - UI - create tier dialog - only one tier is allowed to have PublicLb in a VPC.
CLOUDSTACK-2486: Deleting the host_details and inserting them back can lead to mysql deadlock

- Instead of using separate delete and insert, we will use ON DUPLICATE KEY UPDATE to avoid the MySQL deadlock
CLOUDSTACK-2486: Deleting the host_details and inserting them back can lead to mysql deadlock

- Added the index found missing after upgrade

Contained in branches: master
Contained in no tag
CLOUDSTACK-2486: Deleting the host_details and inserting them back can lead to mysql deadlock

- Changing the correct details dao. Instead of using separate delete and insert, we will use ON DUPLICATE KEY UPDATE to avoid the MySQL deadlock
CLOUDSTACK-2517: fixed private gateway creation. Following fixes went in:

1) Only PrivateNetworkGuru handles network creation for the private gateway. Exluded Guest Network Guru from this list (was mistakenly included as a part of merge for Nicira integration)
2) Pass vpc_id to createNetwork call when the network is created as a part of private gateway creation
3) Fixed VPC restart when there are multiple private gateways present (have to grab all the private gateways when creating nic profiles for the VPC router that is being re-created)
4) 41-42 db upgarde: set vpc_id for the private networks of the existing VPCs
CLOUDSTACK-2519: VMs on local storage incorrectly destroyed when removing another host using deleteHost API

- For DeleteHost API: Search for Volumes in READY state on the local storage of the host to find VM's in 'Running' State
- For PrepareForMaintenance API: Search for Volumes not in Destroy or Expunging state to check if the Local Storage on the host is being used.
CLOUDSTACK-2522: While processing agents behind on ping, we may fail to process a host that is already in 'Down' state

Changes:
- Added a transition for DOWN -> DOWN state on PING TIMEOUT so that transition will set mgmt_server_id in the host table to null.