diff --git a/include/DispatchManager.h b/include/DispatchManager.h index 6f42c6fee7..797c620fbf 100644 --- a/include/DispatchManager.h +++ b/include/DispatchManager.h @@ -21,6 +21,7 @@ #include "HostPool.h" #include "VirtualMachinePool.h" #include "VirtualRouterPool.h" +#include "ClusterPool.h" using namespace std; @@ -82,7 +83,7 @@ class DispatchManager : public ActionListener public: DispatchManager(): - hpool(0), vmpool(0), vrouterpool(0), tm(0), vmm(0), lcm(0), imagem(0) + hpool(0), vmpool(0), clpool(0), vrouterpool(0), tm(0), vmm(0), lcm(0), imagem(0) { am.addListener(this); }; @@ -497,7 +498,12 @@ private: VirtualMachinePool * vmpool; /** - * Pointer to the Virtual Machine Pool, to access hosts + * Pointer to the Cluster Pool + */ + ClusterPool * clpool; + + /** + * Pointer to the Virtual Router Pool */ VirtualRouterPool * vrouterpool; diff --git a/src/dm/DispatchManager.cc b/src/dm/DispatchManager.cc index 128d479cb5..5c9a32a66b 100644 --- a/src/dm/DispatchManager.cc +++ b/src/dm/DispatchManager.cc @@ -109,6 +109,7 @@ void DispatchManager::init_managers() hpool = nd.get_hpool(); vmpool = nd.get_vmpool(); + clpool = nd.get_clpool(); vrouterpool = nd.get_vrouterpool(); } diff --git a/src/dm/DispatchManagerActions.cc b/src/dm/DispatchManagerActions.cc index d4ce82ee0b..ba19b069b0 100644 --- a/src/dm/DispatchManagerActions.cc +++ b/src/dm/DispatchManagerActions.cc @@ -214,19 +214,33 @@ void DispatchManager::free_vm_resources(VirtualMachine * vm) Template* tmpl; vector