From 79432c7bd3bc630da752132a5f4fbdd42ae50ec2 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 17 Jul 2010 06:51:23 +0200 Subject: [PATCH] feature #200: restored get_user for the EC2 Server --- src/cloud/common/CloudServer.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/cloud/common/CloudServer.rb b/src/cloud/common/CloudServer.rb index 762f51d2ab..47f49c326f 100755 --- a/src/cloud/common/CloudServer.rb +++ b/src/cloud/common/CloudServer.rb @@ -89,6 +89,25 @@ class CloudServer return client end + # Gets the data associated with a user + # name:: _String_ the name of the user + # [return] _Hash_ with the user data + def get_user(name) + user = nil + + @user_pool.info + @user_pool.each{ |u| + if u.name==name + user=Hash.new + + user[:id] = u.id + user[:name] = u.name + user[:password] = u[:password] + end + } + return user + end + ########################################################################### # Repository Methods ###########################################################################