incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 4/7] mock driver (create_instance): decode user_data
Date Wed, 28 Sep 2011 22:32:32 GMT
From: David Lutterkort <lutter@redhat.com>

This should make it clearer what the general API intent is: we want
user_data to show up decoded in instances.

Signed-off-by: David Lutterkort <lutter@redhat.com>
---
 server/lib/deltacloud/drivers/mock/mock_driver.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/server/lib/deltacloud/drivers/mock/mock_driver.rb b/server/lib/deltacloud/drivers/mock/mock_driver.rb
index 47e8d98..636b130 100644
--- a/server/lib/deltacloud/drivers/mock/mock_driver.rb
+++ b/server/lib/deltacloud/drivers/mock/mock_driver.rb
@@ -18,6 +18,7 @@
 require 'deltacloud/base_driver'
 require 'yaml'
 require 'deltacloud/drivers/mock/mock_client'
+require 'base64'
 
 module Deltacloud::Drivers::Mock
 
@@ -200,7 +201,7 @@ module Deltacloud::Drivers::Mock
         :realm_id=>realm_id,
         :create_image=>true,
         :actions=>instance_actions_for( 'RUNNING' ),
-        :user_data => opts[:user_data]
+        :user_data => Base64::decode64(opts[:user_data])
       }
       @client.store(:instances, instance)
       Instance.new( instance )
-- 
1.7.6


Mime
View raw message