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

B #3705: DRIVER configuration for the TM_MAD_CONF

This commit is contained in:
Vlastimil Holer 2017-05-18 20:31:51 +02:00 committed by Vlastimil Holer
parent 1393bff1c5
commit 3c71258c84
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53
4 changed files with 24 additions and 13 deletions

View File

@ -156,7 +156,8 @@ private:
const std::string& ln_target,
const std::string& clone_target,
const std::string& shared,
const std::string& ds_migrate);
const std::string& ds_migrate,
const std::string& driver);
/**
* Sets a the defaults for a Market

View File

@ -990,7 +990,8 @@ TM_MAD_CONF = [
]
TM_MAD_CONF = [
NAME = "fs_lvm", LN_TARGET = "SYSTEM", CLONE_TARGET = "SYSTEM", SHARED="YES"
NAME = "fs_lvm", LN_TARGET = "SYSTEM", CLONE_TARGET = "SYSTEM", SHARED="YES",
DRIVER = "raw"
]
TM_MAD_CONF = [
@ -1004,7 +1005,7 @@ TM_MAD_CONF = [
TM_MAD_CONF = [
NAME = "ceph", LN_TARGET = "NONE", CLONE_TARGET = "SELF", SHARED = "YES",
DS_MIGRATE = "NO"
DS_MIGRATE = "NO", DRIVER = "raw"
]
TM_MAD_CONF = [

View File

@ -342,6 +342,13 @@ int Datastore::set_tm_mad(string &tm_mad, string &error_str)
replace_template_attribute("CLONE_TARGET", st);
st = vatt->vector_value("DRIVER");
if (!st.empty())
{
replace_template_attribute("DRIVER", st);
}
remove_template_attribute("SHARED");
}

View File

@ -123,15 +123,15 @@ void OpenNebulaTemplate::set_multiple_conf_default()
# dev
#*******************************************************************************
*/
set_conf_tm("dummy", "NONE", "SYSTEM", "YES", "YES");
set_conf_tm("lvm", "NONE", "SELF", "YES", "NO");
set_conf_tm("shared", "NONE", "SYSTEM", "YES", "YES");
set_conf_tm("fs_lvm", "SYSTEM", "SYSTEM", "YES", "NO");
set_conf_tm("qcow2", "NONE", "SYSTEM", "YES", "NO");
set_conf_tm("ssh", "SYSTEM", "SYSTEM", "NO", "YES");
set_conf_tm("vmfs", "NONE", "SYSTEM", "YES", "NO");
set_conf_tm("ceph", "NONE", "SELF", "YES", "NO");
set_conf_tm("dev", "NONE", "NONE", "YES", "NO");
set_conf_tm("dummy", "NONE", "SYSTEM", "YES", "YES", "");
set_conf_tm("lvm", "NONE", "SELF", "YES", "NO", "");
set_conf_tm("shared", "NONE", "SYSTEM", "YES", "YES", "");
set_conf_tm("fs_lvm", "SYSTEM", "SYSTEM", "YES", "NO", "raw");
set_conf_tm("qcow2", "NONE", "SYSTEM", "YES", "NO", "");
set_conf_tm("ssh", "SYSTEM", "SYSTEM", "NO", "YES", "");
set_conf_tm("vmfs", "NONE", "SYSTEM", "YES", "NO", "");
set_conf_tm("ceph", "NONE", "SELF", "YES", "NO", "raw");
set_conf_tm("dev", "NONE", "NONE", "YES", "NO", "");
register_multiple_conf_default("TM_MAD_CONF");
/*
@ -301,7 +301,8 @@ void OpenNebulaTemplate::set_conf_tm(const std::string& name,
const std::string& ln_target,
const std::string& clone_target,
const std::string& shared,
const std::string& ds_migrate)
const std::string& ds_migrate,
const std::string& driver)
{
VectorAttribute * vattribute;
std::map<std::string,std::string> vvalue;
@ -311,6 +312,7 @@ void OpenNebulaTemplate::set_conf_tm(const std::string& name,
vvalue.insert(make_pair("CLONE_TARGET", clone_target));
vvalue.insert(make_pair("SHARED", shared));
vvalue.insert(make_pair("DS_MIGRATE", ds_migrate));
vvalue.insert(make_pair("DRIVER", driver));
vattribute = new VectorAttribute("TM_MAD_CONF", vvalue);
conf_default.insert(make_pair(vattribute->name(), vattribute));