mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
Feature #1312: Remove BUS attribute form core
This commit is contained in:
parent
d5cb78a1d8
commit
256a63f9e6
@ -394,7 +394,6 @@ public:
|
||||
/**
|
||||
* Modifies the given disk attribute adding the following attributes:
|
||||
* * SOURCE: the file-path.
|
||||
* * BUS: will only be set if the Image's definition includes it.
|
||||
* * TARGET: will only be set if the Image's definition includes it.
|
||||
*
|
||||
* @param disk attribute for the VM template
|
||||
|
@ -426,7 +426,6 @@ int Image::disk_attribute( VectorAttribute * disk,
|
||||
ImageType& img_type,
|
||||
string& dev_prefix)
|
||||
{
|
||||
string bus;
|
||||
string target;
|
||||
string driver;
|
||||
string disk_attr_type;
|
||||
@ -434,17 +433,14 @@ int Image::disk_attribute( VectorAttribute * disk,
|
||||
ostringstream iid;
|
||||
|
||||
img_type = type;
|
||||
bus = disk->vector_value("BUS");
|
||||
target = disk->vector_value("TARGET");
|
||||
driver = disk->vector_value("DRIVER");
|
||||
dev_prefix = disk->vector_value("DEV_PREFIX");
|
||||
iid << oid;
|
||||
|
||||
string template_bus;
|
||||
string template_target;
|
||||
string template_driver;
|
||||
|
||||
get_template_attribute("BUS", template_bus);
|
||||
get_template_attribute("TARGET", template_target);
|
||||
get_template_attribute("DRIVER", template_driver);
|
||||
|
||||
@ -468,11 +464,6 @@ int Image::disk_attribute( VectorAttribute * disk,
|
||||
disk->replace("IMAGE_ID", iid.str());
|
||||
disk->replace("SOURCE", source);
|
||||
|
||||
if (bus.empty() && !template_bus.empty()) //BUS in Image, not in DISK
|
||||
{
|
||||
disk->replace("BUS",template_bus);
|
||||
}
|
||||
|
||||
if (driver.empty() && !template_driver.empty())//DRIVER in Image,not in DISK
|
||||
{
|
||||
disk->replace("DRIVER",template_driver);
|
||||
|
Loading…
x
Reference in New Issue
Block a user