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

Azure labels and tag mapping support for a new refresh #229

Merged
merged 2 commits into from
Apr 19, 2018

Conversation

AlexanderZagaynov
Copy link
Contributor

@AlexanderZagaynov AlexanderZagaynov commented Mar 20, 2018

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1493041
related old refresh type PR: #231
related core repo PR: ManageIQ/manageiq#17212
related UI repo PR: ManageIQ/manageiq-ui-classic#3697

@AlexanderZagaynov AlexanderZagaynov changed the title [WIP Azure tagging support [WIP] Azure tagging support Mar 22, 2018
@miq-bot miq-bot added the wip label Mar 22, 2018
@bronaghs
Copy link

@AlexanderZagaynov - the BZ for this PR has a target release of 5.8.4 (Fine branch) and this PR is specific to the Graph refresh which is not supported in the Fine release, so this PR cannot be backported. You will have to make a separate PR for the Fine branch to add tagging support for the old refresh. Getting this into the Fine branch is the priority.

@@ -60,6 +60,54 @@ def key_pairs(extra_attributes = {})
super(attributes.merge!(extra_attributes))
end

def vm_and_template_labels(extra_attributes = {})
Copy link

Choose a reason for hiding this comment

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

@Ladas @juliancheal these collections are starting to pile up in multiple providers, do you see a way to share them?
(I'm fine with duplicating for gaprindashvili & fine, then refactoring)

Copy link

@cben cben Mar 27, 2018

Choose a reason for hiding this comment

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

to clarify, I'm not sure sharing vm_and_template_labels/taggings between 2 VM providers is a big win;
I'm more thinking of a "polymorphic" anything-custom-attributes, anything-taggings, something like these:
https://github.com/ManageIQ/manageiq-providers-kubernetes/blob/5ec31943f8/app/models/manageiq/providers/kubernetes/container_manager/inventory_collections.rb#L359-L400

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, we should probably try to unify these next, from what I saw, each provider had it slightly different though

Copy link
Member

Choose a reason for hiding this comment

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

Yeah sounds good to me.

@JPrause
Copy link
Member

JPrause commented Apr 5, 2018

@miq-bot add_label blocker

@JPrause
Copy link
Member

JPrause commented Apr 5, 2018

@AlexanderZagaynov do you have an update on the status of this PR.

@cben
Copy link

cben commented Apr 9, 2018

Looks great 👍

I don't remember what you decided about 'Vm' type - do you need separate 'AzureVm', 'AmazonVm' types? IMHO better to get just Vm working & merged first, leave sub-types to a follow-up if desired.

@bronaghs
Copy link

bronaghs commented Apr 9, 2018

hi @AlexanderZagaynov - Graph refresh was not backported to the Fine branch, so this PR cannot be backported to Fine either. I see you closed the Fine specific implementation #231

@AlexanderZagaynov
Copy link
Contributor Author

@JPrause
Copy link
Member

JPrause commented Apr 17, 2018

@AlexanderZagaynov can you add the gaprindashvili/yes and the fine/yes if this can be backported.

@AlexanderZagaynov
Copy link
Contributor Author

@miq-bot add_label gaprindashvili/yes
@miq-bot add_label fine/no

@@ -279,6 +283,8 @@ def parse_instance(instance)
:orchestration_stack => @data_index.fetch_path(:orchestration_stacks, @resource_to_stack[uid]),
:availability_zone => @data_index.fetch_path(:availability_zones, 'default'),
:resource_group => @data_index.fetch_path(:resource_groups, rg_ems_ref),
:labels => labels,
:tags => map_labels('Vm', labels),
Copy link

Choose a reason for hiding this comment

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

FYI I think this should be 'VmAzure' like in #231, this is based on top of older version of BZ-1493041-old-refresh branch...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to rebase and add some changes to this PR after #231 will be merged

@AlexanderZagaynov
Copy link
Contributor Author

@JPrause there will be a special version of #231 for a fine branch

@miq-bot
Copy link
Member

miq-bot commented Apr 18, 2018

This pull request is not mergeable. Please rebase and repush.

@AlexanderZagaynov AlexanderZagaynov force-pushed the BZ-1493041 branch 2 times, most recently from 659cf41 to 3efabb6 Compare April 18, 2018 14:37
@AlexanderZagaynov AlexanderZagaynov changed the title [WIP] Azure tagging support Azure labels and tag mapping support for a new refresh Apr 18, 2018
@miq-bot miq-bot removed the wip label Apr 18, 2018
@miq-bot
Copy link
Member

miq-bot commented Apr 19, 2018

Checked commits AlexanderZagaynov/manageiq-providers-azure@61ea9f4~...915fda1 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
11 files checked, 0 offenses detected
Everything looks fine. 🍰

@AlexanderZagaynov
Copy link
Contributor Author

@miq-bot remove-label unmergeable

@AlexanderZagaynov
Copy link
Contributor Author

@cben @Ladas @bronaghs please review

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

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

👍 Awesome work @AlexanderZagaynov

@Ladas Ladas merged commit a1e134c into ManageIQ:master Apr 19, 2018
@Ladas Ladas added this to the Sprint 84 Ending Apr 23, 2018 milestone Apr 19, 2018
simaishi pushed a commit that referenced this pull request Apr 23, 2018
Azure labels and tag mapping support for a new refresh
(cherry picked from commit a1e134c)

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

Gaprindashvili backport details:

$ git log -1
commit 769aee2739e4dd00c5aea9f88b63b4373a33faa9
Author: Ladislav Smola <[email protected]>
Date:   Thu Apr 19 17:58:45 2018 +0200

    Merge pull request #229 from AlexanderZagaynov/BZ-1493041
    
    Azure labels and tag mapping support for a new refresh
    (cherry picked from commit a1e134c12beaf61921e9e59bad97b0bcf28eeaa9)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1568807

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.

8 participants