You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2010/07/09 01:24:50 UTC
svn commit: r962132 -
/incubator/deltacloud/trunk/drivers/rackspace/lib/rackspace_driver.rb
Author: lutter
Date: Thu Jul 8 23:24:49 2010
New Revision: 962132
URL: http://svn.apache.org/viewvc?rev=962132&view=rev
Log:
Added in creation - all working now...
Modified:
incubator/deltacloud/trunk/drivers/rackspace/lib/rackspace_driver.rb
Modified: incubator/deltacloud/trunk/drivers/rackspace/lib/rackspace_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/drivers/rackspace/lib/rackspace_driver.rb?rev=962132&r1=962131&r2=962132&view=diff
==============================================================================
--- incubator/deltacloud/trunk/drivers/rackspace/lib/rackspace_driver.rb (original)
+++ incubator/deltacloud/trunk/drivers/rackspace/lib/rackspace_driver.rb Thu Jul 8 23:24:49 2010
@@ -57,6 +57,19 @@ class RackspaceDriver < DeltaCloud::Base
#
+ # create instance. Default to flavor 1 - really need a name though...
+ # In rackspace, all flavors work with all images.
+ #
+ def create_instance(credentials, image_id, opts)
+ racks = new_client( credentials )
+ flavor_id = 1
+ if (opts[:flavor_id]) then flavor_id = opts[:flavor_id] end
+ name = Time.now.to_s
+ if (opts[:name]) then name = opts[:name] end
+ convert_srv_to_instance(racks.start_server(image_id, flavor_id, name))
+ end
+
+ #
# Instances
#
def instances(credentials, opts=nil)