deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [4/6] git commit: Client: Added base64#encode for user_data (DTACLOUD-522)
Date Thu, 04 Apr 2013 06:54:34 GMT
Client: Added base64#encode for user_data (DTACLOUD-522)


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/c9816011
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/c9816011
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/c9816011

Branch: refs/heads/master
Commit: c981601180e7a60b2258101bb1b10066b7e080a3
Parents: 009ed0c
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Apr 3 15:57:01 2013 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Thu Apr 4 08:54:12 2013 +0200

----------------------------------------------------------------------
 client/lib/deltacloud/client.rb                  |    1 +
 client/lib/deltacloud/client/methods/instance.rb |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c9816011/client/lib/deltacloud/client.rb
----------------------------------------------------------------------
diff --git a/client/lib/deltacloud/client.rb b/client/lib/deltacloud/client.rb
index c7048dd..7304146 100644
--- a/client/lib/deltacloud/client.rb
+++ b/client/lib/deltacloud/client.rb
@@ -19,6 +19,7 @@ module Deltacloud
     require 'ostruct'
     require 'nokogiri'
     require 'faraday'
+    require 'base64'
 
     # Core extensions
     require_relative './core_ext'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c9816011/client/lib/deltacloud/client/methods/instance.rb
----------------------------------------------------------------------
diff --git a/client/lib/deltacloud/client/methods/instance.rb b/client/lib/deltacloud/client/methods/instance.rb
index 506c338..3ed6a31 100644
--- a/client/lib/deltacloud/client/methods/instance.rb
+++ b/client/lib/deltacloud/client/methods/instance.rb
@@ -52,6 +52,7 @@ module Deltacloud::Client
       # Returns created instance, or list of created instances or all instances.
       #
       def create_instance(image_id, create_opts={})
+        create_opts[:user_data] = Base64::encode64(create_opts[:user_data]) if create_opts[:user_data]
         r = create_resource :instance, create_opts.merge(
           :image_id => image_id,
           :no_convert_model => true


Mime
View raw message