1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

feature #3183: Add search methods to VNET and VM Pools

This commit is contained in:
Ruben S. Montero 2014-09-11 10:34:18 +02:00
parent aad765a8ab
commit 76038d168d
2 changed files with 22 additions and 0 deletions

View File

@ -123,6 +123,17 @@ public:
int get_pending(
vector<int>& oids);
/**
* Gets the IDs of VMs matching the given SQL where string.
* @param oids a vector that contains the IDs
* @param where SQL clause
* @return 0 on success
*/
int search(vector<int>& oids, const string& where)
{
return PoolSQL::search(oids, VirtualMachine::table, where);
};
//--------------------------------------------------------------------------
// Virtual Machine DB access functions
//--------------------------------------------------------------------------

View File

@ -168,6 +168,17 @@ public:
return _default_size;
};
/**
* Gets the IDs of VNETs matching the given SQL where string.
* @param oids a vector that contains the IDs
* @param where SQL clause
* @return 0 on success
*/
int search(vector<int>& oids, const string& where)
{
return PoolSQL::search(oids, VirtualNetwork::table, where);
};
private:
/**
* Holds the system-wide MAC prefix