#NEWLINE# def mac( address = '' , interface = '' , vlan = 0 ) : #NEWLINE# #INDENT# "\n    Returns the MAC Address Table on the device.\n\n    :param address:   MAC address to filter on\n    :param interface: Interface name to filter on\n    :param vlan:      VLAN identifier\n    :return:          A list of dictionaries representing the entries in the MAC Address Table\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' net.mac\n        salt '*' net.mac vlan=10\n\n    Example output:\n\n    .. code-block:: python\n\n        [\n            {\n                'mac'       : '00:1c:58:29:4a:71',\n                'interface' : 'xe-3/0/2',\n                'static'    : False,\n                'active'    : True,\n                'moves'     : 1,\n                'vlan'      : 10,\n                'last_move' : 1454417742.58\n            },\n            {\n                'mac'       : '8c:60:4f:58:e1:c1',\n                'interface' : 'xe-1/0/1',\n                'static'    : False,\n                'active'    : True,\n                'moves'     : 2,\n                'vlan'      : 42,\n                'last_move' : 1453191948.11\n            }\n        ]\n    " #NEWLINE# proxy_output = __proxy__ [ 'napalm.call' ] ( 'get_mac_address_table' , ** { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( not proxy_output . get ( 'result' ) ) : #NEWLINE# #INDENT# return proxy_output #NEWLINE# #UNINDENT# mac_address_table = proxy_output . get ( 'out' ) #NEWLINE# if ( vlan and isinstance ( vlan , int ) ) : #NEWLINE# #INDENT# mac_address_table = _filter_list ( mac_address_table , 'vlan' , vlan ) #NEWLINE# #UNINDENT# if address : #NEWLINE# #INDENT# mac_address_table = _filter_list ( mac_address_table , 'mac' , address ) #NEWLINE# #UNINDENT# if interface : #NEWLINE# #INDENT# mac_address_table = _filter_list ( mac_address_table , 'interface' , interface ) #NEWLINE# #UNINDENT# proxy_output . update ( { #NEWLINE# #INDENT# 'out' : mac_address_table , #NEWLINE# #UNINDENT# } ) #NEWLINE# return proxy_output