1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #3175: Remove duplicated sgs when the VNET is inserted

This commit is contained in:
Ruben S. Montero 2014-11-20 15:30:23 +01:00
parent c6aa3d2234
commit a3d90ce88f

View File

@ -211,7 +211,13 @@ int VirtualNetwork::insert(SqlDB * db, string& error_str)
}
else
{
set<int> sgs;
sg_str.append(",0");
one_util::split_unique(sg_str, ',', sgs);
sg_str = one_util::join(sgs.begin(), sgs.end(), ',');
}
add_template_attribute("SECURITY_GROUPS", sg_str);