'Initialize server-storage connection for volume copy.'

def _init_pair_targets(self, targets_info):

    for port in targets_info.keys():
        if (not targets_info[port]):
            continue
        result = self.run_raidcom('get', 'host_grp', '-port', port)
        gid = find_value(result[1], 'pair_gid')
        if (not gid):
            try:
                connector = {'ip': _PAIR_TARGET_NAME_BODY, 'wwpns': [_PAIR_TARGET_NAME_BODY]}
                (target_name, gid) = self.create_target_to_storage(port, connector, None)
                utils.output_log(MSG.OBJECT_CREATED, object='a    target    for    pair    operation', details=('port:    %(port)s,    gid:    %(gid)s,    target_name:    %(target)s' % {'port': port, 'gid': gid, 'target': target_name}))
            except exception.VSPError:
                utils.output_log(MSG.CREATE_HOST_GROUP_FAILED, port=port)
                continue
        self._pair_targets.append((port, gid))
    if (not self._pair_targets):
        msg = utils.output_log(MSG.ADD_PAIR_TARGET_FAILED)
        raise exception.VSPError(msg)
    self._pair_targets.sort(reverse=True)
    utils.output_log(MSG.SET_CONFIG_VALUE, object='port-gid    list    for    pair    operation', value=self._pair_targets)
