Remove unnecessary call to get_dhcp_port from DeviceManager

Change-Id: I35459c352e712ea009589f3050205a4c307b909a
Closes-Bug: #1263217
Add extraroute_db support for Cisco N1kv Plugin

Adding extraroute_db support for router
scheduling functionality in Cisco N1kv Plugin.

Change-Id: I2b9082fc820114a9b10148be08021e5d4b5e5043
Closes-Bug: #1287437
Remove legacy quantum config path

partially implements bp quantum-clean-up
Change-Id: Ifd876320a82991fb532988b9cdcecefde36ff378
Validate multicast ip range in Cisco N1kv Plugin

Do the validation of multicast ip range in Cisco N1kv Plugin and send
appropriate parameters to VSM.

Change-Id: Iaa1288d8a6deb2a2f32b263d4556dde8938d75f5
Closes-Bug: #1282754
Delete duplicate internal devices in router namespace

When neutron router-interface-delete <router> <subnet> is ran
during L3-agent restart, the agent may fail to delete the old
internal device. After the restart, when the command "neutron
router-interface-add <router> <subnet>" is ran again, the
router ends up having two internal devices configured with the
same IP address.

Closes-Bug: #1244853
Change-Id: I0d7e2db6aa7dae26d0fc3fe1b1527762cb1e3b23
Reset the policy after loading extensions

The loading of extensions might impact how rules are interpreted in the
policies; for instance, the external-net extension specifies how to
convert the router:external field of a network (to a boolean). So we
need to make sure that the policy is recreated afterwards.

We also need to fix a unit test that assumes that the policy is loaded.

Change-Id: Ifde13323b1435fc84c6cb24ab6a71de5d67f6b9f
Closes-Bug: #1280738
ML2 mechanism driver access to binding details

The following properties are added to the PortContext object passed to
ML2 mechanism drivers for port operations:

* bound_driver - name of current bound driver
* original_bound_driver - name previously bound driver in an update
* original_bound_segment - network segment used in previous binding

Some issues with the existing ML2 port binding unit tests were also
fixed.

The remainder of the fix for bug 1276395, making these binding details
available to mechanism drivers when a port is deleted, will be
addressed as part of the fix for bug 1276391.

Partial-Bug: #1276395
Change-Id: I9ecff4a4e044920ed2dde709c89aeb9bc773220d
Developer documentation

* Turns TESTING into a rst file, that we include in the developer
  documentation, for instructions on how to run the unit tests.
* Link to a Vagrant project that sets up Neutron inside a VM.
* Adds a section for how to debug with Nose
* Add new section for Neutron Internals
* Neutron L2 Agent documentation - currently only OVS
* Make the Security Group API extension an example of how an API
  extension is implemented

Implements bp developer-documentation

Change-Id: I9b452abc9da3b1a41ae65cff727967de0eab12fe
Fix DetachedInstanceError for Agent instance

The stacktrace observed seems to hint to a
situation where a session is not properly
rolled back when duplicate agent entries are
found.

Since it is ok to deal with duplicates, the
addition of agents to the DB must be done
one by one, otherwise we go against the
ATOMICITY property of a transaction of all
or none. It's either that or I am barking at
the wrong tree.

This patch also added UT to cover affected
code.

Closes-bug: 1282421
Related-bug: 1282253

Change-Id: Ic5f77808cc10f885d67f5a9cf3b3836283692850
ovs-agent: use hexadecimal IP address in tunnel port name

The remote IP address is used to form the tunnel port name when
the ovs-agent is used with the ML2 plugin. With some OVS/Linux
combinations there is a 15 character limit on port names, so a
name like 'gre-192.168.10.10' does not work. This fix uses the
shorter hexadecimal representation of the IP address instead.

Change-Id: I58caf54219130159525b5a6492eaa451062c2ff5
Closes-Bug: 1281098
N1kv: Fixes fields argument not None

N1kv plugin includes 'fields' in call to get_<resource> function in
superclass. This can trigger errors if other fields are used in the
subsequent processing in the N1kv plugin's own get_<resource>
function.

Change-Id: I63687a830579a178c6daaa2b8f71bef7eb53d584
Closes-bug: #1285289
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
NSX: nicira_models should import model_base directly

Change-Id: I49bdf72434384899d12aa6c528f8d31125a3b34e
Closes-bug: #1282354
Remove unused method update_fixed_ip_lease_expiration

This should have been log removed here:
	Ifcb4f093c92904ceb896438987d53e692eb7fb26

Change-Id: I9395fea531365b82a0cd16f29d6392199e2d9c22
Closes-bug: #1287407
NVP LBaaS: check for association before deleting health monitor

    Bug #1243129 suggests to check for associations before deleting
health monitor in DB logic, so NVP advanced LBaaS should also Change
its operations when deleting a healthmonitor.

Change-Id: I57677cc4b65a13df9f72ec689f34771c7af6a57e
Closes-Bug: #1254639
Refactor netns.execute so that it is not necessary to check namespace

I saw some code in a couple of reviews today that check whether a
namespace is set and run it under "ip netns exec ..." if it is.
Otherwise, it runs the command without it in the default namespace.

Change-Id: I55e8f4f3523ec7a7c5a6f082addf918952a05741
Closes-Bug: #1287524
NSX: passing wrong security_group id mapping to nsx backend

When the async secgroup work was added the update_port() code was not changed
to pass in the nsx security_group uuids. This patch fixes that so that the
nsx uuids are passed in instead of neutron.

Closes-bug: #1287419

Change-Id: I1a075564f2548764de15b85b2970b5f360412eb2
Check vxlan enablement via modinfo

On some linux distribution, for RHEL 6.5 as an example, vxlan is
enabled but the kernel version is still 2.6. And some linux kernel
version is higher than 3.8 or even 3.11, its vxlan mod may be
disabled. Under both situation, vxlan enablement checking via linux
kernel version may not be correct.

In this patch, we check vxlan enablement via modinfo: if vxlan module
exists and functional test pass, vxlan is enabled.

Closes-Bug: #1267682

Change-Id: Id52c04b4739d2d11fe52d4b1631cb4f39e6b577f
Replaces network:* strings by constants

This patch replaces all occurences of the strings
prefixed by network:* by their constant equivalent.

Closes-bug: #1270863
Change-Id: I149cc0ab7bde08ea83057e6c0697f668edbe29db
Add OpenDaylight ML2 MechanismDriver

This commit adds support for OpenDaylight as an ML2 MechanismDriver. The
ODL MechanismDriver does not need an agent since ODL itself handles
programming bridges, tunnels, and ports on the host.

Implements bp ml2-opendaylight-mechanism-driver

Change-Id: Ic1612cd3e8efd39e74a7ed8cff28e91b1f388971