mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug #768: POOL_FILTER is a constant instead of a configuration parameter
This commit is contained in:
parent
17cfe9635c
commit
7b255c5fb7
@ -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"
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user