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

fix issue 58 #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.9.1 01/24/2018
* Add --format to silenced list

## 0.9.0 01/18/2018
* Add token authorization

Expand Down
2 changes: 2 additions & 0 deletions lib/sensu-cli/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ def silenced
opt :subscription, 'The subscription entries to return', :short => 's', :type => :string
opt :limit, 'The number of aggregates to return', :short => 'l', :type => :string
opt :offset, 'The number of aggregates to offset before returning', :short => 'o', :type => :string
opt :format, 'Available formats; single, table, json', :short => 'f', :type => :string
end
Trollop::die :offset, 'Offset depends on the limit option --limit ( -l )'.color(:red) if p[:offset] && !p[:limit]
Trollop::die :format, 'Available optional formats: single, table, json'.color(:red) if p[:format] != 'table' && p[:format] != 'single' && p[:format] != 'json' && p[:format]

Choose a reason for hiding this comment

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

I think these would need to be || rather than && it can't possibly be all of the combinations it just needs to be one of them.

{ :command => 'silenced', :method => 'Get', :fields => p }
when 'create'
p = Trollop::options do
Expand Down
2 changes: 1 addition & 1 deletion lib/sensu-cli/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SensuCli
VERSION = '0.9.0'
VERSION = '0.9.1'
end