@staticmethod<EOL><INDENT>def parse_uptime(uptime_str):<DEDENT>
<EOL>(years, weeks, days, hours, minutes) = (<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)<EOL>uptime_str = uptime_str.strip()<EOL>time_list = uptime_str.split('<STR_LIT:U+002C>')<EOL>for element in time_list:<EOL><INDENT>if re.search("<STR_LIT>", element):<EOL><INDENT>years = int(element.split()[<NUM_LIT:0>])<EOL><DEDENT>elif re.search("<STR_LIT>", element):<EOL><INDENT>weeks = int(element.split()[<NUM_LIT:0>])<EOL><DEDENT>elif re.search("<STR_LIT>", element):<EOL><INDENT>days = int(element.split()[<NUM_LIT:0>])<EOL><DEDENT>elif re.search("<STR_LIT>", element):<EOL><INDENT>hours = int(element.split()[<NUM_LIT:0>])<EOL><DEDENT>elif re.search("<STR_LIT>", element):<EOL><INDENT>minutes = int(element.split()[<NUM_LIT:0>])<EOL><DEDENT><DEDENT>uptime_sec = (years * YEAR_SECONDS) + (weeks * WEEK_SECONDS) + (days * DAY_SECONDS) +(hours * <NUM_LIT>) + (minutes * <NUM_LIT>)<EOL>return uptime_sec<EOL>
Extract the uptime string from the given Cisco IOS Device.

Return the uptime in seconds as an integer