mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #487: Fix tests
This commit is contained in:
parent
5b9fed52f7
commit
085d86e12e
@ -26,6 +26,7 @@
|
||||
#include "HostPool.h"
|
||||
#include "UserPool.h"
|
||||
#include "ClusterPool.h"
|
||||
#include "VMTemplatePool.h"
|
||||
|
||||
#include "VirtualMachineManager.h"
|
||||
#include "LifeCycleManager.h"
|
||||
@ -42,7 +43,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_cluster_pool(false),need_vmm(false),
|
||||
need_user_pool(false), need_cluster_pool(false),
|
||||
need_template_pool(false),need_vmm(false),
|
||||
need_im(false), need_tm(false),
|
||||
need_lcm(false), need_dm(false),
|
||||
need_rm(false), need_hm(false),
|
||||
@ -62,6 +64,7 @@ public:
|
||||
bool need_image_pool;
|
||||
bool need_user_pool;
|
||||
bool need_cluster_pool;
|
||||
bool need_template_pool;
|
||||
|
||||
bool need_vmm;
|
||||
bool need_im;
|
||||
@ -98,6 +101,8 @@ public:
|
||||
|
||||
virtual ClusterPool* create_cpool(SqlDB* db);
|
||||
|
||||
virtual VMTemplatePool* create_tpool(SqlDB* db);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Managers
|
||||
// ------------------------------------------------------------------------
|
||||
@ -127,6 +132,7 @@ public:
|
||||
UserPool * upool,
|
||||
ImagePool * ipool,
|
||||
ClusterPool * cpool,
|
||||
VMTemplatePool * tpool,
|
||||
string log_file);
|
||||
|
||||
virtual HookManager* create_hm(VirtualMachinePool * vmpool);
|
||||
|
@ -26,7 +26,6 @@ env.Prepend(LIBS=[
|
||||
'nebula_common',
|
||||
'nebula_sql',
|
||||
|
||||
|
||||
### TODO: delete not needed
|
||||
'nebula_core_test',
|
||||
'nebula_host',
|
||||
@ -40,6 +39,7 @@ env.Prepend(LIBS=[
|
||||
'nebula_mad',
|
||||
'nebula_template',
|
||||
'nebula_vm',
|
||||
'nebula_vmtemplate',
|
||||
'nebula_vnm',
|
||||
'nebula_image',
|
||||
'nebula_pool',
|
||||
|
@ -31,6 +31,7 @@ env.Prepend(LIBS=[
|
||||
'nebula_mad',
|
||||
'nebula_template',
|
||||
'nebula_vm',
|
||||
'nebula_vmtemplate',
|
||||
'nebula_vnm',
|
||||
'nebula_image',
|
||||
'nebula_pool',
|
||||
|
@ -30,6 +30,7 @@ env.Prepend(LIBS=[
|
||||
'nebula_mad',
|
||||
'nebula_template',
|
||||
'nebula_vm',
|
||||
'nebula_vmtemplate',
|
||||
'nebula_vnm',
|
||||
'nebula_image',
|
||||
'nebula_pool',
|
||||
|
@ -82,6 +82,11 @@ void Nebula::start()
|
||||
delete cpool;
|
||||
}
|
||||
|
||||
if ( tpool != 0)
|
||||
{
|
||||
delete tpool;
|
||||
}
|
||||
|
||||
if ( vmm != 0)
|
||||
{
|
||||
delete vmm;
|
||||
@ -214,6 +219,11 @@ void Nebula::start()
|
||||
{
|
||||
cpool = tester->create_cpool(db);
|
||||
}
|
||||
|
||||
if (tester->need_template_pool)
|
||||
{
|
||||
tpool = tester->create_tpool(db);
|
||||
}
|
||||
}
|
||||
catch (exception&)
|
||||
{
|
||||
@ -358,7 +368,7 @@ void Nebula::start()
|
||||
{
|
||||
try
|
||||
{
|
||||
rm = tester->create_rm(vmpool,hpool,vnpool,upool,ipool,cpool,
|
||||
rm = tester->create_rm(vmpool,hpool,vnpool,upool,ipool,cpool,tpool,
|
||||
log_location + "one_xmlrpc.log");
|
||||
}
|
||||
catch (bad_alloc&)
|
||||
|
@ -54,6 +54,11 @@ ClusterPool* NebulaTest::create_cpool(SqlDB* db)
|
||||
return new ClusterPool(db);
|
||||
}
|
||||
|
||||
VMTemplatePool* NebulaTest::create_tpool(SqlDB* db)
|
||||
{
|
||||
return new VMTemplatePool(db);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Managers
|
||||
// -----------------------------------------------------------
|
||||
@ -112,6 +117,7 @@ RequestManager* NebulaTest::create_rm(
|
||||
UserPool * upool,
|
||||
ImagePool * ipool,
|
||||
ClusterPool * cpool,
|
||||
VMTemplatePool * tpool,
|
||||
string log_file)
|
||||
{
|
||||
int rm_port = 2633;
|
||||
@ -122,6 +128,7 @@ RequestManager* NebulaTest::create_rm(
|
||||
upool,
|
||||
ipool,
|
||||
cpool,
|
||||
tpool,
|
||||
rm_port,
|
||||
log_file);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user