Class: A2::Subcommand::Infra::ListNodeStatusCounts
- Inherits:
-
Filtered
- Object
- CmdParse::Command
- Filtered
- A2::Subcommand::Infra::ListNodeStatusCounts
- Defined in:
- lib/a2/subcommands/infra.rb
Instance Attribute Summary
Attributes inherited from Filtered
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ ListNodeStatusCounts
constructor
A new instance of ListNodeStatusCounts.
Methods inherited from Filtered
#generate_json_filters, #generate_query_filters, #parse_filters, #set_custom_opts!, #set_filter_optparse_options!, #with_filter_query
Constructor Details
#initialize ⇒ ListNodeStatusCounts
Returns a new instance of ListNodeStatusCounts.
40 41 42 |
# File 'lib/a2/subcommands/infra.rb', line 40 def initialize super('list-node-status-counts', takes_commands: false, query_filter: true) end |
Instance Method Details
#execute ⇒ Object
44 45 46 47 48 |
# File 'lib/a2/subcommands/infra.rb', line 44 def execute with_filter_query do |query_filter| puts JSON.pretty_generate(A2::Client.new(command_parser.data).list_all_node_status_counts(query_filter)) end end |