NSXv3: Add neutron-id tag to backend

Having the neutron id in the nsx backend is helpful to aligning which
resources in the nsx backend match to their neutron counterpart since
their id's do not map one to one currently.

Change-Id: I2a438285e03333e2ca07921476f8fe5d56743b83
This commit is contained in:
Aaron Rosen 2015-09-10 16:20:58 -07:00
parent 6c6a539de7
commit 80d78b4b17
1 changed files with 5 additions and 2 deletions

View File

@ -89,9 +89,12 @@ def check_and_truncate(display_name):
def build_v3_tags_payload(logical_entity):
"""
Construct the tags payload that will be pushed to NSX-v3
Add os-tid:<tenant-id>, os-api-version:<neutron-api-version>
Add os-tid:<tenant-id>, os-api-version:<neutron-api-version>,
neutron-id:<resource-id>
"""
return [{"scope": "os-tid",
return [{"scope": "neutron-id",
"tag": logical_entity.get("id")},
{"scope": "os-tid",
"tag": logical_entity.get("tenant_id")},
{"scope": "os-api-version",
"tag": version.version_info.release_string()}]