mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
Feature #3907: The core infers the FSTYPE from the image Driver
This commit is contained in:
parent
1b22480d64
commit
047e8d8285
@ -108,6 +108,7 @@ int Image::insert(SqlDB *db, string& error_str)
|
||||
string source_attr;
|
||||
string saved_id;
|
||||
string size_attr;
|
||||
string driver;
|
||||
|
||||
istringstream iss;
|
||||
ostringstream oss;
|
||||
@ -195,10 +196,13 @@ int Image::insert(SqlDB *db, string& error_str)
|
||||
goto error_no_path;
|
||||
}
|
||||
|
||||
erase_template_attribute("FSTYPE", fs_type);
|
||||
get_template_attribute("DRIVER", driver);
|
||||
|
||||
// DATABLOCK image needs FSTYPE
|
||||
if (fs_type.empty())
|
||||
if (driver == "qcow2")
|
||||
{
|
||||
fs_type = "qcow2";
|
||||
}
|
||||
else
|
||||
{
|
||||
fs_type = "raw";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user