mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
Feature #2413: Add ETHX_MAC context attribute for CONTEXT/NETWORK=YES
(cherry picked from commit 7f4bfee4cce1571acb8bea5f04d242a58da7d246)
This commit is contained in:
parent
a601da0f6b
commit
5827326f26
@ -686,6 +686,7 @@ int VirtualMachine::parse_context(string& error_str)
|
||||
|
||||
string name = vatt->vector_value("NETWORK");
|
||||
string ip = vatt->vector_value("IP");
|
||||
string mac = vatt->vector_value("MAC");
|
||||
string ip6 = vatt->vector_value("IP6_GLOBAL");
|
||||
string nic_id = vatt->vector_value("NIC_ID");
|
||||
|
||||
@ -697,6 +698,11 @@ int VirtualMachine::parse_context(string& error_str)
|
||||
|
||||
var.str(""); val.str("");
|
||||
|
||||
var << "ETH" << nic_id << "_MAC";
|
||||
context->replace(var.str(), mac);
|
||||
|
||||
var.str(""); val.str("");
|
||||
|
||||
var << "ETH" << nic_id << "_NETWORK";
|
||||
val << "$NETWORK[NETWORK_ADDRESS, NETWORK=\"" << name << "\"]";
|
||||
context->replace(var.str(), val.str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user