<commit_before>package org.ovirt.engine.ui.uicommonweb.models.vms;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.ovirt.engine.core.common.businessentities.storage.Disk;
import org.ovirt.engine.core.common.businessentities.storage.DiskStorageType;
import org.ovirt.engine.core.compat.Guid;
import org.ovirt.engine.core.compat.Version;
import org.ovirt.engine.ui.frontend.AsyncQuery;
import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider;
import org.ovirt.engine.ui.uicommonweb.models.EntityModel;

public class InstanceImagesAttachDiskModel extends AttachDiskModel {

    public void loadAttachableDisks(int os, Version compatibilityVersion, final Disk prevSelectedDisk) {
        // Get image attachable disks
        AsyncDataProvider.getInstance().getFilteredAttachableDisks(
                new AsyncQuery(this, new InstanceImageGetDisksCallback(DiskStorageType.IMAGE, prevSelectedDisk)
                ), getVm().getStoragePoolId(), getVm().getId(), os, compatibilityVersion);

        // Get lun attachable disks
        AsyncDataProvider.getInstance().getFilteredAttachableDisks(
                new AsyncQuery(this, new InstanceImageGetDisksCallback(DiskStorageType.LUN, prevSelectedDisk)
                ), null, getVm().getId(), os, compatibilityVersion);

        // Get cinder attachable disks
        AsyncDataProvider.getInstance().getFilteredAttachableDisks(
                new AsyncQuery(this, new InstanceImageGetDisksCallback(DiskStorageType.CINDER, prevSelectedDisk)
                ), null, getVm().getId(), os, compatibilityVersion);
    }

    public void loadAttachableDisks(Disk prevSelected) {<commit_msg>webadmin: instance images - filter cinder disks by DC on attach<commit_after>package org.ovirt.engine.ui.uicommonweb.models.vms;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.ovirt.engine.core.common.businessentities.storage.Disk;
import org.ovirt.engine.core.common.businessentities.storage.DiskStorageType;
import org.ovirt.engine.core.compat.Guid;
import org.ovirt.engine.core.compat.Version;
import org.ovirt.engine.ui.frontend.AsyncQuery;
import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider;
import org.ovirt.engine.ui.uicommonweb.models.EntityModel;

public class InstanceImagesAttachDiskModel extends AttachDiskModel {

    public void loadAttachableDisks(int os, Version compatibilityVersion, final Disk prevSelectedDisk) {
        // Get image attachable disks
        AsyncDataProvider.getInstance().getFilteredAttachableDisks(
                new AsyncQuery(this, new InstanceImageGetDisksCallback(DiskStorageType.IMAGE, prevSelectedDisk)
                ), getVm().getStoragePoolId(), getVm().getId(), os, compatibilityVersion);

        // Get lun attachable disks
        AsyncDataProvider.getInstance().getFilteredAttachableDisks(
                new AsyncQuery(this, new InstanceImageGetDisksCallback(DiskStorageType.LUN, prevSelectedDisk)
                ), null, getVm().getId(), os, compatibilityVersion);

        // Get cinder attachable disks
        AsyncDataProvider.getInstance().getFilteredAttachableDisks(
                new AsyncQuery(this, new InstanceImageGetDisksCallback(DiskStorageType.CINDER, prevSelectedDisk)
                ), getVm().getStoragePoolId(), getVm().getId(), os, compatibilityVersion);
    }

    public void loadAttachableDisks(Disk prevSelected) {
{'fraction_non_alphanumeric': 0.09277456647398843, 'fraction_numerical': 0.0, 'mean_word_length': 4.204511278195489, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5666166', 'n_tokens_mistral': 978, 'n_tokens_neox': 966, 'n_words': 173}