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

Include cloud instances in Powered On/Off Report #15333

Merged
merged 1 commit into from
Jun 13, 2017
Merged

Include cloud instances in Powered On/Off Report #15333

merged 1 commit into from
Jun 13, 2017

Conversation

jntullo
Copy link

@jntullo jntullo commented Jun 7, 2017

Issue Summary:
Cloud instances are not appearing in the report "Operations VM Power On/Off Events for Last Week". This appears to be due to the filter, which is searching on EmsEvent.event_types that begin with VmPowered and end with Event.

For cloud instances, the event_types are: virtualMachines_powerOff_BeginRequest and virtualMachines_start_BeginRequest, so with the existing filter on the report, these are not being included.

Resolution:
This PR updates the yaml file that generates the report so that the report expression is now:

#<MiqExpression:0x007fb789e4f898
 @exp=
  {"and"=>
    [{"OR"=>
       [{"STARTS WITH"=>{"field"=>"EmsEvent-event_type", "value"=>"VmPowered"}},
        {"STARTS WITH"=>{"field"=>"EmsEvent-event_type", "value"=>"virtualMachines_powerOff"}},
        {"STARTS WITH"=>{"field"=>"EmsEvent-event_type", "value"=>"virtualMachines_start"}}]},
     {"OR"=>[{"ENDS WITH"=>{"field"=>"EmsEvent-event_type", "value"=>"Event"}}, {"ENDS WITH"=>{"field"=>"EmsEvent-event_type", "value"=>"Request"}}]},
     {"IS"=>{"field"=>"EmsEvent-timestamp", "value"=>"Last Week"}}]}>

to include power events for cloud instances.

Would appreciate some 👀 from the provider team to ensure that the understanding around powered on/ off events is correct and that we should include these events in this report.

cc: @bronaghs @imtayadeway

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

@miq-bot add_label wip, bug, reporting

@miq-bot
Copy link
Member

miq-bot commented Jun 7, 2017

Checked commit jntullo@707aad1 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. 🏆

@jntullo
Copy link
Author

jntullo commented Jun 13, 2017

@miq-bot remove_label wip

@jntullo jntullo changed the title [WIP] Include cloud instances in Powered On/Off Report Include cloud instances in Powered On/Off Report Jun 13, 2017
@miq-bot miq-bot removed the wip label Jun 13, 2017
Copy link
Contributor

@imtayadeway imtayadeway left a comment

Choose a reason for hiding this comment

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

LGTM

@imtayadeway
Copy link
Contributor

@miq-bot assign @gtanzillo

@jntullo
Copy link
Author

jntullo commented Jun 13, 2017

Here are some screenshots since there aren't any tests. These tests were conducted with an Azure cloud instance with a power event.

Result with the old report:
screen shot 2017-06-13 at 3 47 42 pm

Results with the updated report that displays the Azure instance's power event.
screen shot 2017-06-13 at 3 41 50 pm

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

👍 Nice!

@gtanzillo gtanzillo added this to the Sprint 63 Ending Jun 19, 2017 milestone Jun 13, 2017
@gtanzillo gtanzillo merged commit 4b29c3d into ManageIQ:master Jun 13, 2017
@jntullo
Copy link
Author

jntullo commented Jun 14, 2017

@miq-bot add_label fine/yes

simaishi pushed a commit that referenced this pull request Jun 14, 2017
@simaishi
Copy link
Contributor

Fine backport details:

 $ git log -1
commit 6486c9d65eb232da50182ff06b21f1f4421a553a
Author: Gregg Tanzillo <[email protected]>
Date:   Tue Jun 13 17:28:53 2017 -0400

    Merge pull request #15333 from jntullo/bz/default_report_timelines
    
    Include cloud instances in Powered On/Off Report
    (cherry picked from commit 4b29c3d16f641701bf66f2bbdcb6302af3dbd969)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1461467

@jntullo jntullo deleted the bz/default_report_timelines branch November 28, 2017 19:42
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