Common decorator for caching methods

Decorator caches methods' results, the key is composed from function
name and its parameters. Implementation of cache itself should be in
object implementing decorated method. Cache backend should be taken
from oslo-incubator.

Related-Bug: #1276440

Conflicts:
	neutron/common/utils.py

Change-Id: Ibe3f1b2eb10b9601ad76ec24b7f0e3551b4013e2
(cherry picked from commit 7508170498949818aed02ba0fd9b7f861e596320)
Do not defer IPTables apply in firewall path

By default, iptables apply is deferred in L3 agent. For
external gateways, iptables is applied immediately (to
enable NAT for floating IP). Similarly, when firewall
is created/updated/deleted, iptable rules are applies
immediately.

Change-Id: I4f652a030ae23a71a2e20af2e8ef0ad5b882b80e
Closes-Bug: #1320775
(cherry picked from commit 6167cb55e2f62a645487d66e52b809c9599b3bb8)
Metadata agent caches networks for routers

During cloud-init there are several calls that asks neutron API for the
same data which will not be most likely changed. Specifically router's
networks are cached.

Closes-bug: #1276440

Conflicts:
	neutron/tests/unit/test_metadata_agent.py

Change-Id: Ic5eedb8057c7f4934eed08869ebf55c91e6edfc9
(cherry picked from commit 3faea81c6029033c85cefd6e98d7a3e719e858f5)
Check DB scheme prior to migration to Ml2

When using migration tool from LB/OVS plugin to Ml2, there is no
guarantee current scheme is supported by migration tool. This patch
checks version stored in DB by alembic and compares whether version
is supported.

Closes-bug: #1307720

Change-Id: I4519a0e5a0f3027675958a68d1f9e0440b177229
(cherry picked from commit de10d7299ba3dce18b8e12a41830ec0e686df340)
Fix network profile subtype validation in N1kv plugin

Network profile of type Trunk expects a subtype field for
creation. If a subtype is missing in the request body, plugin
should raise an exception. This patch fixes the validation logic
to detect missing subtype field.

Change-Id: I6b4fb533576a317f7d568b4a0fe4117b5464ffa6
Closes-Bug: 1315197
(cherry picked from commit 1dd0bdc06dedf0f577d220f4c1a1f9f43f04a0fe)
Updated from global requirements

Change-Id: I64dcc6f9552cf7f8b6ff3503923e9acc58e3f5bd
Merge "Fix network profile subtype validation in N1kv plugin" into stable/icehouse
Merge "Check DB scheme prior to migration to Ml2" into stable/icehouse
Merge "Do not defer IPTables apply in firewall path" into stable/icehouse
Merge "Common decorator for caching methods" into stable/icehouse
Merge "Metadata agent caches networks for routers" into stable/icehouse