mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Feature #4597: Allow to create more VR VMs, and terminate existing ones
(cherry picked from commit 94070576d8)
This commit is contained in:
1 parent
8433a1f727
commit
ffdb41bc3e
21 files changed
+413
-70
No files matched your search
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user