1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Feature #1678: DS inserts clone & ln target attributes into each disk

(cherry picked from commit 4487c7cc62ecc14d1f6853858e17e52b6e21541c)
This commit is contained in:
Carlos Martín 2013-10-16 12:36:46 +02:00 committed by Javi Fontan
parent 374520dfb5
commit 4f916854a0

View File

@ -76,6 +76,7 @@ Datastore::Datastore(
int Datastore::disk_attribute(VectorAttribute * disk)
{
ostringstream oss;
string st;
oss << oid;
@ -91,6 +92,22 @@ int Datastore::disk_attribute(VectorAttribute * disk)
disk->replace("CLUSTER_ID", oss.str());
}
get_template_attribute("CLONE_TARGET", st);
if(!st.empty())
{
disk->replace("CLONE_TARGET", st);
}
get_template_attribute("LN_TARGET", st);
if(!st.empty())
{
disk->replace("LN_TARGET", st);
}
// TODO: if _TARGET is empty, set defaults?
return 0;
}