mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-15 17:23:10 +09:00
Feature #2413: Add ETHX_MAC context attribute for CONTEXT/NETWORK=YES
(cherry picked from commit 7f4bfee4cc)
This commit is contained in:
1 parent
a601da0f6b
commit
5827326f26
1 file changed
+6
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user