-
Notifications
You must be signed in to change notification settings - Fork 18
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
base: master
Are you sure you want to change the base?
Conversation
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: |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
👍 LGTM |
…log_by_entity_id Conflicts: commands/raxmon-alarms-changelog-list
RFR, entity filtering functionality should be live in production now |
what's the word? 👯 |
RFR -- pending https://github.com/racker/rackspace-monitoring/pull/13