Class: A2::Subcommand::NodeMgmt::Search

Inherits:
Paginated show all
Defined in:
lib/a2/subcommands/node_mgmt.rb

Instance Attribute Summary

Attributes inherited from Filtered

#filter_key, #query_filter

Instance Method Summary collapse

Methods inherited from Paginated

#generate_paginated_query_string, #with_paginated_filter_json, #with_paginated_filter_query

Methods inherited from Filtered

#generate_json_filters, #generate_query_filters, #parse_filters, #set_custom_opts!, #set_filter_optparse_options!, #with_filter_query

Constructor Details

#initializeSearch

Returns a new instance of Search.



15
16
17
# File 'lib/a2/subcommands/node_mgmt.rb', line 15

def initialize
  super('search', takes_commands: false)
end

Instance Method Details

#executeObject



19
20
21
22
23
# File 'lib/a2/subcommands/node_mgmt.rb', line 19

def execute
  with_paginated_filter_json do |json|
    puts JSON.pretty_generate(A2::Client.new(command_parser.data).search_managed_nodes(json))
  end
end