diff --git a/lib/fog/rackspace/models/compute_v2/server.rb b/lib/fog/rackspace/models/compute_v2/server.rb index 36b963ccf..07290a5e9 100644 --- a/lib/fog/rackspace/models/compute_v2/server.rb +++ b/lib/fog/rackspace/models/compute_v2/server.rb @@ -40,7 +40,8 @@ module Fog attribute :addresses attribute :flavor_id, :aliases => 'flavor', :squash => 'id' attribute :image_id, :aliases => 'image', :squash => 'id' - + attribute :options + attr_reader :password def save @@ -54,7 +55,8 @@ module Fog def create requires :name, :image_id, :flavor_id - data = connection.create_server(name, image_id, flavor_id, 1, 1) + options = {} if options.nil? + data = connection.create_server(name, image_id, flavor_id, 1, 1, options) merge_attributes(data.body['server']) true end diff --git a/lib/fog/rackspace/requests/compute_v2/create_server.rb b/lib/fog/rackspace/requests/compute_v2/create_server.rb index b9e300764..b12367782 100644 --- a/lib/fog/rackspace/requests/compute_v2/create_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/create_server.rb @@ -13,7 +13,7 @@ module Fog } } - data['server']['diskConfig'] = options[:disk_config] unless options[:disk_config].nil? + data['server']['OS-DCF:diskConfig'] = options[:disk_config] unless options[:disk_config].nil? request( :body => Fog::JSON.encode(data),