mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
Fix merge of master branch
This commit is contained in:
parent
7686ca93e0
commit
03914330a4
@ -81,6 +81,7 @@ main_env.Append(LIBPATH=[
|
||||
cwd+'/src/xml',
|
||||
cwd+'/src/document',
|
||||
cwd+'/src/zone',
|
||||
cwd+'/src/client',
|
||||
])
|
||||
|
||||
# Compile flags
|
||||
@ -249,7 +250,8 @@ build_scripts=[
|
||||
'src/sunstone/locale/languages/SConstruct',
|
||||
'share/scripts/context-packages/SConstruct',
|
||||
'share/rubygems/SConstruct',
|
||||
'src/im_mad/collectd/SConstruct'
|
||||
'src/im_mad/collectd/SConstruct',
|
||||
'src/client/SConstruct'
|
||||
]
|
||||
|
||||
for script in build_scripts:
|
||||
|
@ -156,20 +156,7 @@ public:
|
||||
*
|
||||
* @return 0 on success
|
||||
*/
|
||||
int dump(ostringstream& oss, const string& where, const string& limit)
|
||||
{
|
||||
return PoolSQL::dump(oss, "GROUP_POOL", Group::table, where, limit);
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Adds the default quotas xml element, right after all the
|
||||
* pool objects
|
||||
*
|
||||
* @param oss The output stream to dump the xml contents
|
||||
*/
|
||||
virtual void add_extra_xml(ostringstream& oss);
|
||||
int dump(ostringstream& oss, const string& where, const string& limit);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
*/
|
||||
int dump(ostringstream& oss, const string& where)
|
||||
{
|
||||
dump(oss, where, "");
|
||||
return dump(oss, where, "");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -292,7 +292,7 @@ protected:
|
||||
const char * table,
|
||||
const string& where)
|
||||
{
|
||||
dump(oss, elem_name, table, where, "");
|
||||
return dump(oss, elem_name, table, where, "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,8 +36,11 @@ public:
|
||||
RequestAttributes& att);
|
||||
|
||||
private:
|
||||
Client* client;
|
||||
string method;
|
||||
const static size_t MESSAGE_SIZE;
|
||||
|
||||
Client * client;
|
||||
|
||||
string method;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -156,10 +156,7 @@ public:
|
||||
*
|
||||
* @return 0 on success
|
||||
*/
|
||||
int dump(ostringstream& oss, const string& where, const string& limit)
|
||||
{
|
||||
return PoolSQL::dump(oss, "USER_POOL", User::table, where, limit);
|
||||
};
|
||||
int dump(ostringstream& oss, const string& where, const string& limit);
|
||||
|
||||
/**
|
||||
* Name for the OpenNebula core authentication process
|
||||
|
@ -120,12 +120,13 @@ public:
|
||||
* query
|
||||
* @param oss the output stream to dump the pool contents
|
||||
* @param where filter for the objects, defaults to all
|
||||
* @param limit parameters used for pagination
|
||||
*
|
||||
* @return 0 on success
|
||||
*/
|
||||
int dump(ostringstream& oss, const string& where)
|
||||
int dump(ostringstream& oss, const string& where, const string& limit)
|
||||
{
|
||||
return PoolSQL::dump(oss, "ZONE_POOL", Zone::table, where);
|
||||
return PoolSQL::dump(oss, "ZONE_POOL", Zone::table, where, limit);
|
||||
};
|
||||
|
||||
private:
|
||||
|
@ -16,11 +16,11 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
Import('sched_env')
|
||||
Import('env')
|
||||
|
||||
lib_name='scheduler_client'
|
||||
lib_name='nebula_client'
|
||||
|
||||
source_files=['Client.cc']
|
||||
|
||||
# Build library
|
||||
sched_env.StaticLibrary(lib_name, source_files)
|
||||
env.StaticLibrary(lib_name, source_files)
|
@ -194,7 +194,7 @@ int GroupPool::drop(PoolObjectSQL * objsql, string& error_msg)
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
int GroupPool::dump(ostringstream& oss, const string& where)
|
||||
int GroupPool::dump(ostringstream& oss, const string& where, const string& limit)
|
||||
{
|
||||
int rc;
|
||||
string def_quota_xml;
|
||||
@ -202,9 +202,9 @@ int GroupPool::dump(ostringstream& oss, const string& where)
|
||||
ostringstream cmd;
|
||||
|
||||
cmd << "SELECT " << Group::table << ".body, "
|
||||
<< GroupQuotas::db_table << ".body"
|
||||
<< " FROM " << Group::table << " LEFT JOIN " << GroupQuotas::db_table
|
||||
<< " ON " << Group::table << ".oid=" << GroupQuotas::db_table << ".group_oid";
|
||||
<< GroupQuotas::db_table << ".body" << " FROM " << Group::table
|
||||
<< " LEFT JOIN " << GroupQuotas::db_table << " ON "
|
||||
<< Group::table << ".oid=" << GroupQuotas::db_table << ".group_oid";
|
||||
|
||||
if ( !where.empty() )
|
||||
{
|
||||
@ -213,6 +213,11 @@ int GroupPool::dump(ostringstream& oss, const string& where)
|
||||
|
||||
cmd << " ORDER BY oid";
|
||||
|
||||
if ( !limit.empty() )
|
||||
{
|
||||
cmd << " LIMIT " << limit;
|
||||
}
|
||||
|
||||
oss << "<GROUP_POOL>";
|
||||
|
||||
set_callback(static_cast<Callbackable::Callback>(&GroupPool::dump_cb),
|
||||
|
@ -60,6 +60,7 @@ env.Prepend(LIBS=[
|
||||
'nebula_common',
|
||||
'nebula_sql',
|
||||
'nebula_log',
|
||||
'nebula_client',
|
||||
'nebula_xml',
|
||||
'crypto',
|
||||
'xml2'
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include "RequestManagerProxy.h"
|
||||
#include "Nebula.h"
|
||||
|
||||
const size_t RequestManagerProxy::MESSAGE_SIZE = 1073741824;
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
@ -26,7 +28,7 @@ RequestManagerProxy::RequestManagerProxy(string _method)
|
||||
"Forwards the request to another OpenNebula")
|
||||
{
|
||||
method = _method;
|
||||
client = new Client("none", Nebula::instance().get_master_oned());
|
||||
client = new Client("none", Nebula::instance().get_master_oned(), MESSAGE_SIZE);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
@ -28,7 +28,6 @@ env.Append(CPPPATH=[
|
||||
# Library dirs
|
||||
|
||||
env.Append(LIBPATH=[
|
||||
cwd+'/src/client',
|
||||
cwd+'/src/pool',
|
||||
cwd+'/src/sched'
|
||||
])
|
||||
@ -38,7 +37,6 @@ env.Append(LIBPATH=[
|
||||
################################################################################
|
||||
|
||||
build_scripts=[
|
||||
'src/client/SConstruct',
|
||||
'src/pool/SConstruct',
|
||||
'src/sched/SConstruct'
|
||||
]
|
||||
|
@ -31,7 +31,7 @@ sched_env.Prepend(LIBS=[
|
||||
'scheduler_sched',
|
||||
'scheduler_pool',
|
||||
'nebula_log',
|
||||
'scheduler_client',
|
||||
'nebula_client',
|
||||
'nebula_acl',
|
||||
'nebula_pool',
|
||||
'nebula_xml',
|
||||
|
@ -818,7 +818,7 @@ int UserPool::authorize(AuthRequest& ar)
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
int UserPool::dump(ostringstream& oss, const string& where)
|
||||
int UserPool::dump(ostringstream& oss, const string& where, const string& limit)
|
||||
{
|
||||
int rc;
|
||||
string def_quota_xml;
|
||||
@ -826,9 +826,9 @@ int UserPool::dump(ostringstream& oss, const string& where)
|
||||
ostringstream cmd;
|
||||
|
||||
cmd << "SELECT " << User::table << ".body, "
|
||||
<< UserQuotas::db_table << ".body"
|
||||
<< " FROM " << User::table << " LEFT JOIN " << UserQuotas::db_table
|
||||
<< " ON " << User::table << ".oid=" << UserQuotas::db_table << ".user_oid";
|
||||
<< UserQuotas::db_table << ".body"<< " FROM " << User::table
|
||||
<< " LEFT JOIN " << UserQuotas::db_table << " ON "
|
||||
<< User::table << ".oid=" << UserQuotas::db_table << ".user_oid";
|
||||
|
||||
if ( !where.empty() )
|
||||
{
|
||||
@ -837,6 +837,11 @@ int UserPool::dump(ostringstream& oss, const string& where)
|
||||
|
||||
cmd << " ORDER BY oid";
|
||||
|
||||
if ( !limit.empty() )
|
||||
{
|
||||
cmd << " LIMIT " << limit;
|
||||
}
|
||||
|
||||
oss << "<USER_POOL>";
|
||||
|
||||
set_callback(static_cast<Callbackable::Callback>(&UserPool::dump_cb),
|
||||
|
Loading…
Reference in New Issue
Block a user