'Returns xml for libvirt.'

def get_config(self, connection_info, disk_info):

    conf = super(LibvirtNetVolumeDriver, self).get_config(connection_info, disk_info)
    netdisk_properties = connection_info['data']
    conf.source_type = 'network'
    conf.source_protocol = connection_info['driver_volume_type']
    conf.source_name = netdisk_properties.get('name')
    conf.source_hosts = netdisk_properties.get('hosts', [])
    conf.source_ports = netdisk_properties.get('ports', [])
    if (conf.source_protocol == 'rbd'):
        self._set_auth_config_rbd(conf, netdisk_properties)
    elif (conf.source_protocol == 'iscsi'):
        try:
            conf.source_name = ('%(target_iqn)s/%(target_lun)s' % netdisk_properties)
            target_portal = netdisk_properties['target_portal']
        except KeyError:
            raise exception.InternalError(_('Invalid    volume    source    data'))
        (ip, port) = utils.parse_server_string(target_portal)
        if ((ip == '') or (port == '')):
            raise exception.InternalError(_('Invalid    target_lun'))
        conf.source_hosts = [ip]
        conf.source_ports = [port]
        self._set_auth_config_iscsi(conf, netdisk_properties)
    return conf
