NSX: Avoid floating IP status reset

The method for setting the floating IP status in the NSX plugin
has a flaw that causes in some cases the status to be reset.
This patch removes this bug and also protects against regression
adding status check in the unit test covering floating ip
creation.

This patch also moves the above mentioned unit test in a more
suitable place in the test same module.

Change-Id: Ib08c421ade20ce23b5c08145203a2df6a8f3efa5
Closes-Bug: #1357514
Send HTTP exceptions in the format expected by neutronclient

Neutron client for the v2 API expects exceptions to have 'type',
'message' and 'detail' attributes. That is why they need to be
included in the body of HTTP Exceptions.

Change-Id: I70bd47977e42ad7bac760600329e9440452b74bc
Closes-Bug: 1355902
Reorder operations in create_vip

Previously VIP's port creation was moved outside the transaction
to avoid deadlocks related to rpc calls.
It led to small chance of VIP being fetched by rpc code with
port being still None.

This patch reorders VIP association with the pool so it's done
only after port has been created.

This patch also leaves small possibility of uncaught exception in
case of pool being concurrently deleted in the process of VIP creation

Change-Id: I584558aecc92db4d19fb72b1d006868b840a4d8c
Closes-Bug: #1356227
Set InnoDB engine for all existing tables

Added the method in heal script that checks if mysql_engine
parameter is needed to be changed and if it is neseccary do this.
Also this change adds migation that set 'mysql_engine' to InnoDB
for all tables that were added into the database after healing.

Closes-bug: #1346966

Change-Id: Ia4d9038b99b2559d37272a17f5819a9dedd53f72
Fix migration set_length_of_description_field_metering

If PostgreSQL version is less than 9.1.13 migration
set_length_of_description_field_metering fails as there is no
special 'create if not exist' expression. This change add special
function for this case.

Closes-bug: #1348138

Change-Id: Ibe4f370fe400072abd281bd2313261790335eae2
Remove invalid or useless initialization in test_type_vxlan

In test_type_vxlan, vni_ranges option is overriden with an invalid and unused
value, vxlan_group is overrriden but never used.

Change-Id: Ie1ce1d7a8ef54692d122276e371ec5efc2e68d9c
Ensure ip6tables are used only if ipv6 is enabled in kernel

On systems where ipv6 module is not loaded in kernel we need to avoid
usage of ip6tables. This patch reads
/proc/sys/net/ipv6/conf/default/disable_ipv6 file and if ipv6 is
disabled then ip6tables are not used in IptablesManager

Closes-Bug: #1352893

Change-Id: I07e5851aa25eb98b7a97dff86b9850475df85f64
Implements securitygroup extension for nuage plugin

In Nuage VSP, the scope of vport-tag(Neutron securitygroup equivalent) is either
per router or per subnet whereas securitygroup scope in Neutron is per tenant.
Because of this, the mapping between neutron and VSP resource always happens at
the port create or update time, such that port's router/subnet is known and
thus sg attachment point in VSP is known.
On port-update --security-group sg1, if this is the first port getting attached
to that security-group, corresponding vport-tag(for sg) and rules( for sg rules)
are created on VSP. Subsequent port-update for the same sg1 will just update the
port to vport-tag binding. When security-group and security-group-rules are
deleted on neutron, corresponding vport-tag and rules are deleted on the VSP.

Implements: blueprint securitygroup-ext-for-nuage-plugin

Change-Id: If6f7f16ad727ae9394008fb81b56c785c2404c8f
Support Stateful and Stateless DHCPv6 by dnsmasq

* This patch adds support for subnets created with 'ipv6_address_mode'
  set to 'dhcpv6-stateful' or 'dhcpv6-stateless' by dnsmasq.
* If no dnsmasq process for subnet's network is launched, Neutron
  will launch new dnsmasq process on subnet's dhcp port in 'qdhcp-'
  namespace. If previous dnsmasq process is already launched,
  restart dnsmasq with new configuration.
* Neutron will update dnsmasq process and restart it when subnet
  gets updated.
* This patch enforces the version check of dnsmasq. dhcp-agent will
  fail to start if version of dnsmasq<2.63.

DocImpact
UpgradeImpact
Blueprint dnsmasq-ipv6-dhcpv6-stateful
Blueprint dnsmasq-ipv6-dhcpv6-stateless

Change-Id: I30e9950bbc5a89f01ccb9c561471f155a9fd1d11
A10 Networks LBaaS v1 Driver

Change-Id: I32438c33ea28031c0d600e2a9266580e52dfbf54
Implements: blueprint a10networks-lbaas-driver
Fixes Hyper-V issue due to ML2 RPC versioning

The ML2 RPC version 1.1 breaks the hyper-v agent and
consequentially the RPC version in the Hyper-V agent needs
to be set to 1.1 to match the ML2 RPC base API version.

Change-Id: Idc4ae8d7dcff4331aca148a8f2a7a2b01679b3a8
Closes-Bug: #1353697
Join tables in query for down L3 agents

Join the agent table together with the L3 agent scheduler
table. This fixes an issue where the query would return
all admin_state_up L3 agents with router bindings when
any agent in the database was dead (missed heartbeats)
instead of just returning the dead L3 agents with bindings.

Closes-Bug: #1359460
Change-Id: I29215f81be7e3513155faaad015e24dbf1a1ad5d
Merge "Ensure ip6tables are used only if ipv6 is enabled in kernel"
Merge "A10 Networks LBaaS v1 Driver"
Merge "Fixes Hyper-V issue due to ML2 RPC versioning"
Merge "NSX: Avoid floating IP status reset"
Refresh rpc_backend values in unit tests to those from oslo.messaging

Though old values are supported via compatibility transport aliases [1],
it's better to stick to those values that are officially supported by
oslo.messaging.

[1]: neutron/common/rpc.py:TRANSPORT_ALIASES

blueprint oslo-messaging

Change-Id: I7bc03e323151cfdda2cb2bc4cd6f5aea9b87a746
Merge "Join tables in query for down L3 agents"
ML2 Type driver refactor part 1

This commit moves segment management from the ML2 plugin to
the type manager in preparation for dynamic segment support.

Partially implements: Blueprint ml2-type-driver-refactor

Change-Id: I068b82369250d115ef91680f19e733ed9aa4659b
Merge "Remove invalid or useless initialization in test_type_vxlan"