Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reverse! call for timezone after converting structure to hash #14772

Merged
merged 1 commit into from
Apr 18, 2017

Conversation

gmcculloug
Copy link
Member

Previously the list of Timezones used with the VMware customization spec were stored as an array to maintain order before hashes were guaranteed to return in the order of insertion. Now the provisioning workflow can use a hash which matches the structure used by most of the allowed_* methods in the request workflow classes.

This allows us to treat the data in the UI like other fields (ManageIQ/manageiq-ui-classic#982) and requires less data manipulation like the .collect(&:reverse) call in ManageIQ/manageiq-providers-vmware#35 and the change in this PR.

Changing the get_timezones method to return a hash allows data passed during an API call to be processed like other fields which resolves the reported issue.

Ultimately the customization spec logic needs to be refactored to live in the vmware repo but that is outside of the scope of this bug fix.

Links

Steps for Testing/QA

See https://bugzilla.redhat.com/show_bug.cgi?id=1406084

cc @d-m-u @himdel

@miq-bot
Copy link
Member

miq-bot commented Apr 14, 2017

Checked commit gmcculloug@d7bb1da with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks good. 🍪

@gmcculloug
Copy link
Member Author

Sorry about that @d-m-u. I did not see PR #14744. Next time please use the bot to assign it to me or cc me on the PR.

@chessbyte chessbyte assigned bdunne and agrare and unassigned bdunne Apr 17, 2017
@bdunne bdunne merged commit e761f4b into ManageIQ:master Apr 18, 2017
@bdunne bdunne added this to the Sprint 59 Ending Apr 24, 2017 milestone Apr 18, 2017
simaishi pushed a commit that referenced this pull request Apr 19, 2017
Remove reverse! call for timezone after converting structure to hash
(cherry picked from commit e761f4b)

https://bugzilla.redhat.com/show_bug.cgi?id=1443247
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit 4807253cf82b378d582ac4f9d5cfc8de4e05b4c6
Author: Brandon Dunne <brandondunne@hotmail.com>
Date:   Tue Apr 18 11:41:23 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

simaishi pushed a commit that referenced this pull request May 4, 2017
Remove reverse! call for timezone after converting structure to hash
(cherry picked from commit e761f4b)

https://bugzilla.redhat.com/show_bug.cgi?id=1443248
@simaishi
Copy link
Contributor

simaishi commented May 4, 2017

Euwe backport details:

$ git log -1
commit 16512ee98e663065561126432a665feb559fdaf7
Author: Brandon Dunne <brandondunne@hotmail.com>
Date:   Tue Apr 18 11:41:23 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=1443248

@gmcculloug gmcculloug deleted the sysprep_timezone_unreverse branch January 1, 2020 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants