app/models/manageiq/providers/redhat/infra_manager.rb
# add disk to a virtual machine for a request arrived from an automation call
add disk to a virtual machine for a request arrived from an automation call
add disk to a virtual machine for a request arrived from an automation call
def vm_add_disk(vm, options = {})
    storage = options[:datastore] || vm.storage
    raise _("Datastore does not exist, unable to add disk") unless storage
    da_options = {
      :size_in_mb       => options[:diskSize],
      :storage          => storage,
      :name             => options[:diskName],
      :thin_provisioned => options[:thinProvisioned],
      :bootable         => options[:bootable],
      :interface        => options[:interface]
    }
    disk_attachment_builder = DiskAttachmentBuilder.new(da_options)
    with_disk_attachments_service(vm) do |service|
      service.add(disk_attachment_builder.disk_attachment)
    end
  end
def vm_add_disk ( vm , options = { } ) storage = options [ :datastore ] || vm . storage raise _ ( "Datastore does not exist, unable to add disk" ) unless storage da_options = { :size_in_mb => options [ :diskSize ] , :storage => storage , :name => options [ :diskName ] , :thin_provisioned => options [ :thinProvisioned ] , :bootable => options [ :bootable ] , :interface => options [ :interface ] } disk_attachment_builder = DiskAttachmentBuilder . new ( da_options ) with_disk_attachments_service ( vm ) do | service | service . add ( disk_attachment_builder . disk_attachment ) end end
add disk to a virtual machine for a request arrived from an automation call
add disk to a virtual machine for a request arrived from an automation call
vm
<not_specific>
options
<not_specific>