Class: A2::Subcommand::NodeMgmt::Search
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- A2::Subcommand::NodeMgmt::Search
- Includes:
- Paginated
- Defined in:
- lib/a2/subcommands/node_mgmt.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ Search
constructor
A new instance of Search.
Methods included from Paginated
#generate_paginated_json_filters, #generate_paginated_query_string, #with_paginated_filter_json, #with_paginated_filter_query
Methods included from Filtered
#generate_json_filters, #generate_query_filters, #parse_filters, #query_filter?, #set_custom_opts!, #set_filter_optparse_options!, #with_filter_query
Constructor Details
#initialize ⇒ Search
Returns a new instance of Search.
16 17 18 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 16 def initialize super('search', takes_commands: false) end |
Instance Method Details
#execute ⇒ Object
20 21 22 23 24 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 20 def execute with_paginated_filter_json do |json| puts JSON.pretty_generate(A2::Client.new(command_parser.data).search_managed_nodes(json)) end end |