NSXv3: Fix problem when reset lport attachment

When the attachment is reset on a neutron port
(for example, a VM is deleted on a pre-created neutron port),
the attachment type/id will be reset on the corresponding
logical port. But currently the plugin doesn't do it
because it skips passing the attachment attribute if it is None.

Change-Id: Iacccf6dce1780c0cb6bc8332e065482d699e5cb9
This commit is contained in:
Shih-Hao Li 2016-09-22 11:43:21 -07:00
parent 06b131c9d9
commit 44eaf79647
1 changed files with 2 additions and 2 deletions

View File

@ -240,8 +240,8 @@ class LogicalPort(AbstractRESTResource):
})
body['switching_profile_ids'] = profiles
if attachment:
body['attachment'] = attachment
# Note that attachment could be None, meaning reset it.
body['attachment'] = attachment
return body