mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #3789: Reference Network used by a NIC in context
This commit is contained in:
parent
7e26c511ab
commit
4b66f92b08
@ -787,7 +787,6 @@ error_cleanup:
|
||||
static void parse_context_network(const char* vars[][2], int num_vars,
|
||||
VectorAttribute * context, VectorAttribute * nic)
|
||||
{
|
||||
string name = nic->vector_value("NETWORK");
|
||||
string nic_id = nic->vector_value("NIC_ID");
|
||||
|
||||
for (int i=0; i < num_vars; i++)
|
||||
@ -810,7 +809,7 @@ static void parse_context_network(const char* vars[][2], int num_vars,
|
||||
{
|
||||
ostringstream cval_ss;
|
||||
|
||||
cval_ss << "$NETWORK["<< vars[i][1] <<", NETWORK=\""<< name <<"\"]";
|
||||
cval_ss << "$NETWORK["<< vars[i][1] <<", NIC_ID=\""<< nic_id <<"\"]";
|
||||
cval = cval_ss.str();
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,8 @@ void get_network_attribute(VirtualMachine * vm,
|
||||
|
||||
attr_value.clear();
|
||||
|
||||
if ( net_name.empty() || (net_name!="NETWORK" && net_name!="NETWORK_ID") )
|
||||
if ( net_name.empty() ||
|
||||
(net_name!="NETWORK" && net_name!="NETWORK_ID" && net_name!="NIC_ID"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -176,7 +176,8 @@ void get_network_attribute(VirtualMachine * vm,
|
||||
|
||||
attr_value.clear();
|
||||
|
||||
if ( net_name.empty() || (net_name!="NETWORK" && net_name!="NETWORK_ID") )
|
||||
if ( net_name.empty() ||
|
||||
(net_name!="NETWORK" && net_name!="NETWORK_ID" && net_name!="NIC_ID"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user