]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Hash device_id only if it is longer than the allowed MAX size for NVP
authorarmando-migliaccio <amigliaccio@nicira.com>
Thu, 22 Aug 2013 00:51:34 +0000 (17:51 -0700)
committerarmando-migliaccio <amigliaccio@nicira.com>
Thu, 5 Sep 2013 21:49:08 +0000 (14:49 -0700)
commitedd17eae6ab9101f8d780ced3b01b8eec8c663e1
tree170a53679d3e28559e6621c91e5c8607356390b3
parentb15c0b3c95b28fb528e8e7f7442250b6a1b00ff7
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
neutron/plugins/nicira/nvplib.py
neutron/tests/unit/nicira/test_nvplib.py