Bug 1422653

Summary: Update set_security_group method to accept an array of MIQ objects
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: AutomateAssignee: Lucy Fu <lufu>
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7.0CC: dajohnso, jhardy, jwarnica, mkanoor, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: FutureFeature, ZStream
Target Release: 5.7.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: automate:ec2
Fixed In Version: 5.7.2.0 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1416572 Environment:
Last Closed: 2017-04-12 14:38:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1416572    
Bug Blocks:    

Comment 2 CFME Bot 2017-03-03 18:30:57 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/a4a16ddee9ae6536be29df81628029f7b5c4665d

commit a4a16ddee9ae6536be29df81628029f7b5c4665d
Author:     Greg McCullough <gmccullo>
AuthorDate: Fri Feb 10 11:50:03 2017 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Fri Mar 3 13:26:55 2017 -0500

    Merge pull request #13853 from lfu/set_multiple_resources_1416572
    
    Add multiple_value option to expose_eligible_resources.
    (cherry picked from commit e5a8b3817117bda455c23f1046c5baa2007af126)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1422653

 app/models/mixins/miq_provision_mixin.rb           | 52 +++++++++++++++-------
 ...e_manageiq-providers-cloud_manager-provision.rb |  2 +-
 .../mixins/miq_ae_service_miq_provision_mixin.rb   | 12 ++++-
 ...ageiq-providers-cloud_manager-provision_spec.rb | 35 +++++++++------
 4 files changed, 69 insertions(+), 32 deletions(-)

Comment 3 Milan Falešník 2017-03-23 11:15:52 UTC
Verified in 5.7.2.0. I overrided the openstack_CustomizeRequest as follows:

prov = $evm.root["miq_provision"]

x = $evm.vmdb(:SecurityGroup).find_by_name('abc')
y = $evm.vmdb(:SecurityGroup).find_by_name('ada')

prov.set_security_groups([x, y])

And the respective security groups were attached to the provisioned instance.

Comment 5 errata-xmlrpc 2017-04-12 14:38:12 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-2017:0898