NSX|V3: ensure that router id is updated prior to tag creation

Ensure that the router ID is reflected in the tags.

Change-Id: Ic0e4b0ee2002aa8e2afb32b11ead66d38cd35142
Closes-bug: #1527255
This commit is contained in:
Gary Kotton 2015-12-17 05:49:19 -08:00
parent 5e8974d7b7
commit a4f19533e8

View File

@ -988,6 +988,7 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin,
def create_router(self, context, router):
# TODO(berlin): admin_state_up support
gw_info = self._extract_external_gw(context, router, is_extract=True)
router['router']['id'] = uuidutils.generate_uuid()
tags = utils.build_v3_tags_payload(router['router'])
result = self._router_client.create(
display_name=router['router'].get('name'),