def convert_to_tgt_list_and_itor_tgt_map(zone_mapping):
 target_wwns = []
 itor_tgt_map = {}
 for san_name in zone_mapping:
  one_map = zone_mapping[san_name]
  for target in one_map['target_port_wwn_list']:
   if (target not in target_wwns):
    target_wwns.append(target)
  for initiator in one_map['initiator_port_wwn_list']:
   itor_tgt_map[initiator] = one_map['target_port_wwn_list']
 LOG.debug('target_wwns: %(tgt_wwns)s\n init_targ_map: %(itor_tgt_map)s', {'tgt_wwns': target_wwns, 'itor_tgt_map': itor_tgt_map})
 return (target_wwns, itor_tgt_map)

def convert_to_tgt_list_and_itor_tgt_map ( zone_mapping ) : target_wwns = [ ] itor_tgt_map = { } for san_name in zone_mapping : one_map = zone_mapping [ san_name ] for target in one_map [ 'target_port_wwn_list' ] : if ( target not in target_wwns ) : target_wwns . append ( target ) for initiator in one_map [ 'initiator_port_wwn_list' ] : itor_tgt_map [ initiator ] = one_map [ 'target_port_wwn_list' ] LOG . debug ( 'target_wwns: %(tgt_wwns)s\n init_targ_map: %(itor_tgt_map)s' , { 'tgt_wwns' : target_wwns , 'itor_tgt_map' : itor_tgt_map } ) return ( target_wwns , itor_tgt_map )
function to process data from lookup service .