Hash device_id only if it is longer than the allowed MAX size for NVP

This ensure that a VM uuid stays untouched, avoiding potential
confusion when inspecting NVP port tags. This patch also abstracts
the hashing method out by introducing a device_id_to_vm_id method.
Filtering logic is preserved, and a test has been added to ensure
that. However such a logic is not currently used in the NeutronPlugin
(because of the introduction of async status updates), but it has
been added as utility method to nvplib.

Fixes bug #1215204

Change-Id: Ib96ecae438e30f195c8b45176abc1cf55b4b363f
Change daemon Pidfile class to not use root_helper

Some users of the Pidfile class don't specify root_helper,
which then defaults to 'sudo', which will generate an error.
Remove root_helper altogether since we actually don't need
root priveleges to read /proc/$pid/cmdline.

Changed code to use open.readline() instead of a shell, and
tweaked tests accordingly.

Also cleaned-up the rootwrap filters that allow it as they
are not used anymore.

Fixes bug 1218142

Change-Id: I6691feb1c9f7bfa261a7ec464fd8f3f92168c302
Don't add neutron metadata_nat_rules if disable metadata proxy

This patchset fixes this issue by adding a condition when adding nat
rules of neutron metadata proxy.

fixes bug #1212168

Change-Id: I99775aad73c49a8df3043690440d214614279a2b
Don't need to init testr in run_tests.sh

In run_tests.sh, function init_testr will initialize testr if the
directory .testrepository is not existed. Actually, testr will do
the check before run the test:

In Python package testrepository, setuptools_command.py:Testr.run

68 def run(self):
69     """Set up testr repo, then run testr"""
70     if not os.path.isdir(".testrepository"):
71         self._run_testr("init")

So, init_testr can be removed safely.

Fixes Bug #1224285

Change-Id: Ia74d9fff92b8efba9b72e5c7387f761144daa193
Prevent update_port ip_address from matching address_pair

Previously one could update a port to match one of the address_pairs.
This patch prevents that.

Fixes bug: 1223646

Change-Id: Ic8cecfdb83b3fd9d2691bb41e0427cf578577fc8
Enhance exception translation to better handle NeutronExceptions

NeutronExceptions have a 'message' class attribute that holds the
generic error message template, e.g. "Network %(network)s not found",
unfortunately, because the names are the same, it was overshadowing the
actual exception instance 'message', e.g. "Network 1 not found", after
translation when the exception was serialized to JSON.

This patch puts the exception's actual message in a new field called
'msg' and overwrites NeutronException unicode() so that 'msg' is used
during serialization and we'll get the correct message on the REST API
response.

Fixes bug: #1212882

Change-Id: I3965bffb1c2c2eee0af440d1ecd30ccb3bb958d5
Imported Translations from Transifex

Change-Id: I4c978bcffa92b00deaf86a3da826ebe2a4ca0eb4
Add new L3 RPC topic support to Ryu plugin

fixes bug #1224796

This patch adds RPC consumer for the new topic for L3 callbacks to
Ryu plugin.

Change-Id: Id9b3af474e65ab4c5b58121e1dcb160f80a71633
Do not apply security groups to logical ports

Security groups rules were applied to logical ports and this caused
Floating IP not to work correctly.
Correct some typo.

Change-Id: I174e60f8eb8a4d00b71fffc127e2d2d36836835d
Closes-Bug: #1221336
Add NvpPluginV2 to migration 4a666eb208c2

Bug 1224882

This migration alters a table used by NvpPluginV2 as well, so
it must be included in the plugin list.

Change-Id: Ifc5104d813c76fa8de000ec977ca3242e90e433d
Fix handling of floating IP association info in Nicira plugin

Bug 1223902

This patch fixes the _update_fix_assoc routine in the Nicira plugin,
ensuring the association of a floating IP with a router is removed
when the floating IP is disassociated.
This patch also adds a unit test for validating behaviour when a floating
IP is associated to a port on a different router, which was an
uncovered use case. This new unit test required some refactoring in
test_l3_plugin.py.

Change-Id: Ibfd53a637f4d14a368b0aeff289c15f993df58dd
Allow sharing of firewall rules and policies in policy.json

Updated policy for firewall_policy and firewall_rule to allow sharing
among tenants. Added a new firewall sharing rule to enable this.

Change-Id: I5d4d9f94fb3abffe4d1b03c46fd5b13a8a4a4f09
Fixes: bug #1217103
Stop popen patch correctly in test_agent_linux_utils

Fixes bug #1225009

Change-Id: Ic9f3491be2fb7481bbf3fd843a421d66d9248a20
Fix failure in multi-chunk state sync for nicira plugin

Bug 1224719

This patch ensures the 'result_count' attribute from NVP API responses
is properly handled, and adds support for '_page_cursor' request query
parameter in the fake nvp api client in order to ensure issues like this
are captured by unit tests.

Change-Id: I1d6179bd58a14d19729fc882f004b6d1afccbe3d
Fix incorrect comment re:distributed router in nicira plugin

Change-Id: I22445cc477a86cb99e97740fd8a9ddb796c1ebac
Fixes Hyper-V agent unsopported network_type issue

Fixes an issue when an exception is raised in case of not
supported network types.

Fixes bug: #1224583

Change-Id: I847aa825fbf5b7086c9960c051014cc1d7515f62
Merge "Imported Translations from Transifex"
Add router ownership check on vpnservice creation

Router ownership must be checked on vpnservice creation.
In this commit, we added the check.

Fixes bug 1224196

Change-Id: I14b18225f82ebe691f253fbd7645ecfc7f12faad
Merge "Hash device_id only if it is longer than the allowed MAX size for NVP"
Merge "Fix incorrect comment re:distributed router in nicira plugin"