libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r955705 - /incubator/libcloud/site/getting-started.html
Date Thu, 17 Jun 2010 18:50:32 GMT
Author: pquerna
Date: Thu Jun 17 18:50:32 2010
New Revision: 955705

URL: http://svn.apache.org/viewvc?rev=955705&view=rev
Log:
Fix example to expand path to the ssh key correctly.

Noticed by: Roman Bogorodskiy

Modified:
    incubator/libcloud/site/getting-started.html

Modified: incubator/libcloud/site/getting-started.html
URL: http://svn.apache.org/viewvc/incubator/libcloud/site/getting-started.html?rev=955705&r1=955704&r2=955705&view=diff
==============================================================================
--- incubator/libcloud/site/getting-started.html (original)
+++ incubator/libcloud/site/getting-started.html Thu Jun 17 18:50:32 2010
@@ -111,6 +111,7 @@ print nodes
       <code class="python">from libcloud.types import Provider
 from libcloud.providers import get_driver
 from libcloud.deployment import MultiStepDeployment, ScriptDeployment, SSHKeyDeployment
+import os
 
 RACKSPACE_USER = 'your username'
 RACKSPACE_KEY = 'your key'
@@ -119,7 +120,7 @@ Driver = get_driver(Provider.RACKSPACE)
 conn = Driver(RACKSPACE_USER, RACKSPACE_KEY)
 
 # read your public key in
-sd = SSHKeyDeployment(open("~/.ssh/id_dsa.pub").read())
+sd = SSHKeyDeployment(open(os.path.expanduser("~/.ssh/id_dsa.pub")).read())
 # a simple script to install puppet post boot, can be much more complicated.
 script = ScriptDeployment("apt-get install puppet")
 # a task that first installs the ssh key, and then runs the script



Mime
View raw message