mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
23 lines
575 B
Ruby
23 lines
575 B
Ruby
module Fog
|
|
module Compute
|
|
class Cloudstack
|
|
class Real
|
|
|
|
# Attaches a disk volume to a virtual machine.
|
|
#
|
|
# {CloudStack API Reference}[http://http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/attachVolume.html]
|
|
def attach_volume(id,virtualmachineid,deviceid=nil)
|
|
options = {
|
|
'command' => 'attachVolume',
|
|
'id' => id,
|
|
'virtualmachineid' => virtualmachineid,
|
|
'deviceid' => deviceid
|
|
}
|
|
|
|
request(options)
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|