Class: A2::Subcommand::NodeMgmt::BulkDeleteByFilter
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ BulkDeleteByFilter
constructor
A new instance of BulkDeleteByFilter.
Methods included from Approved
#ask_for_approval, #with_approval
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
#initialize ⇒ BulkDeleteByFilter
Returns a new instance of BulkDeleteByFilter.
51 52 53 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 51 def initialize super('bulk-delete-by-filter', takes_commands: false) end |
Instance Method Details
#execute ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 55 def execute with_paginated_filter_json do |json| with_approval("delete nodes using filter") do puts JSON.pretty_generate(A2::Client.new(command_parser.data).bulk_delete_managed_nodes_by_filter(json)) end end end |