Refactor phys_exist() into phys_exist_in_{config,vpp}(); Correct vppapi.get_phys()

This commit is contained in:
Pim van Pelt
2022-03-26 23:07:49 +00:00
parent 4c31541b3e
commit 176fd297aa
3 changed files with 20 additions and 6 deletions

View File

@ -236,7 +236,7 @@ class VPPApi():
return bvis
def get_phys(self):
phys = [self.config['interfaces'][x].interface_name for x in self.config['interfaces'] if self.config['interfaces'][x].interface_dev_type=='dpdk' and self.config['interfaces'][x].sw_if_index == self.config['interfaces'][x].sup_sw_if_index]
phys = [self.config['interfaces'][x].interface_name for x in self.config['interfaces'] if self.config['interfaces'][x].sw_if_index == self.config['interfaces'][x].sup_sw_if_index and self.config['interfaces'][x].interface_dev_type not in ['virtio', 'BVI', 'Loopback', 'VXLAN', 'local', 'bond']]
return phys
def get_bondethernets(self):