def get_pci(self, localPort): """ Return tester local port pci id. """ if localPort == -1: raise ParameterInvalidException("local port should not be -1") return self.ports_info[localPort]['pci']
def get_ipv4_address(self, localPort): """ Return tester local port IPv4 address """ if localPort == -1: raise ParameterInvalidException("local port should not be -1") return self.ports_info[localPort]['ipv4']
def get_mac(self, localPort): """ Return tester local port mac address. """ if localPort == -1: raise ParameterInvalidException("local port should not be -1") if self.ports_info[localPort]['type'] == 'ixia': return "00:00:00:00:00:01" else: return self.ports_info[localPort]['mac']
def get_interface(self, localPort): """ Return tester local port interface name. """ if localPort == -1: raise ParameterInvalidException("local port should not be -1") if 'intf' not in self.ports_info[localPort]: return 'N/A' return self.ports_info[localPort]['intf']