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

feature #407: moved dump to .h

This commit is contained in:
Ruben S. Montero 2011-03-09 13:23:01 +01:00
parent 6246c89df9
commit 6ea29d6881
8 changed files with 16 additions and 35 deletions

View File

@ -138,7 +138,10 @@ public:
*
* @return 0 on success
*/
int dump(ostringstream& oss, const string& where);
int dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "HOST_POOL", Host::table, where);
}
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */

View File

@ -118,7 +118,10 @@ public:
* @param where filter for the objects, defaults to all
* @return 0 on success
*/
int dump(ostringstream& oss, const string& where);
int dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "IMAGE_POOL", Image::table, where);
}
/**
* Generates a DISK attribute for VM templates using the Image metadata

View File

@ -125,7 +125,10 @@ public:
*
* @return 0 on success
*/
int dump(ostringstream& oss, const string& where);
int dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "USER_POOL", User::table, where);
}
private:
/**

View File

@ -114,7 +114,10 @@ public:
*
* @return 0 on success
*/
int dump(ostringstream& oss, const string& where);
int dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "VNET_POOL", VirtualNetwork::table,where);
}
/**
* Get the mac prefix

View File

@ -250,14 +250,6 @@ int HostPool::discover(map<int, string> * discovered_hosts, int host_limit)
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int HostPool::dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "HOST_POOL", Host::table, where);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int HostPool::drop_cluster(int clid)
{
int rc;

View File

@ -103,14 +103,6 @@ int ImagePool::allocate (
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int ImagePool::dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "IMAGE_POOL", Image::table, where);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int ImagePool::disk_attribute(VectorAttribute * disk,
int disk_id,
int * index,

View File

@ -293,10 +293,3 @@ int UserPool::authorize(AuthRequest& ar)
return rc;
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int UserPool::dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "USER_POOL", User::table, where);
}

View File

@ -108,14 +108,6 @@ int VirtualNetworkPool::allocate (
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int VirtualNetworkPool::dump(ostringstream& oss, const string& where)
{
return PoolSQL::dump(oss, "VNET_POOL", VirtualNetwork::table,where);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int VirtualNetworkPool::nic_attribute(VectorAttribute * nic, int uid, int vid)
{
string network;