deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [1/6] git commit: Mock: Fixed filtering of images using owner_id
Date Thu, 04 Apr 2013 06:54:31 GMT
Updated Branches:
  refs/heads/master 61122c833 -> 3b6bf5620


Mock: Fixed filtering of images using owner_id


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/009ed0cd
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/009ed0cd
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/009ed0cd

Branch: refs/heads/master
Commit: 009ed0cd7d0f8d9ae6db93b3775c9207f7c41d29
Parents: 61122c8
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Apr 3 17:43:17 2013 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed Apr 3 17:43:17 2013 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/drivers/mock/mock_driver.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/009ed0cd/server/lib/deltacloud/drivers/mock/mock_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/mock_driver.rb b/server/lib/deltacloud/drivers/mock/mock_driver.rb
index 07c67e2..51a568c 100644
--- a/server/lib/deltacloud/drivers/mock/mock_driver.rb
+++ b/server/lib/deltacloud/drivers/mock/mock_driver.rb
@@ -114,7 +114,7 @@ module Deltacloud::Drivers::Mock
       results
     end
 
-    def filter_by_owner(images, owner_id)
+    def filter_by_owner(credentials, images, owner_id)
       return images unless owner_id
       if owner_id == 'self'
         images.select { |e| e.owner_id == credentials.user }
@@ -131,7 +131,7 @@ module Deltacloud::Drivers::Mock
       images = @client.build_all(Image)
 
       images = filter_on(images, opts, :id, :architecture)
-      images = filter_by_owner(images, opts[:owner_id])
+      images = filter_by_owner(credentials, images, opts[:owner_id])
 
       # Add hardware profiles to each image
       images = images.map { |i| (i.hardware_profiles = hardware_profiles(nil)) &&
i }


Mime
View raw message