Bug 1335989 - Automate: customize_request method in Redhat domain incorrect sets security_group value in options hash
Summary: Automate: customize_request method in Redhat domain incorrect sets security_g...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: William Fitzgerald
QA Contact: Milan Falešník
URL:
Whiteboard: automate:provision
: 1547249 (view as bug list)
Depends On:
Blocks: 1565760
TreeView+ depends on / blocked
 
Reported: 2016-05-13 18:19 UTC by Greg McCullough
Modified: 2018-04-10 17:21 UTC (History)
8 users (show)

Fixed In Version: 5.9.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1565760 (view as bug list)
Environment:
Last Closed: 2018-03-01 13:06:56 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 0 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 18:37:12 UTC

Description Greg McCullough 2016-05-13 18:19:34 UTC
Description of problem:
When using the customize request method (either amazon_customizerequest or openstack_customizerequest) from the RedHat domain and passing the security_group name as part of additional values 


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


How reproducible: Always


Steps to Reproduce:
1. Copy the "customize request" method to a writable domain and modify the mapping setting from mapping = 0 to mapping = 1.
2. Create a REST API call to provision an Amazon or OpenStack instance and pass the "security_group" value with the name in "additional_values" that you want to apply.
3. Check the request that was created and verify that the security group was not applied.


Actual results:
Specified security group is ignored.

Expected results:
Specified security group gets set.

Additional info:
Additional details https://bugzilla.redhat.com/show_bug.cgi?id=1297335#c18
The script from https://github.com/ManageIQ/manageiq/pull/8425 can be used to help build the Rest API call for provisioning.


This can be corrected by changing:
  prov.set_option(:security_groups, [securitygroup.name])
to
  prov.set_option(:security_groups, [securitygroup.id])

Comment 2 CFME Bot 2017-07-11 15:36:27 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=169d47708dd133eb95be957ad7e4564cc0cdfc10

commit 169d47708dd133eb95be957ad7e4564cc0cdfc10
Author:     william fitzgerald <wfitzger>
AuthorDate: Mon May 22 17:45:24 2017 -0400
Commit:     william fitzgerald <wfitzger>
CommitDate: Mon May 22 17:45:24 2017 -0400

    Automate - Changed security_groups to id in 2 custom request methods.
    
    Changed to "securitygroup.id" for both methods.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1335989

 .../StateMachines/Methods.class/__methods__/amazon_customizerequest.rb  | 2 +-
 .../Methods.class/__methods__/openstack_customizerequest.rb             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comment 3 Milan Falešník 2017-11-08 15:22:25 UTC
Verified in 5.9.0.5

Comment 4 Greg McCullough 2018-02-20 22:27:09 UTC
*** Bug 1547249 has been marked as a duplicate of this bug. ***

Comment 7 errata-xmlrpc 2018-03-01 13:06:56 UTC
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://access.redhat.com/errata/RHSA-2018:0380


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