mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-10 01:17:40 +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/xml',
|
||||||
cwd+'/src/document',
|
cwd+'/src/document',
|
||||||
cwd+'/src/zone',
|
cwd+'/src/zone',
|
||||||
|
cwd+'/src/client',
|
||||||
])
|
])
|
||||||
|
|
||||||
# Compile flags
|
# Compile flags
|
||||||
@ -249,7 +250,8 @@ build_scripts=[
|
|||||||
'src/sunstone/locale/languages/SConstruct',
|
'src/sunstone/locale/languages/SConstruct',
|
||||||
'share/scripts/context-packages/SConstruct',
|
'share/scripts/context-packages/SConstruct',
|
||||||
'share/rubygems/SConstruct',
|
'share/rubygems/SConstruct',
|
||||||
'src/im_mad/collectd/SConstruct'
|
'src/im_mad/collectd/SConstruct',
|
||||||
|
'src/client/SConstruct'
|
||||||
]
|
]
|
||||||
|
|
||||||
for script in build_scripts:
|
for script in build_scripts:
|
||||||
|
@ -156,20 +156,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @return 0 on success
|
* @return 0 on success
|
||||||
*/
|
*/
|
||||||
int dump(ostringstream& oss, const string& where, const string& limit)
|
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);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
int dump(ostringstream& oss, const string& where)
|
int dump(ostringstream& oss, const string& where)
|
||||||
{
|
{
|
||||||
dump(oss, where, "");
|
return dump(oss, where, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -292,7 +292,7 @@ protected:
|
|||||||
const char * table,
|
const char * table,
|
||||||
const string& where)
|
const string& where)
|
||||||
{
|
{
|
||||||
dump(oss, elem_name, table, where, "");
|
return dump(oss, elem_name, table, where, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,8 +36,11 @@ public:
|
|||||||
RequestAttributes& att);
|
RequestAttributes& att);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Client* client;
|
const static size_t MESSAGE_SIZE;
|
||||||
string method;
|
|
||||||
|
Client * client;
|
||||||
|
|
||||||
|
string method;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -156,10 +156,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @return 0 on success
|
* @return 0 on success
|
||||||
*/
|
*/
|
||||||
int dump(ostringstream& oss, const string& where, const string& limit)
|
int dump(ostringstream& oss, const string& where, const string& limit);
|
||||||
{
|
|
||||||
return PoolSQL::dump(oss, "USER_POOL", User::table, where, limit);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name for the OpenNebula core authentication process
|
* Name for the OpenNebula core authentication process
|
||||||
|
@ -120,12 +120,13 @@ public:
|
|||||||
* query
|
* query
|
||||||
* @param oss the output stream to dump the pool contents
|
* @param oss the output stream to dump the pool contents
|
||||||
* @param where filter for the objects, defaults to all
|
* @param where filter for the objects, defaults to all
|
||||||
|
* @param limit parameters used for pagination
|
||||||
*
|
*
|
||||||
* @return 0 on success
|
* @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:
|
private:
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
# limitations under the License. #
|
# limitations under the License. #
|
||||||
#--------------------------------------------------------------------------- #
|
#--------------------------------------------------------------------------- #
|
||||||
|
|
||||||
Import('sched_env')
|
Import('env')
|
||||||
|
|
||||||
lib_name='scheduler_client'
|
lib_name='nebula_client'
|
||||||
|
|
||||||
source_files=['Client.cc']
|
source_files=['Client.cc']
|
||||||
|
|
||||||
# Build library
|
# 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;
|
int rc;
|
||||||
string def_quota_xml;
|
string def_quota_xml;
|
||||||
@ -202,9 +202,9 @@ int GroupPool::dump(ostringstream& oss, const string& where)
|
|||||||
ostringstream cmd;
|
ostringstream cmd;
|
||||||
|
|
||||||
cmd << "SELECT " << Group::table << ".body, "
|
cmd << "SELECT " << Group::table << ".body, "
|
||||||
<< GroupQuotas::db_table << ".body"
|
<< GroupQuotas::db_table << ".body" << " FROM " << Group::table
|
||||||
<< " FROM " << Group::table << " LEFT JOIN " << GroupQuotas::db_table
|
<< " LEFT JOIN " << GroupQuotas::db_table << " ON "
|
||||||
<< " ON " << Group::table << ".oid=" << GroupQuotas::db_table << ".group_oid";
|
<< Group::table << ".oid=" << GroupQuotas::db_table << ".group_oid";
|
||||||
|
|
||||||
if ( !where.empty() )
|
if ( !where.empty() )
|
||||||
{
|
{
|
||||||
@ -213,6 +213,11 @@ int GroupPool::dump(ostringstream& oss, const string& where)
|
|||||||
|
|
||||||
cmd << " ORDER BY oid";
|
cmd << " ORDER BY oid";
|
||||||
|
|
||||||
|
if ( !limit.empty() )
|
||||||
|
{
|
||||||
|
cmd << " LIMIT " << limit;
|
||||||
|
}
|
||||||
|
|
||||||
oss << "<GROUP_POOL>";
|
oss << "<GROUP_POOL>";
|
||||||
|
|
||||||
set_callback(static_cast<Callbackable::Callback>(&GroupPool::dump_cb),
|
set_callback(static_cast<Callbackable::Callback>(&GroupPool::dump_cb),
|
||||||
|
@ -60,6 +60,7 @@ env.Prepend(LIBS=[
|
|||||||
'nebula_common',
|
'nebula_common',
|
||||||
'nebula_sql',
|
'nebula_sql',
|
||||||
'nebula_log',
|
'nebula_log',
|
||||||
|
'nebula_client',
|
||||||
'nebula_xml',
|
'nebula_xml',
|
||||||
'crypto',
|
'crypto',
|
||||||
'xml2'
|
'xml2'
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
#include "RequestManagerProxy.h"
|
#include "RequestManagerProxy.h"
|
||||||
#include "Nebula.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")
|
"Forwards the request to another OpenNebula")
|
||||||
{
|
{
|
||||||
method = _method;
|
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
|
# Library dirs
|
||||||
|
|
||||||
env.Append(LIBPATH=[
|
env.Append(LIBPATH=[
|
||||||
cwd+'/src/client',
|
|
||||||
cwd+'/src/pool',
|
cwd+'/src/pool',
|
||||||
cwd+'/src/sched'
|
cwd+'/src/sched'
|
||||||
])
|
])
|
||||||
@ -38,7 +37,6 @@ env.Append(LIBPATH=[
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
build_scripts=[
|
build_scripts=[
|
||||||
'src/client/SConstruct',
|
|
||||||
'src/pool/SConstruct',
|
'src/pool/SConstruct',
|
||||||
'src/sched/SConstruct'
|
'src/sched/SConstruct'
|
||||||
]
|
]
|
||||||
|
@ -31,7 +31,7 @@ sched_env.Prepend(LIBS=[
|
|||||||
'scheduler_sched',
|
'scheduler_sched',
|
||||||
'scheduler_pool',
|
'scheduler_pool',
|
||||||
'nebula_log',
|
'nebula_log',
|
||||||
'scheduler_client',
|
'nebula_client',
|
||||||
'nebula_acl',
|
'nebula_acl',
|
||||||
'nebula_pool',
|
'nebula_pool',
|
||||||
'nebula_xml',
|
'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;
|
int rc;
|
||||||
string def_quota_xml;
|
string def_quota_xml;
|
||||||
@ -826,9 +826,9 @@ int UserPool::dump(ostringstream& oss, const string& where)
|
|||||||
ostringstream cmd;
|
ostringstream cmd;
|
||||||
|
|
||||||
cmd << "SELECT " << User::table << ".body, "
|
cmd << "SELECT " << User::table << ".body, "
|
||||||
<< UserQuotas::db_table << ".body"
|
<< UserQuotas::db_table << ".body"<< " FROM " << User::table
|
||||||
<< " FROM " << User::table << " LEFT JOIN " << UserQuotas::db_table
|
<< " LEFT JOIN " << UserQuotas::db_table << " ON "
|
||||||
<< " ON " << User::table << ".oid=" << UserQuotas::db_table << ".user_oid";
|
<< User::table << ".oid=" << UserQuotas::db_table << ".user_oid";
|
||||||
|
|
||||||
if ( !where.empty() )
|
if ( !where.empty() )
|
||||||
{
|
{
|
||||||
@ -837,6 +837,11 @@ int UserPool::dump(ostringstream& oss, const string& where)
|
|||||||
|
|
||||||
cmd << " ORDER BY oid";
|
cmd << " ORDER BY oid";
|
||||||
|
|
||||||
|
if ( !limit.empty() )
|
||||||
|
{
|
||||||
|
cmd << " LIMIT " << limit;
|
||||||
|
}
|
||||||
|
|
||||||
oss << "<USER_POOL>";
|
oss << "<USER_POOL>";
|
||||||
|
|
||||||
set_callback(static_cast<Callbackable::Callback>(&UserPool::dump_cb),
|
set_callback(static_cast<Callbackable::Callback>(&UserPool::dump_cb),
|
||||||
|
Loading…
Reference in New Issue
Block a user