incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 5/5] Mock: Fill keyname property correctly for an instance
Date Wed, 03 Aug 2011 12:20:42 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/drivers/mock/mock_driver.rb |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/server/lib/deltacloud/drivers/mock/mock_driver.rb b/server/lib/deltacloud/drivers/mock/mock_driver.rb
index fa575c1..77d7738 100644
--- a/server/lib/deltacloud/drivers/mock/mock_driver.rb
+++ b/server/lib/deltacloud/drivers/mock/mock_driver.rb
@@ -141,14 +141,14 @@ class MockDriver < Deltacloud::BaseDriver
     safely do
       image = {
         :id => opts[:name],
-	:name => opts[:name],
-	:owner_id => 'root',
-	:description => opts[:description],
-	:architecture => 'i386',
-	:state => 'UP'
+	      :name => opts[:name],
+	      :owner_id => 'root',
+      	:description => opts[:description],
+      	:architecture => 'i386',
+      	:state => 'UP'
       }
       File.open( "#{@storage_root}/images/#{opts[:name]}.yml", 'w' ) do |f|
-	YAML.dump( image, f )
+	    YAML.dump( image, f )
       end
       Image.new(image)
     end
@@ -215,6 +215,7 @@ class MockDriver < Deltacloud::BaseDriver
     instance = {
       :name=>name,
       :state=>'RUNNING',
+      :keyname => opts[:keyname],
       :image_id=>image_id,
       :owner_id=>credentials.user,
       :public_addresses=>["#{image_id}.#{next_id}.public.com"],
-- 
1.7.4.1


Mime
View raw message