def _parse_network_details(machine_id):
 logging.debug((_('Received machine_id from vmtools : %s') % machine_id[0]))
 network_details = []
 if (machine_id[1].strip() == '1'):
  pass
 else:
  for machine_id_str in machine_id[0].split('#'):
   network_info_list = machine_id_str.split(';')
   if ((len(network_info_list) % 6) != 0):
    break
   no_grps = (len(network_info_list) / 6)
   i = 0
   while (i < no_grps):
    k = (i * 6)
    network_details.append((network_info_list[k].strip().lower(), network_info_list[(k + 1)].strip(), network_info_list[(k + 2)].strip(), network_info_list[(k + 3)].strip(), network_info_list[(k + 4)].strip(), network_info_list[(k + 5)].strip().split(',')))
    i += 1
 logging.debug((_('NIC information from vmtools : %s') % network_details))
 return network_details

def _parse_network_details ( machine_id ) : logging . debug ( ( _ ( 'Received machine_id from vmtools : %s' ) % machine_id [ 0 ] ) ) network_details = [ ] if ( machine_id [ 1 ] . strip ( ) == '1' ) : pass else : for machine_id_str in machine_id [ 0 ] . split ( '#' ) : network_info_list = machine_id_str . split ( ';' ) if ( ( len ( network_info_list ) % 6 ) != 0 ) : break no_grps = ( len ( network_info_list ) / 6 ) i = 0 while ( i < no_grps ) : k = ( i * 6 ) network_details . append ( ( network_info_list [ k ] . strip ( ) . lower ( ) , network_info_list [ ( k + 1 ) ] . strip ( ) , network_info_list [ ( k + 2 ) ] . strip ( ) , network_info_list [ ( k + 3 ) ] . strip ( ) , network_info_list [ ( k + 4 ) ] . strip ( ) , network_info_list [ ( k + 5 ) ] . strip ( ) . split ( ',' ) ) ) i += 1 logging . debug ( ( _ ( 'NIC information from vmtools : %s' ) % network_details ) ) return network_details
parse the machine_id to get mac .