def get_facts(self):
<EOL>vendor = u'<STR_LIT>'<EOL>uptime = -<NUM_LIT:1><EOL>serial_number, fqdn, os_version, hostname, domain_name = ('<STR_LIT>',) * <NUM_LIT:5><EOL>show_ver = self.device.send_command('<STR_LIT>')<EOL>show_hosts = self.device.send_command('<STR_LIT>')<EOL>show_int_status = self.device.send_command('<STR_LIT>')<EOL>show_hostname = self.device.send_command('<STR_LIT>')<EOL>for line in show_ver.splitlines():<EOL><INDENT>if '<STR_LIT>' in line:<EOL><INDENT>_, uptime_str = line.split('<STR_LIT>')<EOL>uptime = self.parse_uptime(uptime_str)<EOL><DEDENT>if '<STR_LIT>' in line:<EOL><INDENT>_, serial_number = line.split("<STR_LIT>")<EOL>serial_number = serial_number.strip()<EOL><DEDENT>if '<STR_LIT>' in line:<EOL><INDENT>line = line.strip()<EOL>os_version = line.split()[<NUM_LIT:2>]<EOL>os_version = os_version.strip()<EOL><DEDENT>if '<STR_LIT>' in line and '<STR_LIT>' in line:<EOL><INDENT>_, model = line.split()[:<NUM_LIT:2>]<EOL>model = model.strip()<EOL><DEDENT><DEDENT>hostname = show_hostname.strip()<EOL>for line in show_hosts.splitlines():<EOL><INDENT>if '<STR_LIT>' in line:<EOL><INDENT>_, domain_name = re.split(r"<STR_LIT>", line)<EOL>domain_name = domain_name.strip()<EOL>break<EOL><DEDENT><DEDENT>if hostname.count("<STR_LIT:.>") >= <NUM_LIT:2>:<EOL><INDENT>fqdn = hostname<EOL><DEDENT>elif domain_name:<EOL><INDENT>fqdn = '<STR_LIT>'.format(hostname, domain_name)<EOL><DEDENT>interface_list = []<EOL>show_int_status = show_int_status.strip()<EOL>for line in show_int_status.splitlines():<EOL><INDENT>if line.startswith('<STR_LIT:U+0020>') or line.startswith('<STR_LIT:->') or line.startswith('<STR_LIT>'):<EOL><INDENT>continue<EOL><DEDENT>interface = line.split()[<NUM_LIT:0>]<EOL>interface_list.append(interface)<EOL><DEDENT>return {<EOL>'<STR_LIT>': int(uptime),<EOL>'<STR_LIT>': vendor,<EOL>'<STR_LIT>': py23_compat.text_type(os_version),<EOL>'<STR_LIT>': py23_compat.text_type(serial_number),<EOL>'<STR_LIT>': py23_compat.text_type(model),<EOL>'<STR_LIT>': py23_compat.text_type(hostname),<EOL>'<STR_LIT>': fqdn,<EOL>'<STR_LIT>': interface_list<EOL>}<EOL>
Return a set of facts from the devices.