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

Event switchboard #4328

Merged
merged 22 commits into from
Oct 26, 2015
Merged

Event switchboard #4328

merged 22 commits into from
Oct 26, 2015

Conversation

lfu
Copy link
Member

@lfu lfu commented Sep 11, 2015

Handle all events via automate.

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

@chessbyte
Copy link
Member

@lfu Please address the failing specs
/cc @gmcculloug

@lfu
Copy link
Member Author

lfu commented Sep 22, 2015

I’m working on it.

On Sep 22, 2015, at 2:04 PM, Oleg Barenboim notifications@github.com wrote:

@lfu https://github.com/lfu Please address the failing specs
/cc @gmcculloug https://github.com/gmcculloug

Reply to this email directly or view it on GitHub #4328 (comment).

@lfu lfu force-pushed the async_event_with_stream branch 5 times, most recently from 5c5d243 to ad4bf35 Compare September 23, 2015 15:25
@chessbyte
Copy link
Member

@gmcculloug please review

@miq-bot
Copy link
Member

miq-bot commented Oct 1, 2015

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Oct 2, 2015

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@chessbyte
Copy link
Member

@lfu Please rebase and push again

@miq-bot
Copy link
Member

miq-bot commented Oct 2, 2015

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@chessbyte
Copy link
Member

Please rebase and push again

@miq-bot
Copy link
Member

miq-bot commented Oct 8, 2015

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@chessbyte chessbyte changed the title Event switchboard. Event switchboard Oct 9, 2015
@miq-bot
Copy link
Member

miq-bot commented Oct 12, 2015

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@lfu
Copy link
Member Author

lfu commented Oct 13, 2015

@miq-bot add_label wip
I am going to split the PR as small as possible.

@miq-bot
Copy link
Member

miq-bot commented Oct 13, 2015

@lfu unrecognized command 'add_lable', ignoring...

Accepted commands are: add_label, remove_label, rm_label, assign, set_milestone

@miq-bot
Copy link
Member

miq-bot commented Oct 13, 2015

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

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Oct 13, 2015

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

lfu added 12 commits October 24, 2015 14:29
All MiqEvents are sent to automate asynchronously.
Once MiqEvent is handled by automate, a MiqQueue callback checks the policy resolution result and moves VmScan into next state.
to raise the event to automate synchronously while call_automate_event does it asynchronously.
policy_prevented? in VmOrTemplate and Host expects MiqException::PolicyPreventAction from policy resolution when the event is prevented from policy.
With event switchboard, all events are raised to automate and get processed asynchronously.
Use the MiqQueue callback to proceed when automate is done.
Retirement event is one of the Policy events.
MiqEvent.raise_evm_event would create a MiqEvent object for the event, then raise the event to automate.
All events sent to automate require an EventStream object in the URI with Switchboard changes.
MiqEvent.raise_evm_event creates an MiqEvent object then sends the event to automate.
In event switchboard, all events are sent to automate and require an EventStream object for automate process.
@miq-bot
Copy link
Member

miq-bot commented Oct 24, 2015

Checked commits lfu/manageiq@7253fe7~...349281c with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0
33 files checked, 18 offenses detected

app/models/miq_event.rb

  • 🔹 - Line 19, Col 3 - Metrics/AbcSize - Assignment Branch Condition size for raise_evm_event is too high. [16.82/15]
  • 🔹 - Line 44, Col 3 - Metrics/AbcSize - Assignment Branch Condition size for process_evm_event is too high. [41.3/15]

app/models/miq_request.rb

app/models/vm_or_template.rb

app/models/vm_scan.rb

lib/miq_automation_engine/engine/miq_ae_event.rb

spec/lib/miq_automation_engine/miq_ae_discovery_spec.rb

spec/models/host_spec.rb

spec/models/miq_request_spec.rb

spec/models/vm_spec.rb

gmcculloug added a commit that referenced this pull request Oct 26, 2015
@gmcculloug gmcculloug merged commit 0b7979b into ManageIQ:master Oct 26, 2015
@gmcculloug gmcculloug added this to the Sprint 31 Ending Oct 26, 2015 milestone Oct 26, 2015
@lfu
Copy link
Member Author

lfu commented Oct 26, 2015

@miq-bot remove_label wip

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