Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
mock driver (create_instance): decode user_data
Browse files Browse the repository at this point in the history
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>

git-svn-id: https://svn.apache.org/repos/asf/incubator/deltacloud/trunk@1178394 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mfojtik committed Oct 3, 2011
1 parent 518e0bb commit 4722860
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/lib/deltacloud/drivers/mock/mock_driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
require 'deltacloud/base_driver'
require 'yaml'
require 'deltacloud/drivers/mock/mock_client'
require 'base64'

module Deltacloud::Drivers::Mock

Expand Down Expand Up @@ -200,7 +201,7 @@ def create_instance(credentials, image_id, opts)
:realm_id=>realm_id,
:create_image=>true,
:actions=>instance_actions_for( 'RUNNING' ),
:user_data => opts[:user_data]
:user_data => opts[:user_data] ? Base64::decode64(opts[:user_data]) : nil
}
@client.store(:instances, instance)
Instance.new( instance )
Expand Down

0 comments on commit 4722860

Please sign in to comment.