mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
Feature #4215: Add support for VROUTER_HOOKS
This commit is contained in:
parent
cb8d84849e
commit
19a58bfbae
@ -27,7 +27,14 @@ class VirtualRouterPool : public PoolSQL
|
||||
{
|
||||
public:
|
||||
|
||||
VirtualRouterPool(SqlDB * db) : PoolSQL(db, VirtualRouter::table, true, true){};
|
||||
VirtualRouterPool(
|
||||
SqlDB * db,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location)
|
||||
: PoolSQL(db, VirtualRouter::table, true, true)
|
||||
{
|
||||
register_hooks(hook_mads, remotes_location);
|
||||
};
|
||||
|
||||
~VirtualRouterPool(){};
|
||||
|
||||
|
@ -728,6 +728,7 @@ DATASTORE_MAD = [
|
||||
# - NO, The hook is executed in the OpenNebula server (default)
|
||||
#
|
||||
# Virtual Network (VNET_HOOK)
|
||||
# Virtual Router (VROUTER_HOOK)
|
||||
# User (USER_HOOK)
|
||||
# Group (GROUP_HOOK)
|
||||
# Image (IMAGE_HOOK)
|
||||
|
@ -473,6 +473,7 @@ void Nebula::start(bool bootstrap_only)
|
||||
|
||||
vector<const Attribute *> vm_hooks;
|
||||
vector<const Attribute *> host_hooks;
|
||||
vector<const Attribute *> vrouter_hooks;
|
||||
vector<const Attribute *> vnet_hooks;
|
||||
vector<const Attribute *> user_hooks;
|
||||
vector<const Attribute *> group_hooks;
|
||||
@ -492,14 +493,14 @@ void Nebula::start(bool bootstrap_only)
|
||||
docpool = new DocumentPool(db);
|
||||
zonepool= new ZonePool(db, is_federation_slave());
|
||||
vdcpool = new VdcPool(db, is_federation_slave());
|
||||
vrouterpool = new VirtualRouterPool(db);
|
||||
|
||||
nebula_configuration->get("VM_HOOK", vm_hooks);
|
||||
nebula_configuration->get("HOST_HOOK", host_hooks);
|
||||
nebula_configuration->get("VNET_HOOK", vnet_hooks);
|
||||
nebula_configuration->get("USER_HOOK", user_hooks);
|
||||
nebula_configuration->get("GROUP_HOOK", group_hooks);
|
||||
nebula_configuration->get("IMAGE_HOOK", image_hooks);
|
||||
nebula_configuration->get("VM_HOOK", vm_hooks);
|
||||
nebula_configuration->get("HOST_HOOK", host_hooks);
|
||||
nebula_configuration->get("VROUTER_HOOK", vrouter_hooks);
|
||||
nebula_configuration->get("VNET_HOOK", vnet_hooks);
|
||||
nebula_configuration->get("USER_HOOK", user_hooks);
|
||||
nebula_configuration->get("GROUP_HOOK", group_hooks);
|
||||
nebula_configuration->get("IMAGE_HOOK", image_hooks);
|
||||
|
||||
nebula_configuration->get("VM_RESTRICTED_ATTR", vm_restricted_attrs);
|
||||
nebula_configuration->get("IMAGE_RESTRICTED_ATTR", img_restricted_attrs);
|
||||
@ -565,6 +566,10 @@ void Nebula::start(bool bootstrap_only)
|
||||
remotes_location,
|
||||
host_expiration);
|
||||
|
||||
vrouterpool = new VirtualRouterPool(db,
|
||||
vrouter_hooks,
|
||||
remotes_location);
|
||||
|
||||
nebula_configuration->get("MAC_PREFIX", mac_prefix);
|
||||
nebula_configuration->get("NETWORK_SIZE", size);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user