Revision 3ccedecb src/oca/ruby/OpenNebula/UserPool.rb

View differences:

src/oca/ruby/OpenNebula/UserPool.rb
24 24
        #######################################################################
25 25

  
26 26
        USER_POOL_METHODS = {
27
            :info           => "userpool.info",
28
            :quotainfo      => "userquota.info",
29
            :quotaupdate    => "userquota.update"
27
            :info => "userpool.info"
30 28
        }
31 29

  
32 30
        #######################################################################
......
44 42
        end
45 43

  
46 44
        #######################################################################
47
        # XML-RPC Methods for the UserPool Object
45
        # XML-RPC Methods for the User Object
48 46
        #######################################################################
49 47

  
50 48
        # Retrieves all the Users in the pool.
51 49
        def info()
52 50
            super(USER_POOL_METHODS[:info])
53 51
        end
54

  
55
        # Gets the default user quota limits
56
        #
57
        # @return [String, OpenNebula::Error] the default user quota in case
58
        #   of success, Error otherwise
59
        def get_quota()
60
            return @client.call(USER_POOL_METHODS[:quotainfo])
61
        end
62

  
63
        # Sets the default user quota limits
64
        # @param quota [String] a template (XML or txt) with the new quota limits
65
        #
66
        # @return [nil, OpenNebula::Error] nil in case of success, Error
67
        #   otherwise
68
        def set_quota(quota)
69
            return call(USER_POOL_METHODS[:quotaupdate], quota)
70
        end
71 52
    end
72 53
end

Also available in: Unified diff