incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1185275 - /incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
Date Mon, 17 Oct 2011 16:15:04 GMT
Author: marios
Date: Mon Oct 17 16:15:04 2011
New Revision: 1185275

URL: http://svn.apache.org/viewvc?rev=1185275&view=rev
Log:
Fix for Jira DTACLOUD-95 (t1.micro hwp instances and architecture)

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb?rev=1185275&r1=1185274&r2=1185275&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb Mon Oct 17
16:15:04 2011
@@ -51,7 +51,7 @@ module Deltacloud
           cpu                1
           memory             0.63 * 1024
           storage            160
-          architecture       'i386'
+          architecture       ['i386','x86_64']
         end
 
         define_hardware_profile('m1.small') do
@@ -778,7 +778,11 @@ module Deltacloud
 
         def convert_instance(instance)
           can_create_image = 'ebs'.eql?(instance[:root_device_type]) and 'RUNNING'.eql?(convert_state(instance[:aws_state]))
-          Instance.new(
+          inst_profile_opts={}
+          if instance[:aws_instance_type] == "t1.micro"
+            inst_profile_opts[:hwp_architecture]=instance[:architecture]
+          end
+         Instance.new(
             :id => instance[:aws_instance_id],
             :name => instance[:aws_image_id],
             :state => convert_state(instance[:aws_state]),
@@ -787,7 +791,7 @@ module Deltacloud
             :actions => instance_actions_for(convert_state(instance[:aws_state])),
             :keyname => instance[:ssh_key_name],
             :launch_time => instance[:aws_launch_time],
-            :instance_profile => InstanceProfile.new(instance[:aws_instance_type]),
+            :instance_profile => InstanceProfile.new(instance[:aws_instance_type], inst_profile_opts),
             :realm_id => instance[:aws_availability_zone],
             :private_addresses => instance[:private_dns_name],
             :public_addresses => instance[:dns_name],



Mime
View raw message