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

This commit is contained in:
Ruben S. Montero committed 2014-11-20 15:30:23 +01:00
1 parent c6aa3d2234
commit a3d90ce88f
1 file changed
+6
+6
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);