Implement IP address allocation.

This fixes bug 1008029.

The allocation is done as follows (according to the value of
port['fixed_ips']):
- api_router.ATTR_NOT_SPECIFIED - Quantum will generate an IP address.
If a v4 subnet is defined then a v4 address will be generated. If
a v6 subnet is defined then a v6 address will be generated. If both are
defined then both v4 and v6 addresses will be generated.
- user configuration which may contain a list of the following:
   - ip_address - the specific IP address will be generated
   - subnet_id - an IP address from the subnet will be generated

Change-Id: I3bb1b83b8824364b37dbecfa140331c4a1fd2762
Cisco's unplug_iface refers to non existing exception

Bug #1006226

An extra exception,InvalidDetach has been added to cisco_exception.py and
unplug_iface has been redirected to this exception

Change-Id: I5d1e4070fd0cb60a973e55e5645509aef58e8083
Use setuptools git plugin for file inclusion.

Fixes bug 1018833. We're looking at this as a possible pan-project
option instead of manual MANIFEST.in inclusion and then looking for
where the tarballs differ.

Change-Id: I25287d5aca2046c6b613b05d54281533bdd6f79f
Ensure that subnet_id is on correct network.

Fixes bug 1019759.

Change-Id: I7a732ebf404c6fddaf6f06798411adbadd8ebb3f
Check if interface exists in bridge prior to adding.

This fixes bug 1019730. The fix for bug 1000406 ensures that return
values of shell commands are checked. The command
    utils.execute(['brctl', 'addif', bridge_name, interface],
                   root_helper=self.root_helper)
would cause an exception if there was more than one attachment
on the network. The reason for this was the interface already existed
on the bridge.

Change-Id: I8a1f6cc7be930c04ce302d7f87814b9bd5bed129
OVS plugin support for v2 Quantum API

blueprint: ovs-api-v2-support

This commit allows the ovs_quantum_plugin to work with the v2 api.

change-Id: I9e332a799f6bee8a90755f961fbb9711a1ecdaca
Merge "Check if interface exists in bridge prior to adding."
Merge "Ensure that subnet_id is on correct network."
v2 support for the linux bridge plugin

blueprint lb-api-v2-support

Plugin support for the linuxbridge using the v2 API

1. The core_plugin in quantum.conf must be set to:
quantum.plugins.linuxbridge.LinuxBridgePluginV2.LinuxBridgePluginV2
2. By default the agent is v2. A configuration file entry 'target_v2_api'
in the section 'AGENT' can be set as False to support v1.

Change-Id: I2e196859c13b28e535c6ec394ec3f5bc907bf019
Fix linux bridge plugin to be consistent with naming rules

Fixes bug 1020468

Change-Id: I4a84e6c89c450032a791b9f91bc5e4dac6c9f647
Delete IP allocation range for subnet when deleting subnet

Fixes bug 1020563

Change-Id: I034e490825603ab71662a0bbad9b325f419a9e43
Add 'allocation_pools' to Quantum v2 API subnets.

This changeset adds a new parameter, 'allocation_pools' to the 'subnet'
resource of the Quantum v2 API.
Allows for creating and validation of subnets with multiple allocation pools.
This commit only deals with POST verb (subnet creation).
PUT verb (subnet update) will be dealt with in a subsequent commit.

This is the first commit for fixing bug #1016308

Change-Id: Ic356dcb5dcfa46af8ecc7e598529881f8bcbbeed
Address problems with foreign keys with subnet and network deletion

This also fixes bug 1020879 and bug 1020847

Change-Id: Ib68f9357ed65f35e56d17577b83fabe8f96388cf
Verify CIDR overlaps among networks' subnets.

Make sure CIDR for subnets in a given network do not overlap each other.

Fixes bug 1021106

Change-Id: I212a734ad59bbba86876d372a2f559f21ac60835