Delete subnet fails if assoc port has IPs from another subnet

This change fixes the following failure scenario:
- Create a network
- Create two subnets on the network
- Create a port on the network using one of the subnets
- Delete the other subnet
= = = > FAILURE: Subnet delete fails because supposedly there
is/are port(s) still associated with that subnet.

The problem addressed is that delete_subnet() in
neutron/db/db_base_plugin.py is checking for port(s) still being
associated with the subnet's network, not the subnet itself.

Change-Id: I7adbe18cce412135b2e42dcb7c592e60c1ec5f8f
Closes-Bug: #1281694
Log configuration values for OFA agent

When other agents start up, they log the configuration values
to their logs. This patch adds the same feature to the
Openflow agent.

fixes bug 1289139

Change-Id: Ibab20154805a12ec265a2499cbfd6c376c376130
NSX plugin: return 400 for invalid gw certificate

Gateway certificates are validated by the NSX backend.
The code currently treats a failure in certification
validation as a backend failure and therefore returns
a 500 status code.

This patch changes this behaviour by returning a 400
status code and an appropriate error description.
To this aim a handler for 400 errors has been added to
the NSX API client.

Closes-Bug: #1293508

Change-Id: I196f14337e47cd40710a6d8a30bbe1cac5ffe05b
Add unit test for add_vxlan in test_linux_ip_lib

This patch adds unit tests for the add_vxlan function in the test_linux_ip_lib.py
file.

Fixes bug: 1291974

Change-Id: I0238bedab7a3566aff1115a091ada494a01d2e02
Synced rpc and gettextutils modules from oslo-incubator

The main reason for sync is to get the following oslo-rpc fixes in Neutron:
* I537015f452eb770acba41fdedfe221628f52a920 (reduces delays when reconnecting
  to Qpid in HA deployments)
* Ia148baa6e1ec632789ac3621c85173c2c16f3918 (fixed HA failover, Qpid part)
* I67923cb024bbd143edc8edccf35b9b400df31eb3 (fixed HA failover, RabbitMQ part)

Latest oslo-incubator commit at the moment of sync:
* 2eab986ef3c43f8d1e25065e3cbc1307860c25c7

Change-Id: I2f5bb0d195e050f755ecdbf06a6bbed587a04fbe
Closes-Bug: 1281148
Closes-Bug: 1261631
Disable XML tests on Py26

Unit testing on Py26 takes too long to run.  The code paths are the
same, so we'll temporarily skip tests is the class contains XML
formating since duplicate full stack JSON tests are run.

Change-Id: Ie8eddfe0b6af39f32380ce532e0c26acc0a6596d
Related-Bug: 1295281
Open Juno development

Bump preversion to 2014.2 to formally open Juno development.
The Icehouse release branch (milestone-proposed) will be cut
from the last commit before this one.

Change-Id: I0af1ee46e65149eb19731491242ddc2fdccd7a2e
Fix namespace exist() method

Fix namespace exist() method for it shall not be called with a root.
Also, don't run it under the namespace so garbage_collect_namespace
method can run without rootwrap and not withi a ns.

As a result of fixing namespace listing the patch also fixes the
regression introduced (bug/1294603) to loadbalancer agent respawning
haproxy due to inability to list namespaces properly.

Change-Id: I0dc4d01b0c1c04887ec6ad5766ec7c6c96903faa
Closes-Bug: #1297594
Closes-Bug: #1294603
UT: do not hide an original error in test resource ctxtmgr

In unit tests, resource contextmanagers such as network(), subnet()
try to delete themselves after returning from yield even if an
exception occurs. However when an exception occurs, there is a case
where deletion fails. In this case original exception will be hidden
and it makes difficult to debug test failures.

Before each test starts, resources like database entries will be
recreated, so there is no need to try to delete resources even
when an exception occurs. This commit removes try-finally clause
from resource contextmanagers to make original errors visible.

Closes-Bug: #1295887
Change-Id: Ia844d2aa2c9fc036e643068c5284f64798963ee3
Delete duplicate external devices in router namespace

When a router's gateway is removed during L3-agent restart, the agent
will fail to delete the old external device.  This device should be
identified and removed as soon as possible.

Change-Id: Ifd3e6ca009242138bea4a098e3fde258aeaa391e
Closes-Bug: #1298658
Cancelling thread start while unit tests running

This change modifies the Radware driver and its unit testing code
to not start operations completion thread while unit tests are running.

The driver initialization changed not to start the operations completion thread,
the thread is started only when operation completion item is inserted into the queue
for the first time.
The operation completion functionality was moved to a new function which
is called by the operations completion thread run() function.
The run() function still have the functionality of popping operation completion
items out of the queue and push failed items back.

Unit testing code mocks the operation completion items queue
by calling the operations completion hanler new function when item
is added.

Start() and join() functions of the thread were mocked to do nothing.

All sleep() entrances were removed from the unit testing code.
All unnecessary mock_reset() calls were removed.

Change-Id: I72380bf223be690831aba1fc29c3dca910245516
Closes-Bug: #1245208
Update BigSwitch Name to its correct name

Update Neutron documentation and code comments to replace
"BigSwitch" name to "Big Switch"

Closes-Bug: #1299145
Change-Id: I7c14f6170871b361c8929898ee6af5d1a1f41714
Move test_ovs_lib to tests/unit/agent/linux

Fixes bug 1295846

Change-Id: Ifd3576e9b549361a4baf9cfc2b9301bb45789474
Add missing parameters for port creation

Recent API changes in N1KV controller require parameters such as
subnet id and IP address to handle port creation successfully.
Without these mandatory paramters, the REST call fails.
This patch addresses that by passing in the missing parameters
in the REST body.

Change-Id: I4cec6868051f492b9d1245ab201ff6c1a0837848
Closes-Bug: #1290561
Merge "Fix namespace exist() method"
Merge "Disable XML tests on Py26"
Invoke _process_l3_create within plugin session

_process_l3_create should be invoked with a plugin session, else
externalnetworks table is not populated for networks with
router:external=True. Added the missing plugin session.

Change-Id: I09c49dea9474f91a70aef829c1596fbb9089d6cf
Closes-Bug: #1299946
Merge "UT: do not hide an original error in test resource ctxtmgr"
Imported Translations from Transifex

Change-Id: I3039f6c62ac35200b47f9e73760f9ef33dd5efee
Merge "Add missing parameters for port creation"