1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-28 14:50:08 +03:00

Clean some TODOs in core

This commit is contained in:
Carlos Martín 2011-09-21 16:13:04 +02:00
parent 1b20904032
commit 77cf88ca5d
3 changed files with 18 additions and 14 deletions

View File

@ -449,8 +449,9 @@ private:
void bootstrap();
/**
* Callback function to TODO
* @param _loaded_db_version TODO
* Callback function for the check_db_version method. Stores the read
* version in loaded_db_version
* @param _loaded_db_version returned columns
* @param num the number of columns read from the DB
* @param names the column names
* @param vaues the column values
@ -459,9 +460,12 @@ private:
int select_cb(void *_loaded_db_version, int num, char **values,
char **names);
/*
* TODO
* @return 0 ok, -1 version mismatch, -2 needs bootstrap
/**
* Reads the current DB version.
*
* @return 0 on success,
* -1 if there is a version mismatch,
* -2 if the DB needs a bootstrap
*/
int check_db_version();
};

View File

@ -35,12 +35,21 @@ protected:
:Request(method_name,params,help)
{
auth_op = AuthRequest::CHOWN;
Nebula& nd = Nebula::instance();
gpool = nd.get_gpool();
upool = nd.get_upool();
};
~RequestManagerChown(){};
/* -------------------------------------------------------------------- */
GroupPool * gpool;
UserPool * upool;
/* -------------------------------------------------------------------- */
virtual void request_execute(xmlrpc_c::paramList const& _paramList,
RequestAttributes& att);
};

View File

@ -32,11 +32,6 @@ void RequestManagerChown::request_execute(xmlrpc_c::paramList const& paramList,
string nuname;
string ngname;
// TODO: Move these to constructor?
Nebula& nd = Nebula::instance();
GroupPool * gpool = nd.get_gpool();
UserPool * upool = nd.get_upool();
PoolObjectSQL * object;
if ( basic_authorization(oid, att) == false )
@ -123,10 +118,6 @@ void UserChown::request_execute(xmlrpc_c::paramList const& paramList,
string ngname;
Nebula& nd = Nebula::instance();
GroupPool * gpool = nd.get_gpool();
UserPool * upool = static_cast<UserPool *>(pool);
User * user;
Group * group;