[ovn]: gracefully handle logical switch ports with tag set to None
AddLSwitchPortCommand takes kwargs as columns and tag is one of them. It is possible that tag is provided with the value None and that is not valid. The proposed change gracefully handles such cases so the transaction is not aborted. Change-Id: I0f3cb6f534072e166610b417059acbe89302473a Closes-Bug: #1888736
This commit is contained in:
parent
62a85fb61f
commit
fe440bdd6b
|
@ -125,6 +125,7 @@ class AddLSwitchPortCommand(command.BaseCommand):
|
|||
|
||||
port = txn.insert(self.api._tables['Logical_Switch_Port'])
|
||||
port.name = self.lport
|
||||
port.tag = self.columns.pop('tag', []) or []
|
||||
dhcpv4_options = self.columns.pop('dhcpv4_options', [])
|
||||
if isinstance(dhcpv4_options, list):
|
||||
port.dhcpv4_options = dhcpv4_options
|
||||
|
|
Loading…
Reference in New Issue