Bug 1328690

Summary: [RFE] add/remove/attach/detach volume UI
Product: Red Hat CloudForms Management Engine Reporter: Ronnie Rasouli <rrasouli>
Component: ProvidersAssignee: Sam Lucidi <slucidi>
Status: CLOSED NOTABUG QA Contact: Dave Johnson <dajohnso>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: jfrey, jhardy, obarenbo
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-21 07:06:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Feature
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ronnie Rasouli 2016-04-20 04:27:41 UTC
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

Comment 3 Ronnie Rasouli 2016-06-21 07:06:03 UTC
Already exist