Source:
<code>protected boolean canDoAction() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ADD); boolean returnValue = super.canDoAction() && InitializeVds() && checkStorageDomainNameLengthValid(); if (returnValue && IsStorageWithSameNameExists()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ISO && !(getStorageDomain().getStorageType() == StorageType.NFS <START> || getStorageDomain().getStorageType() == StorageType.LOCALFS)) { <END> addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ImportExport && getStorageDomain().getStorageType() == StorageType.LOCALFS) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.Master) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } boolean isSupportedStorageFormat = isStorageFormatSupportedByStoragePool() && isStorageFormatCompatibleWithDomain(); if (returnValue && !isSupportedStorageFormat) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST); getReturnValue().getCanDoActionMessages().add( String.format("$storageFormat %1$s", getStorageDomain().getStorageFormat().toString())); returnValue = false; } return returnValue && CanAddDomain(); }</code><technical_language>If accept suggestion support file domains general, this replaced getStorageDoamin().getStorageType().isFileDomain()</technical_language>

Target:
protected boolean canDoAction() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__ADD); boolean returnValue = super.canDoAction() && InitializeVds() && checkStorageDomainNameLengthValid(); if (returnValue && IsStorageWithSameNameExists()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ISO && !getStorageDomain().getStorageType().isFileDomain()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.ImportExport && getStorageDomain().getStorageType() == StorageType.LOCALFS) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } if (returnValue && getStorageDomain().getStorageDomainType() == StorageDomainType.Master) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); returnValue = false; } boolean isSupportedStorageFormat = isStorageFormatSupportedByStoragePool() && isStorageFormatCompatibleWithDomain(); if (returnValue && !isSupportedStorageFormat) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST); getReturnValue().getCanDoActionMessages().add( String.format("$storageFormat %1$s", getStorageDomain().getStorageFormat().toString())); returnValue = false; } return returnValue && canAddDomain(); }