Hide Forgot
Description of problem: Attach volume to Vm //vm: is from ems.vms (ems is OpenStack ExtManagementSystem class) //device: optional mountpoint string, e.g. '/dev/vdc' cloud_volume.raw_attach_volume(vm.ems_ref, device = nil) Detach volume from Vm cloud_volume.detach_volume(vm.ems_ref) List of volume attachments for VM, I'll create 'cloud_volumes' relationsship vm.hardware.disks.select{|x| x.backing}.map{|x| x.backing} Attached Vms of volume, I'll create 'vms' relationships cloud_volume.attachments.map{|x| x.hardware.vm} Create volume ext_management_system = EmsCloud.first # the wanted Ems, from select box probably cloud_tenant = ems.cloud_tenants.first # Tenant from select box // size is in GB options = {:display_name => "volume1", :size => 1, :cloud_tenant => cloud_tenant} CloudVolume.raw_create_volume(ext_management_system, options) Update volume volume = CloudVolume.first volume.raw_update_volume({:display_name => "volume5"}) Delete volume volume = CloudVolume.first volume.raw_delete_volume Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: https://github.com/ManageIQ/manageiq/pull/6176
Already exist