mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
B #3705: Don't override image DRIVER if CDROM
This commit is contained in:
1 file changed
+9
-3
@@ -107,6 +107,7 @@ void Datastore::disk_attribute(
|
||||
string st;
|
||||
string inherit_val;
|
||||
string current_val;
|
||||
string type;
|
||||
|
||||
vector<string>::const_iterator it;
|
||||
|
||||
@@ -148,11 +149,16 @@ void Datastore::disk_attribute(
|
||||
disk->replace("DISK_TYPE", Image::disk_type_to_str(get_disk_type()));
|
||||
}
|
||||
|
||||
get_template_attribute("DRIVER", st);
|
||||
type = disk->vector_value("TYPE");
|
||||
|
||||
if(!st.empty())
|
||||
if (type != "CDROM")
|
||||
{
|
||||
disk->replace("DRIVER", st);
|
||||
get_template_attribute("DRIVER", st);
|
||||
|
||||
if(!st.empty())
|
||||
{
|
||||
disk->replace("DRIVER", st);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user