class OpenNebula::UserPool

Constants

USER_POOL_METHODS

Constants and Class attribute accessors

Public Class Methods

new(client) click to toggle source

client a Client object that represents a XML-RPC connection

Calls superclass method OpenNebula::Pool::new
# File lib/opennebula/user_pool.rb, line 35
def initialize(client)
    super('USER_POOL','USER',client)
end

Public Instance Methods

factory(element_xml) click to toggle source

Factory method to create User objects

# File lib/opennebula/user_pool.rb, line 40
def factory(element_xml)
    OpenNebula::User.new(element_xml,@client)
end
info() click to toggle source

Retrieves all the Users in the pool.

Calls superclass method OpenNebula::Pool#info
# File lib/opennebula/user_pool.rb, line 49
def info()
    super(USER_POOL_METHODS[:info])
end
Also aliased as: info!
info!()
Alias for: info
info_all() click to toggle source
Calls superclass method OpenNebula::Pool#info_all
# File lib/opennebula/user_pool.rb, line 53
def info_all()
    return super(USER_POOL_METHODS[:info])
end
Also aliased as: info_all!
info_all!()
Alias for: info_all
info_group() click to toggle source
Calls superclass method OpenNebula::Pool#info_group
# File lib/opennebula/user_pool.rb, line 61
def info_group()
    return super(USER_POOL_METHODS[:info])
end
Also aliased as: info_group!
info_group!()
Alias for: info_group
info_mine() click to toggle source
Calls superclass method OpenNebula::Pool#info_mine
# File lib/opennebula/user_pool.rb, line 57
def info_mine()
    return super(USER_POOL_METHODS[:info])
end
Also aliased as: info_mine!
info_mine!()
Alias for: info_mine
users_with_password(driver, password) click to toggle source

Returns a list of user IDs that have the given password. info() needs to be called before.

@param driver [String] auth driver to match @param password [String] password to match @return [Array] an array of IDs

# File lib/opennebula/user_pool.rb, line 80
def users_with_password(driver, password)
    ids = []

    each do |user|
        if user["PASSWORD"] == password
            ids << user["ID"]
        end
    end

    return ids
end