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

Issue 580 - Get-RubrikEventSeries #585

Merged
merged 12 commits into from
Mar 15, 2020
Merged

Issue 580 - Get-RubrikEventSeries #585

merged 12 commits into from
Mar 15, 2020

Conversation

mwpreston
Copy link
Contributor

@mwpreston mwpreston commented Mar 11, 2020

Description

Changed Get-RubrikEvent, adding parametersets to isolate eventSeriesId. When cmdlet is called with eventSeriesId the Get-RubrikEventSeries cmdlet is now called rather than filtering through a giant, unindexed table. Details in Issue 580 and updated unit tests.

Related Issue

Issue 580

Motivation and Context

When using the eventSeriesId parameter on Get-RubrikEvent it will now call Get-RubrikEventSeries which in turn calls the API which utilizes the properly indexed table to retrieve events based on eventSeries.

How Has This Been Tested?

Tested against 5.0 and 5.1 in the TM lab

Screenshots (if appropriate):

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTION document.
  • I have updated the CHANGELOG file accordingly for the version that this merge modifies.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@jaapbrasser jaapbrasser left a comment

Choose a reason for hiding this comment

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

Looks good, from a functionality point of view I tested this against both 5.0 and 5.1. It seems that when querying by eventseriesid the objects look slightly different than when querying by eventtype.

@jaapbrasser jaapbrasser self-requested a review March 11, 2020 20:54
Copy link
Contributor

@jaapbrasser jaapbrasser left a comment

Choose a reason for hiding this comment

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

Created Rubrik.EventSeries object definition and updated the output of Get-RubrikEventSeries

image

@mwpreston
Copy link
Contributor Author

Yes - output is slightly different. This is due to what the api endpoints return and how they function.

IE - querying by an eventSeriesId calls event_series/{id} endpoint which returns all events (listed in the eventDetails property) for the given event series.

Querying by status or eventType calls the event_series endpoint which returns information around only the latest event within an event series. Odd I know, but that's how the endpoints work...

@jaapbrasser jaapbrasser self-requested a review March 15, 2020 19:28
Copy link
Contributor

@jaapbrasser jaapbrasser left a comment

Choose a reason for hiding this comment

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

:shipit:

@jaapbrasser jaapbrasser merged commit 5042f2e into devel Mar 15, 2020
@jaapbrasser jaapbrasser deleted the mwpreston-issue580 branch March 15, 2020 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants