def get_mac_address_table(self):
mac_address_table = []<EOL>switch_style = self.device.facts.get("<STR_LIT>", "<STR_LIT>")<EOL>if switch_style == "<STR_LIT>":<EOL><INDENT>mac_table = junos_views.junos_mac_address_table_switch_l2ng(self.device)<EOL><DEDENT>elif switch_style == "<STR_LIT>":<EOL><INDENT>mac_table = junos_views.junos_mac_address_table(self.device)<EOL><DEDENT>else:  <EOL><INDENT>mac_table = junos_views.junos_mac_address_table_switch(self.device)<EOL><DEDENT>try:<EOL><INDENT>mac_table.get()<EOL><DEDENT>except RpcError as e:<EOL><INDENT>if "<STR_LIT>" in e.message:<EOL><INDENT>return []<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>mac_table_items = mac_table.items()<EOL>default_values = {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": <NUM_LIT:0>,<EOL>"<STR_LIT>": False,<EOL>"<STR_LIT>": True,<EOL>"<STR_LIT>": <NUM_LIT:0>,<EOL>"<STR_LIT>": <NUM_LIT:0.0>,<EOL>}<EOL>for mac_table_entry in mac_table_items:<EOL><INDENT>mac_entry = default_values.copy()<EOL>mac_entry.update({elem[<NUM_LIT:0>]: elem[<NUM_LIT:1>] for elem in mac_table_entry[<NUM_LIT:1>]})<EOL>mac = mac_entry.get("<STR_LIT>")<EOL>if mac == "<STR_LIT:*>":<EOL><INDENT>continue<EOL><DEDENT>mac_entry["<STR_LIT>"] = napalm.base.helpers.mac(mac)<EOL>mac_address_table.append(mac_entry)<EOL><DEDENT>return mac_address_table<EOL>
Return the MAC address table.