Merge "Do not "grep" the output of an empty list"
This commit is contained in:
commit
de66162e24
@ -38,7 +38,8 @@ class OvnFdbAgingTest(wb_base.BaseTempestTestCaseOvn):
|
|||||||
|
|
||||||
def _check_mac_in_ovn_sb_fdb(self, mac_address, is_present=True):
|
def _check_mac_in_ovn_sb_fdb(self, mac_address, is_present=True):
|
||||||
def _check_mac():
|
def _check_mac():
|
||||||
cmd = '{} list FDB | grep mac'.format(self.sbctl)
|
cmd = ('{} --format=list --bare --columns=mac list FDB; '
|
||||||
|
'true').format(self.sbctl)
|
||||||
fdb_list = self.run_on_master_controller(cmd).lower()
|
fdb_list = self.run_on_master_controller(cmd).lower()
|
||||||
if is_present:
|
if is_present:
|
||||||
return mac_address.lower() in fdb_list
|
return mac_address.lower() in fdb_list
|
||||||
|
Loading…
Reference in New Issue
Block a user