Description of problem: catalogiteminitialization/catalogbundleinitialization methods cant parse tag control arrays building a service catalog with one item. This item has a simple dialog attached to it, a checkbox (options_0_production), a dropdown list (tag_0_location) and a tag control (tag_0_tagcontrol). The values passed in by the checkbox and dropdown list work properly, but not the one passed by the Tag Control element: [----] I, [2015-01-15T18:31:18.203316 #24820:54a2a68] INFO -- : Q-task_id([service_template_provision_task_1000000000157]) <AEMethod catalogiteminitialization> Detected Service:<ui-rhel6-mini> Id:<1000000000025> [----] I, [2015-01-15T18:31:18.205218 #24820:54a2a68] INFO -- : Q-task_id([service_template_provision_task_1000000000157]) <AEMethod catalogiteminitialization> Inspecting Dialog Options:<{"dialog_option_0_production"=>"t", "dialog_tag_0_location"=>"tor", "Array::dialog_tag_0_tagcontrol"=>"Classification::1000000000141", "request"=>"clone_to_service"}> [----] I, [2015-01-15T18:31:18.205662 #24820:54a2a68] INFO -- : Q-task_id([service_template_provision_task_1000000000157]) <AEMethod catalogiteminitialization> Adding category:<:location> tag:<"tor"> to tags_hash [----] I, [2015-01-15T18:31:18.206030 #24820:54a2a68] INFO -- : Q-task_id([service_template_provision_task_1000000000157]) <AEMethod catalogiteminitialization> Inspecting tags_hash:<{:location=>"tor"}> [----] I, [2015-01-15T18:31:18.207193 #24820:54a2a68] INFO -- : Q-task_id([service_template_provision_task_1000000000157]) <AEMethod catalogiteminitialization> Adding Tag:<:location/"tor"> to Service:<ui-rhel6-mini> Version-Release number of selected component (if applicable): cfme 5.3.1 How reproducible: very Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Tina - would you please provide a comment about why you moved this to POST? Is it a doc-only issue?
Several other problems surfaced while testing the fix for this this issue. Kevin Morey had addressed some of those issues, so it made sense to upgrade and modify his latest versions of the catalogiteminitialization and catalogbundleinitialization automate methods. Since the majority of these 2 methods are consumed with parsing dialog information, and each differently, it made sense to separate the parsing into a separate method that would normalize the dialog information. As a result, what started as a fix for this issue resulted in added functionality that requires documentation changes. More detail can be found in the PR: https://github.com/ManageIQ/manageiq/pull/2479
Hi Shveta, First, you should create a service dialog: All dialog entries are automatically prefixed with "dialog_" so it is not necessary to add the dialog prefix when creating the service dialog attributes. The dialog processing is supposed to pass the correct information to the appropriate item(s). This is accomplished by the use of a naming and numbering schema. In addition to custom dialog names, attribute names containing "option" and "tag" could have special meaning. The dialog numbering schema is setup so dialog attributes with zero key entries are global and passed to all service items. The non-zero key entries are applied to the service items that have a matching provision index. Service item 1 will have options for 0 and 1, service item 2 will have options for 0 and 2, ….. The combination of naming(options and tags) and numbering(global vs item specific) is key to setting up the dialog attributes: I would setup something like this: tag_0_attr1 <---- use tagcontrol - make multiselect like department option_0_attr2 <---- contents unimportant - text box is fine tag_1_attr3 <---- use tagcontrol - make single value like location option_1_attr4 <---- contents unimportant - text box is fine tag_2_attr5 <---- contents unimportant - text box is fine option_2_attr6 <---- contents unimportant - text box is fine tag_3_attr7 <---- contents unimportant - text box is fine option_3_attr8 <---- contents unimportant - text box is fine plus 3 special attributes: service_name <---- to override service name service_description <---- to override service description vm_name or target_name <---- to override the vm name
Once the dialog is created, Create 3 service catalog items(provider type doesn't matter), specify: * display in catalog * Provisioning entrypoint of /Service/Provisioning/Statemachines/ServiceProvision_Template/Catalogiteminitialization Create a service bundle * display in catalog * containing the 3 items above * Provisioning entrypoint of /Service/Provisioning/Statemachines/ServiceProvision_Template/Catalogbundleinitialization Important - Specify the provision order for 3 items. This is the value that is going to match the dialog number scheme described above. Edit /Service/Provisioning/Statemachines/ServiceProvision_Template/Catalogbundleinitialization instance move this: /Service/Provisioning/StateMachines/Methods/CatalogBundleInitialization to pre2 slot add this to pre1 slot /Service/Provisioning/StateMachines/Methods/DialogParser Edit /Service/Provisioning/Statemachines/ServiceProvision_Template/Catalogiteminitialization instance move this: /Service/Provisioning/StateMachines/Methods/CatalogItemInitialization to pre2 slot add this to pre1 slot /Service/Provisioning/StateMachines/Methods/DialogParser Finally, provision: catalog item and check results: catalog bundle and check results: *service_name should be named specified in dialog *service_description should be description specified in dialog *vm_name should be vm_name specified in dialog Check provisioned vm for tags specified and automation.log for further detail.
Service name , description and vm name takes the values passed in dialog fields. verified in 5.4.0.0.24.20150427192818_1fd9e49
Cloned to documentation based on Tina's comments. Setting requires_doc_text -.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1100.html