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

bug #768: POOL_FILTER is a constant instead of a configuration parameter(cherry picked from commit 7b255c5fb74b4047577e120d8e906521f5c656b2)

This commit is contained in:
Daniel Molina 2011-08-16 15:20:57 +02:00
parent 5f3ffac529
commit 50f797962d
2 changed files with 5 additions and 11 deletions

View File

@ -5,8 +5,3 @@ PORT=9869
# VNC Configuration
VNC_PROXY_BASE_PORT=29876
NOVNC_PATH=
# FLAG that will filter the elements retrieved from the Pools
# MINE : Connected user's resources
# GROUP : Connected user's and his group's resources
POOL_FILTER = "GROUP"

View File

@ -20,6 +20,9 @@ include OpenNebulaJSON
require 'acct/watch_client'
class SunstoneServer
# FLAG that will filter the elements retrieved from the Pools
POOL_FILTER = Pool::INFO_GROUP
def initialize(username, password)
# TBD one_client_user(name) from CloudServer
@client = Client.new("dummy:dummy")
@ -56,15 +59,11 @@ class SunstoneServer
############################################################################
#
############################################################################
def get_pool(kind,gid,filter)
def get_pool(kind,gid)
if gid == "0"
user_flag = Pool::INFO_ALL
else
user_flag = case filter
when "MINE" then Pool::INFO_MINE
when "GROUP" then Pool::INFO_GROUP
else Pool::INFO_GROUP
end
user_flag = POOL_FILTER
end
pool = case kind