mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-21 18:03:38 +03:00
B #2544: Added DISK_TYPE to DISK section
This commit is contained in:
parent
807000a59c
commit
aeaf870cad
@ -264,7 +264,7 @@ public:
|
||||
* Verify the proper definition of the TM_MAD by checking the attributes
|
||||
* related to the TM defined in TM_MAD_CONF
|
||||
*/
|
||||
int get_tm_mad_targets(const string &tm_mad, string& ln_target, string& clone_target);
|
||||
int get_tm_mad_targets(const string &tm_mad, string& ln_target, string& clone_target, string& disk_type);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ bool Datastore::is_persistent_only()
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
int Datastore::get_tm_mad_targets(const string &tm_mad, string& ln_target, string& clone_target)
|
||||
int Datastore::get_tm_mad_targets(const string &tm_mad, string& ln_target, string& clone_target, string& disk_type)
|
||||
{
|
||||
if (!tm_mad.empty())
|
||||
{
|
||||
@ -1118,6 +1118,13 @@ int Datastore::get_tm_mad_targets(const string &tm_mad, string& ln_target, strin
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
get_template_attribute("DISK_TYPE_" + tm_mad_t, disk_type);
|
||||
|
||||
if (disk_type.empty())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1625,7 +1625,7 @@ int VirtualMachineDisks::check_tm_mad(const string& tm_mad)
|
||||
{
|
||||
int ds_img_id;
|
||||
Datastore * ds_img;
|
||||
string ln_target, clone_target;
|
||||
string ln_target, clone_target, disk_type;
|
||||
string tm_mad_disk, tm_mad_sys, _tm_mad;
|
||||
_tm_mad = tm_mad;
|
||||
|
||||
@ -1648,7 +1648,7 @@ int VirtualMachineDisks::check_tm_mad(const string& tm_mad)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( ds_img->get_tm_mad_targets(tm_mad, ln_target, clone_target) != 0 )
|
||||
if ( ds_img->get_tm_mad_targets(tm_mad, ln_target, clone_target, disk_type) != 0 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -1657,6 +1657,7 @@ int VirtualMachineDisks::check_tm_mad(const string& tm_mad)
|
||||
|
||||
(*it)->replace("CLONE_TARGET", clone_target);
|
||||
(*it)->replace("LN_TARGET", ln_target);
|
||||
(*it)->replace("DISK_TYPE", disk_type);
|
||||
(*it)->replace("TM_MAD_SYSTEM", one_util::tolower(tm_mad_sys));
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user