-
Notifications
You must be signed in to change notification settings - Fork 898
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
Event switchboard #4328
Conversation
@lfu Please address the failing specs |
I’m working on it.
|
5c5d243
to
ad4bf35
Compare
@gmcculloug please review |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
ad4bf35
to
188c64c
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
@lfu Please rebase and push again |
188c64c
to
0ca6b82
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
Please rebase and push again |
0ca6b82
to
4445f8b
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
4445f8b
to
f71595f
Compare
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
f71595f
to
e597ef8
Compare
@miq-bot add_label wip |
@lfu unrecognized command 'add_lable', ignoring... Accepted commands are: add_label, remove_label, rm_label, assign, set_milestone |
@lfu Cannot apply the following label because they are not recognized: WIP |
1 similar comment
@lfu Cannot apply the following label because they are not recognized: WIP |
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.
for the MiqRequest events.
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.
0f2b969
to
349281c
Compare
Checked commits lfu/manageiq@7253fe7~...349281c with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0 app/models/miq_event.rb
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
|
@miq-bot remove_label wip |
Handle all events via automate.
https://bugzilla.redhat.com/show_bug.cgi?id=1252485