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

Handle possibility of arrays for Network Security Groups #180

Merged
merged 1 commit into from
Dec 5, 2017
Merged

Handle possibility of arrays for Network Security Groups #180

merged 1 commit into from
Dec 5, 2017

Conversation

djberg96
Copy link
Collaborator

@djberg96 djberg96 commented Dec 4, 2017

This handles an api-version update for Network Security Groups that started with api-version 2017-10-01. As of that date, multiple ports and/or ranges are returned as an array with a slightly different property name, e.g. source_address_prefixes instead of source_address_prefix.

For earlier versions of the api-version, it's possible neither property will exist (it doesn't handle arrays), in which case we simply return nil.

Note that for port and end_port I simply took the low and high values, respectively, since the underlying firewall_rules table isn't designed to handle arrays of values.

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

@miq-bot
Copy link
Member

miq-bot commented Dec 4, 2017

Checked commit https://github.com/djberg96/manageiq-providers-azure/commit/19f2a5466cfdc2e14208020dabfda8434e68ad4f with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 5 offenses detected

app/models/manageiq/providers/azure/network_manager/refresh_parser.rb

@djberg96
Copy link
Collaborator Author

djberg96 commented Dec 5, 2017

@juliancheal
Copy link
Member

🍏 :)

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@agrare agrare merged commit 41eb3c4 into ManageIQ:master Dec 5, 2017
@agrare agrare added this to the Sprint 75 Ending Dec 11, 2017 milestone Dec 5, 2017
simaishi pushed a commit that referenced this pull request Dec 5, 2017
Handle possibility of arrays for Network Security Groups
(cherry picked from commit 41eb3c4)

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

simaishi commented Dec 5, 2017

Gaprindashvili backport details:

$ git log -1
commit 9e978a567330939aed11c3dca1bb2c36e2a1790a
Author: Adam Grare <[email protected]>
Date:   Tue Dec 5 09:38:30 2017 -0500

    Merge pull request #180 from djberg96/network_security_groups
    
    Handle possibility of arrays for Network Security Groups
    (cherry picked from commit 41eb3c470ff19476b422701eadb8bee194695e40)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1520977

simaishi pushed a commit that referenced this pull request Dec 5, 2017
Handle possibility of arrays for Network Security Groups
(cherry picked from commit 41eb3c4)

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

simaishi commented Dec 5, 2017

Fine backport details:

$ git log -1
commit 5f9fa811e493d3deb9ce71c0e1675d12990673e1
Author: Adam Grare <[email protected]>
Date:   Tue Dec 5 09:38:30 2017 -0500

    Merge pull request #180 from djberg96/network_security_groups
    
    Handle possibility of arrays for Network Security Groups
    (cherry picked from commit 41eb3c470ff19476b422701eadb8bee194695e40)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1521036

@simaishi
Copy link
Contributor

simaishi commented Dec 5, 2017

Euwe backport (to manageiq repo) details:

$ git log -1
commit 8f56fc86c5b4d5b10bc6354c8bfb3bc37c6447a8
Author: Adam Grare <[email protected]>
Date:   Tue Dec 5 09:38:30 2017 -0500

    Merge pull request #180 from djberg96/network_security_groups
    
    Handle possibility of arrays for Network Security Groups
    (cherry picked from commit 41eb3c470ff19476b422701eadb8bee194695e40)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1521043

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.

5 participants