mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
26 lines
574 B
Ruby
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
|