Supply missing cisco_cfg_agent.ini file

cisco_cfg_agent.ini file was missed in the initial commit and
caused neutron startup issues. This patch supplies the proper
ini file and adds it back to neutron setup.cfg.
Also the introduced config options are put in a specific group
instead of default as was in the initial commit.

Change-Id: I74b3b77fe6e196524809580f522f91f3b62f5ba7
Closes-bug: #1351466
Delete DB records instead of tables to speedup UT

Now that the schema is fixed for all of the plugins,
there isn't a need to delete and recreate the entire
schema for every unit test.

This patch clears the tables at the end of each test
instead of deleting them. This eliminated overhead seems
to save 10%+ execution time of the entire set of unit
tests.

Example of performance gain from tox -epy27 tests.unit.ml2:
Before: Ran 2495 tests in 284.186s
After: Ran 2495 tests in 223.299s

Change-Id: Ic5bcbb0cf941e0745890abc776d719e58bb42e35
Fix 500 error on retrieving metadata by invalid URI

An invalid URI should return a BadRequest error rather
than making the metadata proxy bomb out.

Closes-bug: #1371160

Change-Id: Ifb495f9e8929062a0c24d090c3e702109a38803a
Use dict_extend_functions to populate provider network attributes

Use dict_extend_functions mechanism to handle populating additional
provider network attributes into Network model in Nuage plugin.

Change-Id: I72e5afe3d03ae223fcd8e75f1f4f07624c3a7daf
Closes-Bug: #1362308
Imported Translations from Transifex

Change-Id: If3c928da9856fae84b139c78ee04573daf562a95
Add logging for enforced policy rules

There are a lot of policy rules which should not necessarily
be explicitly specified in policy.json to be checked while enforcement.
There should be a way for an operator to know which policy rules are
actually being enforced for each action.

Added a unit test.

Change-Id: I261d3e230eced9ea514b35cc3f5f8be04f84c751
Closes-Bug: #1356679
Mock out all RPC calls with a fixture

Mock out the rpc proxy calls used by various agents to
prevent unit tests from blocking for 10+ seconds while waiting
for a timeout. This happened with the OVS agent unit tests
recently in Change-ID Idd770a85a9eabff112d9613e75d8bb524020234a.

This change results in a reduction from 330.8 seconds to 2.7 seconds
for the neutron.tests.unit.openvswitch.test_ovs_neutron_agent
test module.

Closes-Bug: #1372076
Change-Id: I5e6794dc33c64c8fe309d8e72a8af3385c7d4442
Finish small unit test refactor of API v2 tests

Leverage a utility function for all of the tests
that create something in the API and expect a failure.

Change-Id: Iedb6ba35d637dda5ae9f553d0c7ffcb7c526f3c6
Merge "Mock out all RPC calls with a fixture"
Forbid regular users to reset admin-only attrs to default values

A regular user can reset an admin-only attribute to its default
value due to the fact that a corresponding policy rule is
enforced only in the case when an attribute is present in the
target AND has a non-default value.

Added a new attribute "attributes_to_update" which contains a list
of all to-be updated attributes to the body of the target that is
passed to policy.enforce.

Changed a check for whether an attribute is explicitly set.
Now, in the case of update, the function should not pay attention
to a default value of an attribute, but check whether it was
explicitly marked as being updated.

Added unit-tests.

Closes-Bug: #1357379
Related-Bug: #1338880
Change-Id: I6537bb1da5ef0d6899bc71e4e949f2c760c103c2
Merge "Use dict_extend_functions to populate provider network attributes"
Remove the translation tag for debug level logs in vmware plugin

There is no need to translate the debug level logs in vmware plugin for neutron.

Closes-bug: #1372862

Change-Id: If07c06cc3a1eb3dd147191bb8ab9198d4198cd69
Remove RPC notification from transaction in create/update port

Removing notifications to the L3 agent from within the transaction in
create_port and update_port eliminates many lock wait timeouts in the
dvr check queue job and in scale testing locally.

Since this patch leaves context unused in _process_port_binding, the
argument is removed from the method.

Closes-Bug: #1371732

Change-Id: Ibd86611ad3e7eff085d769bdff777a5870f30c58
Do not lookup l3-agent for floating IP if host=None, dvr issue

If a floating IP has been associated with a port, but the port
has not been associated with an instance, attempting to lookup
the l3-agent hosting it will cause an AgentNotFoundByTypeHost
exception.  Just skip it and go onto the next one.

Change-Id: If3df9770fa9e2d2eada932ee5f243d3458bf7261
Closes-Bug: #1370795
Deletes floating ip related connection states

When a floating ip is dissociated with a port, the current
connection with the floating ip is still working. This patch
will clear the connection state and cut off the connection
immediately.

Since conntrack -D will return 1, which is not an error code,
so add extra_ok_codes argument to execute methods.

Change-Id: Ia9bd7ae243a0859dcb97e2fa939f7d16f9c2456c
Closes-Bug: 1334926
Merge "Delete DB records instead of tables to speedup UT"
Merge "Finish small unit test refactor of API v2 tests"
Merge "Remove the translation tag for debug level logs in vmware plugin"
Fix KeyError when getting secgroup info for ports

The patch fixes a regression introduced with secgroup rpc refactor by
handling the case when security group contains rules for only IPv4 or
IPv6.

Change-Id: I02b174757bfc796a81cdb482c55ba7f9e954131d
Closes-bug: #1372337
Merge "Imported Translations from Transifex"