1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/rackspace/requests/databases/create_instance.rb
2012-06-28 23:14:48 -04:00

26 lines
574 B
Ruby

module Fog
module Rackspace
class Databases
class Real
def create_instance(name, flavor_id, volume_size, options = {})
data = {
'instance' => {
'name' => name,
'flavorRef' => flavor_id,
'volume' => {
'size' => volume_size
}
}
}
request(
:body => Fog::JSON.encode(data),
:expects => 200,
:method => 'POST',
:path => 'instances'
)
end
end
end
end
end