'Get the map properties of vdisk.'

def _get_vdisk_map_properties(self, connector, lun_id, vdisk_name, vdisk_id, vdisk_params):

    LOG.debug('enter:    _get_vdisk_map_properties:    vdisk    %(vdisk_name)s.', {'vdisk_name': vdisk_name})
    preferred_node = '0'
    IO_group = '0'
    preferred_node_entry = None
    io_group_nodes = []
    for (k, node) in self._storage_nodes.items():
        if (vdisk_params['protocol'] != node['protocol']):
            continue
        if (node['id'] == preferred_node):
            preferred_node_entry = node
        if (node['IO_group'] == IO_group):
            io_group_nodes.append(node)
    if (not io_group_nodes):
        msg = (_('No    node    found    in    I/O    group    %(gid)s    for    volume    %(vol)s.') % {'gid': IO_group, 'vol': vdisk_name})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    if (not preferred_node_entry):
        preferred_node_entry = io_group_nodes[0]
        LOG.warning('_get_vdisk_map_properties:    Did    not    find    a    preferred    node    for    vdisk    %s.', vdisk_name)
    properties = {'target_discovered': False, 'target_lun': lun_id, 'volume_id': vdisk_id}
    type_str = 'iscsi'
    if preferred_node_entry['ipv4']:
        ipaddr = preferred_node_entry['ipv4'][0]
    else:
        ipaddr = preferred_node_entry['ipv6'][0]
    iscsi_port = self.configuration.iscsi_port
    properties['target_portal'] = ('%s:%s' % (ipaddr, iscsi_port))
    properties['target_iqn'] = preferred_node_entry['iscsi_name']
    LOG.debug('leave:    _get_vdisk_map_properties:    vdisk    %(vdisk_name)s.', {'vdisk_name': vdisk_name})
    return {'driver_volume_type': type_str, 'data': properties}
