mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
M #-: Remove unneeded check
This commit is contained in:
parent
bf4065462e
commit
15f41d53c4
@ -575,6 +575,8 @@ void Image::disk_attribute(VirtualMachineDisk * disk,
|
||||
// Force FORMAT and DRIVER from image
|
||||
if (!format.empty())
|
||||
{
|
||||
one_util::tolower(format);
|
||||
|
||||
disk->replace("DRIVER", format);
|
||||
disk->replace("FORMAT", format);
|
||||
}
|
||||
@ -583,6 +585,7 @@ void Image::disk_attribute(VirtualMachineDisk * disk,
|
||||
disk->remove("DRIVER");
|
||||
disk->remove("FORMAT");
|
||||
}
|
||||
|
||||
disk->replace("IMAGE_STATE", state);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@ -613,9 +616,8 @@ void Image::disk_attribute(VirtualMachineDisk * disk,
|
||||
disk->replace("PERSISTENT", "YES");
|
||||
disk->replace("CLONE", "NO");
|
||||
disk->replace("SAVE", "YES");
|
||||
|
||||
if (template_ptype == "SHAREABLE" &&
|
||||
one_util::tolower(format) == "raw")
|
||||
|
||||
if (template_ptype == "SHAREABLE" && format == "raw")
|
||||
{
|
||||
disk->replace("SHAREABLE", "YES");
|
||||
}
|
||||
|
@ -118,15 +118,10 @@ int TransferManager::prolog_transfer_command(
|
||||
size = disk->vector_value("SIZE");
|
||||
format = disk->vector_value("FORMAT");
|
||||
|
||||
if (format.empty())
|
||||
if ( size.empty() || format.empty() )
|
||||
{
|
||||
format = "raw";
|
||||
}
|
||||
|
||||
if ( size.empty() )
|
||||
{
|
||||
os << "No size in FS";
|
||||
vm->log("TrM", Log::WARNING, "No size in FS, skipping");
|
||||
os << "No size or format in FS";
|
||||
vm->log("TrM", Log::WARNING, "No size or format in FS, skipping");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user