This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1459344 - Multiselect element does not propagate to provision object
Multiselect element does not propagate to provision object
Status: ON_DEV
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.7.0
Unspecified Unspecified
medium Severity medium
: GA
: cfme-future
Assigned To: Drew Bomhof
Shveta
service:dialog
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-06 17:22 EDT by Brant Evans
Modified: 2017-09-18 15:07 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brant Evans 2017-06-06 17:22:51 EDT
Description of problem:
With a service dialog that contains a drop-down element with Multiselect enabled the provision object does not contain the :dialog_element_name in prov.options hash. It is available from the prov.miq_request.options[:dialog] element, but the format is not easily consumed (key is Array::dialog_element_name and the value is a comma separated string).

In my case I have a dialog element called tower_jobs. To find the submitted contents I used the rails console.

Get the miq_provision object for the provision that was initiated:

prov = $evm.vmdb(:miq_provision,1000000000103)


print out the options of the provision object:

pp prov.options; nil

{:initial_pass=>true,
 :service_template_request=>false,
 :miq_request_dialog_name=>"miq_provision_redhat_dialogs_template",
 :requester_enabled=>["disabled"],
 :purpose_enabled=>["disabled"],
 :current_tab_key=>:customize,
 :owner_phone=>nil,
 :owner_country=>nil,
 :owner_phone_mobile=>nil,
 :owner_title=>nil,
 :owner_first_name=>nil,
 :owner_manager=>nil,
 :owner_address=>nil,
 :owner_company=>nil,
 :owner_last_name=>nil,
 :owner_manager_mail=>nil,
 :owner_city=>nil,
 :owner_department=>nil,
 :owner_load_ldap=>nil,
 :owner_manager_phone=>nil,
 :owner_state=>nil,
 :owner_office=>nil,
 :owner_zip=>nil,
 :owner_email=>nil,
 :request_notes=>nil,
 :vm_tags=>[],
 :customization_template_script=>nil,
 :dns_servers=>nil,
 :dns_suffixes=>nil,
 :root_password=>nil,
 :addr_mode=>["dhcp", "DHCP"],
 :gateway=>nil,
 :hostname=>nil,
 :ip_addr=>nil,
 :subnet_mask=>nil,
 :placement_cluster_name=>[1000000000001, "Default"],
 :cluster_filter=>[nil, nil],
 :placement_auto=>[true, 1],
 :placement_dc_name=>[nil, nil],
 :number_of_vms=>[1, "1"],
 :vm_description=>nil,
 :vm_prefix=>nil,
 :src_vm_id=>[1000000000014, "RHEL-7.2-with-tower"],
 :provision_type=>["native_clone", "Native Clone"],
 :linked_clone=>[nil, nil],
 :vm_name=>"mrx0025",
 :pxe_server_id=>[nil, nil],
 :schedule_type=>["immediately", "Immediately on Approval"],
 :vm_auto_start=>[true, 1],
 :schedule_time=>Wed, 31 May 2017 15:20:00 UTC +00:00,
 :retirement=>2592000,
 :retirement_warn=>[604800, "1 Week"],
 :stateless=>[false, 0],
 :vlan=>"rhevm",
 :mac_address=>nil,
 :disk_format=>["default", "Default"],
 :number_of_sockets=>1,
 :cores_per_socket=>[1, "1"],
 :vm_memory=>1024,
 :memory_reserve=>nil,
 :network_adapters=>[1, "1"],
 :start_date=>"5/31/2017",
 :start_hour=>"15",
 :start_min=>"20",
 :name=>"RHEL 7",
 :description=>"RHEL 7",
 :long_description=>"",
 :provision_cost=>nil,
 :display=>true,
 :catalog_id=>1000000000001,
 :st_prov_type=>"redhat",
 :available_catalogs=>[["VTC", 1000000000001]],
 :retire_fqname=>"/Service/Retirement/StateMachines/ServiceRetirement/Default",
 :reconfigure_fqname=>"",
 :fqname=>
  "/Service/Provisioning/StateMachines/ServiceProvision_Template/CatalogItemInitialization",
 :available_dialogs=>
  {1000000000001=>"azure-single-vm-from-user-image",
   1000000000002=>"Provision VM"},
 :service_type=>"atomic",
 :dialog_id=>1000000000002,
 :placement_host_name=>[nil, nil],
 :placement_ds_name=>[nil, nil],
 :src_vm_nics=>[],
 :src_vm_lans=>[],
 :customize_enabled=>["enabled"],
 :src_ems_id=>[1000000000001, "RHEV"],
 :requester_group=>"EvmGroup-super_administrator",
 :delivered_on=>nil,
 :customization_template_id=>[nil, nil],
 :pass=>0,
 :miq_force_unique_name=>[true, 1],
 :service_guid=>"be4291d2-4af8-11e7-b33b-52540096a458",
 :service_resource_id=>1000000000058,
 :owner_group=>"EvmGroup-super_administrator",
 :dns_domain=>nil,
 :vm_target_name=>"mrx0025",
 :vm_target_hostname=>"mrx0025",
 :linux_host_name=>"mrx0025",
 :service_name=>"x",
 :dialog_service_name=>"x",
 :dialog_number_of_sockets=>1,
 :dialog_vm_memory=>1024,
 :dialog_placement_cluster_name=>"Default",
 :dialog_vlan=>"rhevm",
 :domain_name=>"vmnet-bevans.redhat.com",
 :dialog_domain_name=>"vmnet-bevans.redhat.com",
 :dialog_retirement=>2592000,
 :linux_domain_name=>"vmnet-bevans.redhat.com",
 :sysprep_domain_name=>"vmnet-bevans.redhat.com",
 :vm_notes=>"Owner:  \nEmail: \nSource Template: RHEL-7.2-with-tower",
 :dest_cluster=>[1000000000001, "Default"],
 :networks=>[{:network=>"rhevm", :mac_address=>nil}]}


Notice that there is no :dialog_tower_jobs


Look at the dialog options on the request:

pp prov.miq_request.options[:dialog]; nil

{"dialog_service_name"=>"x",
 "dialog_number_of_sockets"=>1,
 "dialog_vm_memory"=>1024,
 "dialog_placement_cluster_name"=>"Default",
 "dialog_vlan"=>"rhevm",
 "dialog_domain_name"=>"vmnet-bevans.redhat.com",
 "dialog_retirement"=>2592000,
 "Array::dialog_tower_jobs"=>"* Install PostgreSQL Server,*_Install_Apache"}



Version-Release number of selected component (if applicable):

5.7.2

How reproducible:

Always

Steps to Reproduce:
1. Create Service Dialog with a Multiselect enabled drop-down
2. Create Catalog Item to provision a VM using Service Dialog
3. Provision VM from Service Catalog
4. Inspect provision object via rails console or have automate method that logs the provision and request objects options.

Actual results:
dialog element NOT present in options of provision object

Expected results:
dialog element IS present in options of provision object

Additional info:
Comment 2 Dave Johnson 2017-06-12 16:33:43 EDT
Brant, please fill in severity, ie. what is the customer impact with this one?  Currently setting to medium but please weigh in if you feel its higher than that.

Use this as a guide...  
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity
Comment 3 Brant Evans 2017-06-12 19:59:38 EDT
Dave,

I agree with the medium severity. I am able to work around the issue by getting the data from the request object.

Note You need to log in before you can comment on or make changes to this bug.