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

View differences:

src/oca/ruby/OpenNebula/GroupPool.rb
25 25

  
26 26

  
27 27
        GROUP_POOL_METHODS = {
28
            :info           => "grouppool.info",
29
            :quotainfo      => "groupquota.info",
30
            :quotaupdate    => "groupquota.update"
28
            :info => "grouppool.info"
31 29
        }
32 30

  
33 31
        #######################################################################
......
39 37
            super('GROUP_POOL','GROUP',client)
40 38
        end
41 39

  
42
        # Factory method to create Group objects
40
        # Factory method to create User objects
43 41
        def factory(element_xml)
44 42
            OpenNebula::Group.new(element_xml,@client)
45 43
        end
46 44

  
47 45
        #######################################################################
48
        # XML-RPC Methods for the GroupPool Object
46
        # XML-RPC Methods for the User Object
49 47
        #######################################################################
50 48

  
51 49
        # Retrieves all the Groups in the pool.
52 50
        def info()
53 51
            super(GROUP_POOL_METHODS[:info])
54 52
        end
55

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

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

Also available in: Unified diff