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

Feature #1112: Fix tests compilation

This commit is contained in:
Carlos Martín 2012-03-05 17:53:17 +01:00
parent 05fdb88739
commit 5ea3d682ee
6 changed files with 29 additions and 2 deletions

View File

@ -27,6 +27,7 @@
#include "UserPool.h"
#include "VMTemplatePool.h"
#include "DatastorePool.h"
#include "ClusterPool.h"
#include "VirtualMachineManager.h"
#include "LifeCycleManager.h"
@ -46,7 +47,8 @@ protected:
NebulaTest():mysql(false), need_host_pool(false), need_vm_pool(false),
need_vnet_pool(false), need_image_pool(false),
need_user_pool(false), need_template_pool(false),
need_group_pool(false),
need_group_pool(false), need_datastore_pool(false),
need_cluster_pool(false),
need_vmm(false),
need_im(false), need_tm(false),
need_lcm(false), need_dm(false),
@ -69,6 +71,7 @@ public:
bool need_template_pool;
bool need_group_pool;
bool need_datastore_pool;
bool need_cluster_pool;
bool need_vmm;
bool need_im;
@ -111,6 +114,8 @@ public:
virtual DatastorePool* create_dspool(SqlDB* db);
virtual ClusterPool* create_clpool(SqlDB* db);
// ------------------------------------------------------------------------
// Managers
// ------------------------------------------------------------------------

View File

@ -92,6 +92,11 @@ void Nebula::start()
delete dspool;
}
if ( clpool != 0)
{
delete clpool;
}
if ( vmm != 0)
{
delete vmm;
@ -190,6 +195,7 @@ void Nebula::start()
GroupPool::bootstrap(db);
AclManager::bootstrap(db);
DatastorePool::bootstrap(db);
ClusterPool::bootstrap(db);
}
catch (exception&)
{
@ -205,6 +211,11 @@ void Nebula::start()
string default_image_type = "OS";
string default_device_prefix = "hd";
if (tester->need_cluster_pool)
{
clpool = tester->create_clpool(db);
}
if (tester->need_vm_pool)
{
vmpool = tester->create_vmpool(db,hook_location,var_location);

View File

@ -67,6 +67,11 @@ DatastorePool* NebulaTest::create_dspool(SqlDB* db)
return new DatastorePool(db);
}
ClusterPool* NebulaTest::create_clpool(SqlDB* db)
{
return new ClusterPool(db);
}
// -----------------------------------------------------------
// Managers
// -----------------------------------------------------------

View File

@ -29,6 +29,8 @@ env.Prepend(LIBS=[
'nebula_xml',
'nebula_image',
'nebula_datastore',
'nebula_cluster',
'nebula_um',
'nebula_mad',
'nebula_common',
'nebula_log',

View File

@ -22,6 +22,8 @@ env.Prepend(LIBS=[
'nebula_vm',
'nebula_vmtemplate',
'nebula_hm',
'nebula_cluster',
'nebula_datastore',
'nebula_vnm',
'nebula_authm',
'nebula_acl',

View File

@ -125,7 +125,9 @@ public:
if( rc == 0 )
{
return VirtualNetworkPool::allocate(uid, 0,"the_user","oneadmin", vn_template, oid, err);
return VirtualNetworkPool::allocate(uid, 0,"the_user","oneadmin",
vn_template, oid, ClusterPool::NONE_CLUSTER_ID,
ClusterPool::NONE_CLUSTER_NAME, err);
}
else
{