Bug 1443247

Summary: Using REST API - encountering "NoMethodError: undefined method `key?' for #<Array..."
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ProvisioningAssignee: Greg McCullough <gmccullo>
Status: CLOSED ERRATA QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: ahakala, akarol, cpelland, duhlmann, gmccullo, jdeubel, jhardy, jocarter, myoder, obarenbo, saali, simaishi
Target Milestone: GA   
Target Release: 5.8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: rest:api
Fixed In Version: 5.8.0.12 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1406084 Environment:
Last Closed: 2017-05-31 14:54:13 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: 1406084    
Bug Blocks:    

Comment 2 CFME Bot 2017-04-19 20:08:49 UTC
New commit detected on ManageIQ/manageiq-providers-vmware/fine:
https://github.com/ManageIQ/manageiq-providers-vmware/commit/528f17bce76c093d2a35f8d6662532792935f2d1

commit 528f17bce76c093d2a35f8d6662532792935f2d1
Author:     Adam Grare <agrare>
AuthorDate: Tue Apr 18 11:36:08 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Apr 19 16:07:17 2017 -0400

    Merge pull request #35 from d-m-u/sysprepBug
    
    Changes sysprep field to be a hash
    (cherry picked from commit 73ef1aac2ea57412012b99cc6a31a81567199e5c)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1443247

 .../vmware/infra_manager/provision_workflow.rb     | 156 ++++++++++-----------
 1 file changed, 78 insertions(+), 78 deletions(-)

Comment 3 CFME Bot 2017-04-19 20:21:21 UTC
New commit detected on ManageIQ/manageiq/fine:
https://github.com/ManageIQ/manageiq/commit/4807253cf82b378d582ac4f9d5cfc8de4e05b4c6

commit 4807253cf82b378d582ac4f9d5cfc8de4e05b4c6
Author:     Brandon Dunne <brandondunne>
AuthorDate: Tue Apr 18 11:41:23 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Apr 19 16:19:38 2017 -0400

    Merge pull request #14772 from gmcculloug/sysprep_timezone_unreverse
    
    Remove reverse! call for timezone after converting structure to hash
    (cherry picked from commit e761f4bfd9fc1a28bd1c3ef5ac73b75e402f1bbc)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1443247

 app/models/miq_provision_virt_workflow.rb | 1 -
 1 file changed, 1 deletion(-)

Comment 4 CFME Bot 2017-04-19 20:43:18 UTC
New commit detected on ManageIQ/manageiq-ui-classic/fine:
https://github.com/ManageIQ/manageiq-ui-classic/commit/b28c7f4ce781f7ed6e8a0f190555c1e8ca3be1dd

commit b28c7f4ce781f7ed6e8a0f190555c1e8ca3be1dd
Author:     Dan Clarizio <dclarizi>
AuthorDate: Tue Apr 18 08:32:50 2017 -0700
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Apr 19 16:41:29 2017 -0400

    Merge pull request #982 from d-m-u/sysprep
    
    Adds sysprep_timezone to render as hash like others
    (cherry picked from commit 62bd62a8c31ba6c4484bd15e6d68e055605aeac6)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1443247

 app/views/miq_request/_prov_field.html.haml | 40 +++--------------------------
 1 file changed, 4 insertions(+), 36 deletions(-)

Comment 5 Martin Kourim 2017-05-09 09:15:56 UTC
Verified using
POST /api/provision_requests
{
    "version": "1.1",
    "template_fields": {
        "guid": "56595c62-318b-11e7-bfda-001a4a447b87"
    },
    "vm_fields": {
        "number_of_cpus": 1,
        "vm_name": "test_rest_prov_1113",
        "vm_memory": "2048",
        "vlan": "DPortGroup (DSwitch)",
        "sysprep_timezone": "095"
    },
    "requester": {
        "user_name": "admin",
        "owner_first_name": "John",
        "owner_last_name": "Doe",
        "owner_email": "jdoe",
        "auto_approve": true
    },
    "tags": {
        "network_location": "Internal",
        "cc": "001"
    },
    "additional_values": {
        "request_id": "1001"
    },
    "ems_custom_attributes": {},
    "miq_custom_attributes": {}
}

Comment 7 errata-xmlrpc 2017-05-31 14:54:13 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:1367