mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Accept :image_id
to create bootable volumes.
This commit is contained in:
parent
42702af728
commit
9a70adea0f
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,8 @@ module Fog
|
|||
# @option options [String] :display_description display description for volume
|
||||
# @option options [String] :volume_type type of volume
|
||||
# @option options [String] :snapshot_id The optional snapshot from which to create a volume.
|
||||
# @option options [String] :image_id The ID of an image from the compute service. If provided, a bootable volume will be
|
||||
# created.
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * 'volume' [Hash]:
|
||||
|
@ -41,6 +43,7 @@ module Fog
|
|||
data['volume']['volume_type'] = options[:volume_type] unless options[:volume_type].nil?
|
||||
data['volume']['availability_zone'] = options[:availability_zone] unless options[:availability_zone].nil?
|
||||
data['volume']['snapshot_id'] = options[:snapshot_id] unless options[:snapshot_id].nil?
|
||||
data['volume']['imageRef'] = options[:image_id] unless options[:image_id].nil?
|
||||
|
||||
request(
|
||||
:body => Fog::JSON.encode(data),
|
||||
|
|
Loading…
Reference in a new issue