Feature #2413: Add ETHX_MAC context attribute for CONTEXT/NETWORK=YES

(cherry picked from commit 7f4bfee4cc)
This commit is contained in:
Carlos Martín authored and Ruben S. Montero committed 2013-11-11 22:51:37 +01:00
1 parent a601da0f6b
commit 5827326f26
1 file changed
+6
+6
View File
@@ -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());