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

This commit is contained in:
Daniel Molina committed 2011-08-16 15:25:37 +02:00
1 parent 5f3ffac529
commit 50f797962d
2 files changed
+5 -11

No files matched your search

-5
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"
+5 -6
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