incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962285 - in /incubator/deltacloud/trunk/server/lib/deltacloud/base_driver: base_driver.rb features.rb
Date Thu, 08 Jul 2010 23:43:23 GMT
Author: lutter
Date: Thu Jul  8 23:43:23 2010
New Revision: 962285

URL: http://svn.apache.org/viewvc?rev=962285&view=rev
Log:
Add parameters from hardware profiles to the instance create operation

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/base_driver.rb
    incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/features.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/base_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/base_driver.rb?rev=962285&r1=962284&r2=962285&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/base_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/base_driver.rb Thu Jul  8
23:43:23 2010
@@ -38,6 +38,12 @@ module Deltacloud
       return if hw_profile
       hw_profile = ::Deltacloud::HardwareProfile.new( name, &block )
       @hardware_profiles << hw_profile
+      hw_params = hw_profile.params
+      unless hw_params.empty?
+        feature :instances, :hardware_profiles do
+          decl.operation(:create) { add_params(hw_params) }
+        end
+      end
     end
 
     def self.hardware_profiles

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/features.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/features.rb?rev=962285&r1=962284&r2=962285&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/features.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/base_driver/features.rb Thu Jul  8 23:43:23
2010
@@ -136,5 +136,9 @@ module Deltacloud
       end
     end
 
+    declare_feature :instances, :hardware_profiles do
+      description "Size instances according to changes to a hardware profile"
+      # The parameters are filled in from the hardware profiles
+    end
   end
 end



Mime
View raw message