get_port_tag_dict() gets a list of ports using get_port_name_list()
and then queries the db again for ports in the list.
It fails if some of ports disappeared in between.
This change fixes it by ignoring "not exist" errors in the later query.
Closes-Bug: #
1444797
Change-Id: Ic54b644bb1d72a4664b70f124863d17805c26fff
"""
port_names = self.get_port_name_list()
- cmd = self.ovsdb.db_list('Port', port_names, columns=['name', 'tag'])
+ cmd = self.ovsdb.db_list('Port', port_names, columns=['name', 'tag'],
+ if_exists=True)
results = cmd.execute(check_error=True)
return {p['name']: p['tag'] for p in results}