server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
#
# create instance. Default to flavor 1 - really need a name though...
# In rackspace, all flavors work with all images.
#
create instance. Default to flavor 1 - really need a name though
In rackspace, all flavors work with all images.
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)
    rs = new_client( credentials )
    result = nil
    params = extract_personality(opts)
    params[:name] = opts[:name] || Time.now.to_s
    params[:imageId] = image_id.to_i
    params[:flavorId] = (opts[:hwp_id] && opts[:hwp_id].length>0) ? opts[:hwp_id].to_i : 1
    safely do
      server = rs.create_server(params)
      result = convert_instance_after_create(server, credentials.user, server.adminPass)
    end
    result
  end
def create_instance ( credentials , image_id , opts ) rs = new_client ( credentials ) result = nil params = extract_personality ( opts ) params [ :name ] = opts [ :name ] || Time . now . to_s params [ :imageId ] = image_id . to_i params [ :flavorId ] = ( opts [ :hwp_id ] && opts [ :hwp_id ] . length > 0 ) ? opts [ :hwp_id ] . to_i : 1 safely do server = rs . create_server ( params ) result = convert_instance_after_create ( server , credentials . user , server . adminPass ) end result end
create instance.
create instance .
credentials
<not_specific>
image_id
<not_specific>
opts
<not_specific>