mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #200: Finising the Virtual Network publish functionality
This commit is contained in:
parent
ed48b53497
commit
ac3b37767f
@ -254,11 +254,23 @@ int VirtualNetwork::insert(SqlDB * db)
|
||||
{
|
||||
ostringstream ose;
|
||||
int rc;
|
||||
|
||||
string public_attr;
|
||||
|
||||
if ( vn_template.id == -1 )
|
||||
{
|
||||
vn_template.id = oid;
|
||||
}
|
||||
|
||||
// ------------ PUBLIC --------------------
|
||||
|
||||
get_template_attribute("PUBLIC", public_attr);
|
||||
|
||||
transform (public_attr.begin(), public_attr.end(), public_attr.begin(),
|
||||
(int(*)(int))toupper);
|
||||
|
||||
public_vnet = (public_attr == "YES");
|
||||
vn_template.erase("PUBLIC");
|
||||
|
||||
// Insert the template first
|
||||
rc = vn_template.insert(db);
|
||||
|
@ -72,7 +72,6 @@ int VirtualNetworkPool::allocate (
|
||||
|
||||
string name;
|
||||
string bridge;
|
||||
string public_attr;
|
||||
|
||||
string s_type;
|
||||
|
||||
@ -122,16 +121,6 @@ int VirtualNetworkPool::allocate (
|
||||
vn->get_template_attribute("BRIDGE",bridge);
|
||||
vn->bridge = bridge;
|
||||
|
||||
// ------------ PUBLIC --------------------
|
||||
|
||||
vn->get_template_attribute("PUBLIC", public_attr);
|
||||
|
||||
transform (public_attr.begin(), public_attr.end(), public_attr.begin(),
|
||||
(int(*)(int))toupper);
|
||||
|
||||
vn->public_vnet = (public_attr == "YES");
|
||||
vn->vn_template.erase("PUBLIC");
|
||||
|
||||
// Insert the VN in the pool so we have a valid OID
|
||||
|
||||
*oid = PoolSQL::allocate(vn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user