def mac(address='', interface='', vlan=0):
 proxy_output = __proxy__['napalm.call']('get_mac_address_table', **{})
 if (not proxy_output.get('result')):
  return proxy_output
 mac_address_table = proxy_output.get('out')
 if (vlan and isinstance(vlan, int)):
  mac_address_table = _filter_list(mac_address_table, 'vlan', vlan)
 if address:
  mac_address_table = _filter_list(mac_address_table, 'mac', address)
 if interface:
  mac_address_table = _filter_list(mac_address_table, 'interface', interface)
 proxy_output.update({'out': mac_address_table})
 return proxy_output

def mac ( address = '' , interface = '' , vlan = 0 ) : proxy_output = __proxy__ [ 'napalm.call' ] ( 'get_mac_address_table' , ** { } ) if ( not proxy_output . get ( 'result' ) ) : return proxy_output mac_address_table = proxy_output . get ( 'out' ) if ( vlan and isinstance ( vlan , int ) ) : mac_address_table = _filter_list ( mac_address_table , 'vlan' , vlan ) if address : mac_address_table = _filter_list ( mac_address_table , 'mac' , address ) if interface : mac_address_table = _filter_list ( mac_address_table , 'interface' , interface ) proxy_output . update ( { 'out' : mac_address_table } ) return proxy_output
returns the mac address table on the device .