Reduce plugin accesses from policy engine

Bug 1179745

This patch introduces a new type of check whose aim is to fetch
the parent resource's owner only when a rule that explicitly needs
it needs to be checked.

Change-Id: I1ff429eb3f92b35bcb9b4c4e01b65f8c0a595f48
xenapi: fix rootwrap

The xenapi root wrapper did not parse the "exec_dirs" parameter, so it
failed to execute the commands. This patch works around this problem by
parsing the "exec_dirs".

Fixes bug 1185872

Change-Id: I10175c7df5d34e47eb6044711ffbe4fe4cee3ce2
Handle portinfo msg after port deletion in NEC plugin

Fixes bug 1187701

Change-Id: I9c5ef3320ad6e9438dca9ccccf27f4cedfe4ceec
Expose most common QueuePoll parameters from SQLAlchemy

Fixes bug 1160442

The defualt parameters are used unless otherwise configured. This
is applicable for:
 - pool_size
 - max_overflow
 - pool_timeout

By increasing the pool_size and the max_overflow and lowering the timeout
the issue reported in the bug is resolved.

NOTE: the configuration values enable the user to make use of the default
QueuePool tuning values.

Change-Id: Ic258442531a2caf2db4f05c4ddd6fbfb0c180f17
Add support for protocol numbers

This patch adds support for passing in protocol numbers into the API.
For example, 1 instead of ICMP. This allows all protocols besides
just TCP/UDP/ICMP to be used. This patch includes changes to support
this for the NVP Plugin. Existing plugins using securitygroups_rpc_base
and OVSHybridIptablesFirewallDriver require no change to leverage this.

Implements blueprint security-group-rules-protocol-numbers

Change-Id: I7d3b6986d9d0dadbefac0ea7798475a573dac046
Adds support for the Indigo Virtual Switch (IVS)

Implements: blueprint ivs-interface-driver

Adds the IVS VIF type to portbindings.py.
Adds the VIF interface class to allow agents to bind to VIF switches.
Adds support to the BigSwitch plugin to request the IVS VIF type on nova compute nodes.
Adds unit tests for new interface class and changes to BigSwitch plugin.

Change-Id: I2fe104000523c60097c22946b0a80dc404dfe273
nicira plugin: load subnet once when adding router interface

Bug 1188562

This patch ensure subnet is loaded only once from the database.
Also, the port is now loaded from the database only if the
corresponding NVP logical port is found.

Change-Id: I1626c7b61ddc8e785d8ce2e39619da78b20ae61e
Imported Translations from Transifex

Change-Id: I05ca2810f548379c4a2201c8d761904b8bec0ff5
Improve test coverage in NEC plugin

blueprint nec-plugin-test-coverage

This commit adds the following changes in unit tests.
- Unit tests to check communications with the controller in NEC plugin
- Unit tests for nec plugin agent
- Improve coverage of OFC drivers
- Mock the client to talk with the external controller in db.

Change-Id: I2b9ab0480da312ea5e804ca04b543cc144b7e545
Nicira plugin: always fetch lports from correct lswitch

Bug 1188652

Remove get_logical_port_status which required a lswitch uuid, and
replace it with a call to query_lswitch_ports, which does not
require it.

Change-Id: I6c7d0403f37b2c9fb4332a8d34dcaa9050ced3fc
Sync Qpid RPC fix from Oslo

Qpid cannot serialize dicts containing strings longer than 65535
characters.  This change syncs the fix from Oslo to Quantum.

Fixes bug 1175808

Change-Id: I48071abffa86e71727deed05aca08ac475cbaf05
Remove generic Exception when using assertRaises

This change fixes errors associated with H202 checks and enables H202
checks.

Change-Id: I28a48d1b58f2f1f6824ee4b45782a0c961fe9fb5
Merge "Adds support for the Indigo Virtual Switch (IVS)"
Merge "Improve test coverage in NEC plugin"
Merge "Nicira plugin: always fetch lports from correct lswitch"
Merge "nicira plugin: load subnet once when adding router interface"
Merge "Handle portinfo msg after port deletion in NEC plugin"
Imported Translations from Transifex

Change-Id: I2ea142c1e98123806ed3f15e1ab01e1cfd7c64b8
Use Python 3.x compatible octal literals

Python 3.x deprecated octal literals in the form 0755.
Use the Python 2.x compatible version 0o755 instead.

Change-Id: I90ea601847752ae04d4e403ffa16a537efe442e2
Change lazy='dynamic' to 'joined' in models_v2

Previously several models were defined with lazy='dynamic'. This would
then cause Ports.fixed_ips (or w/e was specified as dynamic) to be defined
as a AppenderQuery object and when accessed would query for the result.
Therefore in get_ports() for example, when fixed_ips was accessed
in _make_port_dict() we would be issuing an addition query to the database
to lookup the fixed_ips information.

This patch changes update_port/subnet() so that it keeps track of what
changed so it does not have to query the db for values it should already
know about.

This patch also adds a unit test for update_subnet() adding host routes
where there was missing code coverage.

Implements blueprint improve-db-performance

Change-Id: I0b2214604042a1fd362cbbf3fd70e31adf0ce279