deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: Core: Fixed filtering of hwp profiles using architecture (DTACLOUD-414)
Date Thu, 10 Jan 2013 15:39:57 GMT
Updated Branches:
  refs/heads/master 1773ecc93 -> 6f8b5d73a


Core: Fixed filtering of hwp profiles using architecture (DTACLOUD-414)


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

Branch: refs/heads/master
Commit: 6f8b5d73a68747ce4d387c37be82077b4e9b6907
Parents: 1773ecc
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Jan 10 15:29:51 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Thu Jan 10 16:39:33 2013 +0100

----------------------------------------------------------------------
 client/tests/hardware_profiles_test.rb           |    2 +-
 server/lib/deltacloud/models/hardware_profile.rb |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6f8b5d73/client/tests/hardware_profiles_test.rb
----------------------------------------------------------------------
diff --git a/client/tests/hardware_profiles_test.rb b/client/tests/hardware_profiles_test.rb
index 1f775d0..b0ae60e 100644
--- a/client/tests/hardware_profiles_test.rb
+++ b/client/tests/hardware_profiles_test.rb
@@ -43,7 +43,7 @@ describe "Hardware Profiles" do
     DeltaCloud.new( API_NAME, API_PASSWORD, API_URL ) do |client|
       hardware_profiles = client.hardware_profiles( :architecture=>'i386' )
       hardware_profiles.wont_be_empty
-      hardware_profiles.size.must_equal 2
+      hardware_profiles.size.must_equal 1
       hardware_profiles.first.architecture.value.must_equal 'i386'
     end
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6f8b5d73/server/lib/deltacloud/models/hardware_profile.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/models/hardware_profile.rb b/server/lib/deltacloud/models/hardware_profile.rb
index f2aa937..8dff2ca 100644
--- a/server/lib/deltacloud/models/hardware_profile.rb
+++ b/server/lib/deltacloud/models/hardware_profile.rb
@@ -75,6 +75,7 @@ module Deltacloud
       return false unless p = property(prop)
       return true if p.kind == :range and (p.first..p.last).include?(v)
       return true if p.kind == :enum and p.values.include?(v)
+      return true if p.kind == :fixed and p.value == v
       false
     end
 


Mime
View raw message