mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-22 20:54:49 +09:00
F #2183: Use pager for list commands (e.g. onevm list). Support for
custom ordering (by ID) in list API calls, this can be set per user, group and default in oned.conf
This commit is contained in:
1 parent
914368d300
commit
21fe311681
28 files changed
+418
-132
No files matched your search
+6
-1
@@ -214,7 +214,7 @@ PoolObjectSQL * PoolSQL::get(const string& name, int ouid)
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
int PoolSQL::dump(ostringstream& oss, const string& elem_name, const char* table,
|
||||
const string& where, const string& limit)
|
||||
const string& where, const string& limit, bool desc)
|
||||
{
|
||||
ostringstream cmd;
|
||||
|
||||
@@ -227,6 +227,11 @@ int PoolSQL::dump(ostringstream& oss, const string& elem_name, const char* table
|
||||
|
||||
cmd << " ORDER BY oid";
|
||||
|
||||
if ( desc == true )
|
||||
{
|
||||
cmd << " DESC";
|
||||
}
|
||||
|
||||
if ( !limit.empty() )
|
||||
{
|
||||
cmd << " LIMIT " << limit;
|
||||
|
||||
Reference in new issue
Block a user