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

Filter alarm changelog by entity #30

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fourk
Copy link

@fourk fourk commented Oct 15, 2012

def callback(driver, options, args, callback):
callback(driver.list_alarm_changelog(ex_next_marker=options.marker))
entity = None
if options.entity_id is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'd check for a truthy value here instead of checking explicitly for is not None.

Copy link
Contributor

Choose a reason for hiding this comment

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

Never mind on this. After talking to @fourk this is intended behavior.

Copy link
Author

Choose a reason for hiding this comment

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

If a user attempts to run this using something like raxmon-alarms-changelog-list --entity-id="", I believe that it makes more sense to give them a 400 error for an invalid entityId, rather than give them an unfiltered response.

@jirwin
Copy link
Contributor

jirwin commented Oct 16, 2012

👍 LGTM

@fourk
Copy link
Author

fourk commented Dec 5, 2012

RFR, entity filtering functionality should be live in production now

@robert-chiniquy
Copy link
Contributor

what's the word? 👯

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.

3 participants