mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Added inteface model selection to kvm driver (#93)
git-svn-id: http://svn.opennebula.org/one/trunk@505 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
0ffe14c3b6
commit
2c567957c3
@ -58,6 +58,7 @@ int LibVirtDriver::deployment_description(
|
||||
string mac = "";
|
||||
string bridge = "";
|
||||
string script = "";
|
||||
string model = "";
|
||||
|
||||
const VectorAttribute * graphics;
|
||||
|
||||
@ -350,7 +351,7 @@ int LibVirtDriver::deployment_description(
|
||||
|
||||
num = vm->get_template_attribute("NIC",attrs);
|
||||
|
||||
for(int i=0; i<num;i++,mac="",bridge="",target="",script="")
|
||||
for(int i=0; i<num;i++,mac="",bridge="",target="",script="",model="")
|
||||
{
|
||||
nic = dynamic_cast<const VectorAttribute *>(attrs[i]);
|
||||
|
||||
@ -391,6 +392,13 @@ int LibVirtDriver::deployment_description(
|
||||
{
|
||||
file << "\t\t\t<script path='" << script << "'/>" << endl;
|
||||
}
|
||||
|
||||
model = nic->vector_value("MODEL");
|
||||
|
||||
if( !model.empty() )
|
||||
{
|
||||
file << "\t\t\t<model type='" << model << "'/>" << endl;
|
||||
}
|
||||
|
||||
file << "\t\t</interface>" << endl;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user