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

Add Automate modeling for External Ansible Tower Events. #68

Merged
merged 1 commit into from
Mar 15, 2017

Conversation

lfu
Copy link
Member

@lfu lfu commented Mar 8, 2017

@lfu
Copy link
Member Author

lfu commented Mar 8, 2017

@miq-bot assign @gmcculloug
@miq-bot add_label providers/ansible_tower
@miq-bot add_label automate
@miq-bot add_label euwe/no

@miq-bot
Copy link
Member

miq-bot commented Mar 8, 2017

@lfu Cannot apply the following labels because they are not recognized: providers/ansible_tower, automate

attributes:
description:
display_name: Ansible Tower
name: ANSIBLE_TOWER
Copy link
Member

Choose a reason for hiding this comment

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

Suggest

display_name: 
name: Ansible_Tower

Based on discussion from #69 (review)

@miq-bot
Copy link
Member

miq-bot commented Mar 8, 2017

@lfu Cannot apply the following label because they are not recognized: providers/ansible_tower

@miq-bot
Copy link
Member

miq-bot commented Mar 8, 2017

@lfu Cannot apply the following label because they are not recognized: automate

@lfu lfu force-pushed the ansible_events_in_ae_140758707 branch from bbd71d4 to aa8a886 Compare March 9, 2017 14:45
@gmcculloug
Copy link
Member

@bzwei Please review. Wondering if it makes sense to issue refresh for all of the listed resources. I think there might be some object types that we do not collect, or we are not concerned with for embedded provider, that may not need to refresh. For example, groups or hosts.

@@ -0,0 +1,10 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

@lfu is there a reason to choose Ansible_Tower.class rather than AnsibleTower.class?

Copy link
Member Author

Choose a reason for hiding this comment

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

It has to match what is defined here.

Copy link
Member

Choose a reason for hiding this comment

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

Wondering if the source reference should be changed to be a mixed-case value here and return AnsibleTower which would be inline with what is expected.

The original source value was VC and the events added after all followed the same uppercase pattern.

Examples:
app/models/manageiq/providers/openstack/cloud_manager/event_parser.rb#L10
app/models/manageiq/providers/google/cloud_manager/event_parser.rb#L14
app/models/manageiq/providers/storage_manager/cinder_manager/event_parser.rb#L12

@lfu Do you know if this would adversely effect anything?

Any thoughts? @Fryguy @blomquisg

Copy link
Member

Choose a reason for hiding this comment

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

@lfu Talking to @Fryguy about this and it would be better to follow existing pattern which would mean that:

https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/embedded_ansible/automation_manager/event_parser.rb#L5
Should be changed to EMBEDDEDANSIBLE

https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/ansible_tower/automation_manager/event_parser.rb#L5
Should be changed to ANSIBLETOWER

Then we would need to update this PR and #69 to match the new source changes. (And use mixed-case in the automate class so it looks nicer like we do for OpenStack)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good 👍

@bzwei
Copy link
Contributor

bzwei commented Mar 10, 2017

Even for external provider we don't need to refresh on receiving any job create/update/delete events.

@lfu lfu force-pushed the ansible_events_in_ae_140758707 branch from 737935f to a4e415b Compare March 14, 2017 17:59
@miq-bot
Copy link
Member

miq-bot commented Mar 14, 2017

Checked commit lfu@a4e415b with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks good. 🏆

@gmcculloug gmcculloug merged commit b4ec2b4 into ManageIQ:master Mar 15, 2017
@gmcculloug gmcculloug added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 15, 2017
@lfu lfu deleted the ansible_events_in_ae_140758707 branch September 29, 2018 14:33
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.

4 participants