Feature #4597: Allow to create more VR VMs, and terminate existing ones

(cherry picked from commit 94070576d8)
This commit is contained in:
Carlos Martín committed 2016-07-08 11:21:59 +02:00
1 parent 8433a1f727
commit ffdb41bc3e
21 files changed
+413 -70

No files matched your search

+7 -1
View File
@@ -20,6 +20,7 @@
#include "ActionManager.h"
#include "HostPool.h"
#include "VirtualMachinePool.h"
#include "VirtualRouterPool.h"
using namespace std;
@@ -36,7 +37,7 @@ class DispatchManager : public ActionListener
public:
DispatchManager():
hpool(0), vmpool(0), tm(0), vmm(0), lcm(0), imagem(0)
hpool(0), vmpool(0), vrouterpool(0), tm(0), vmm(0), lcm(0), imagem(0)
{
am.addListener(this);
};
@@ -457,6 +458,11 @@ private:
*/
VirtualMachinePool * vmpool;
/**
* Pointer to the Virtual Machine Pool, to access hosts
*/
VirtualRouterPool * vrouterpool;
/**
* Pointer to TransferManager
*/
+19
View File
@@ -47,6 +47,11 @@ public:
return vms.add(vmid);
}
int del_vmid(int vmid)
{
return vms.del(vmid);
}
bool has_vmids() const
{
return vms.size() > 0;
@@ -105,6 +110,20 @@ public:
*/
int append_template(const string& tmpl_str, bool keep_restricted, string& error);
/**
* Set the template ID to instantiate new VMs
*
* @param tmpl_id VM Template ID
*/
void set_template_id(int tmpl_id);
/**
* Get the template ID set with set_template_id
*
* @return VM Template ID, or -1 if it was not found
*/
int get_template_id();
// ------------------------------------------------------------------------
// Attach and detach NIC
// ------------------------------------------------------------------------