From e4ef701471d09ba107c67fbb9a5b79748143be39 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Wed, 8 Aug 2018 14:25:31 +0300 Subject: [PATCH] NSX|V: Shorten the L2 bridge edge name The NSX backend support max length of 40 characters, and the name of the edge is not used anywhere other than when it is created, so this patch shorten the name prefix Change-Id: Iab67c2f7df6dc213beb932e4633e9ff04f7daf66 --- vmware_nsx/services/l2gateway/nsx_v/driver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmware_nsx/services/l2gateway/nsx_v/driver.py b/vmware_nsx/services/l2gateway/nsx_v/driver.py index c201f7748e..6da022e10c 100644 --- a/vmware_nsx/services/l2gateway/nsx_v/driver.py +++ b/vmware_nsx/services/l2gateway/nsx_v/driver.py @@ -162,7 +162,8 @@ class NsxvL2GatewayDriver(l2gateway_db.L2GatewayMixin): device_id = device.get('id') interface = self._get_l2_gw_interfaces(context, device_id) interface_name = interface[0].get("interface_name") - bridge_name = "bridge-" + uuidutils.generate_uuid() + # bridge name length cannot exceed 40 characters + bridge_name = "brg-" + uuidutils.generate_uuid() bridge_dict = {"bridges": {"bridge": {"name": bridge_name,