From 4f916854a0d50782d53c6a304e08eb50d441bfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Wed, 16 Oct 2013 12:36:46 +0200 Subject: [PATCH] Feature #1678: DS inserts clone & ln target attributes into each disk (cherry picked from commit 4487c7cc62ecc14d1f6853858e17e52b6e21541c) --- src/datastore/Datastore.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/datastore/Datastore.cc b/src/datastore/Datastore.cc index c20a11b3da..d0960b3b8d 100644 --- a/src/datastore/Datastore.cc +++ b/src/datastore/Datastore.cc @@ -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; }