diff --git a/src/oca/ruby/OpenNebula/GroupPool.rb b/src/oca/ruby/OpenNebula/GroupPool.rb index 782243e69c..20ebdeed08 100644 --- a/src/oca/ruby/OpenNebula/GroupPool.rb +++ b/src/oca/ruby/OpenNebula/GroupPool.rb @@ -25,9 +25,7 @@ module OpenNebula GROUP_POOL_METHODS = { - :info => "grouppool.info", - :quotainfo => "groupquota.info", - :quotaupdate => "groupquota.update" + :info => "grouppool.info" } ####################################################################### @@ -39,35 +37,18 @@ module OpenNebula super('GROUP_POOL','GROUP',client) end - # Factory method to create Group objects + # Factory method to create User objects def factory(element_xml) OpenNebula::Group.new(element_xml,@client) end ####################################################################### - # XML-RPC Methods for the GroupPool Object + # XML-RPC Methods for the User Object ####################################################################### # Retrieves all the Groups in the pool. def info() super(GROUP_POOL_METHODS[:info]) end - - # Gets the default group quota limits - # - # @return [String, OpenNebula::Error] the default group quota in case - # of success, Error otherwise - def get_quota() - return @client.call(GROUP_POOL_METHODS[:quotainfo]) - end - - # Sets the default group quota limits - # @param quota [String] a template (XML or txt) with the new quota limits - # - # @return [nil, OpenNebula::Error] nil in case of success, Error - # otherwise - def set_quota(quota) - return call(GROUP_POOL_METHODS[:quotaupdate], quota) - end end end diff --git a/src/oca/ruby/OpenNebula/Pool.rb b/src/oca/ruby/OpenNebula/Pool.rb index 3f68d6204e..e917f7bb32 100644 --- a/src/oca/ruby/OpenNebula/Pool.rb +++ b/src/oca/ruby/OpenNebula/Pool.rb @@ -48,21 +48,6 @@ module OpenNebula # Common XML-RPC Methods for all the Pool Types ####################################################################### - # Common client call wrapper. Returns nil instead of the response - # if it is successful - # - # @param [String] xml_method xml-rpc method - # @param [Array] args any arguments for the xml-rpc method - # - # @return [nil, OpenNebula::Error] nil in case of success, Error - # otherwise - def call(xml_method, *args) - rc = @client.call(xml_method, *args) - rc = nil if !OpenNebula.is_error?(rc) - - return rc - end - #Gets the pool without any filter. Host, Group and User Pools # xml_method:: _String_ the name of the XML-RPC method def info(xml_method) diff --git a/src/oca/ruby/OpenNebula/UserPool.rb b/src/oca/ruby/OpenNebula/UserPool.rb index 85cf907b93..b4d9b733a6 100644 --- a/src/oca/ruby/OpenNebula/UserPool.rb +++ b/src/oca/ruby/OpenNebula/UserPool.rb @@ -24,9 +24,7 @@ module OpenNebula ####################################################################### USER_POOL_METHODS = { - :info => "userpool.info", - :quotainfo => "userquota.info", - :quotaupdate => "userquota.update" + :info => "userpool.info" } ####################################################################### @@ -44,29 +42,12 @@ module OpenNebula end ####################################################################### - # XML-RPC Methods for the UserPool Object + # XML-RPC Methods for the User Object ####################################################################### # Retrieves all the Users in the pool. def info() super(USER_POOL_METHODS[:info]) end - - # Gets the default user quota limits - # - # @return [String, OpenNebula::Error] the default user quota in case - # of success, Error otherwise - def get_quota() - return @client.call(USER_POOL_METHODS[:quotainfo]) - end - - # Sets the default user quota limits - # @param quota [String] a template (XML or txt) with the new quota limits - # - # @return [nil, OpenNebula::Error] nil in case of success, Error - # otherwise - def set_quota(quota) - return call(USER_POOL_METHODS[:quotaupdate], quota) - end end end