Merge "Fix attach logical router port failure"
This commit is contained in:
commit
1e7734214e
|
@ -230,9 +230,10 @@ class LogicalPort(AbstractRESTResource):
|
|||
# NOTE(arosen): The above api body structure might change
|
||||
# in the future
|
||||
|
||||
body = {'logical_switch_id': lswitch_id,
|
||||
'attachment': {'attachment_type': attachment_type,
|
||||
'id': vif_uuid}}
|
||||
body = {'logical_switch_id': lswitch_id}
|
||||
if attachment_type and vif_uuid:
|
||||
body['attachment'] = {'attachment_type': attachment_type,
|
||||
'id': vif_uuid}
|
||||
|
||||
if key_values:
|
||||
body['attachment']['context'] = {'key_values': key_values}
|
||||
|
|
|
@ -563,6 +563,9 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin,
|
|||
# transaction here later.
|
||||
vif_uuid = port_data['id']
|
||||
attachment_type = nsx_constants.ATTACHMENT_VIF
|
||||
if port_data.get('device_owner') == l3_db.DEVICE_OWNER_ROUTER_INTF:
|
||||
attachment_type = None
|
||||
vif_uuid = None
|
||||
# Change the attachment type for L2 gateway owned ports.
|
||||
if l2gw_port_check:
|
||||
# NSX backend requires the vif id be set to bridge endpoint id
|
||||
|
|
Loading…
Reference in New Issue