Class: A2::Subcommand::NodeMgmt::BulkDeleteByFilter
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- A2::Subcommand::NodeMgmt::BulkDeleteByFilter
- Defined in:
- lib/a2/subcommands/node_mgmt.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ BulkDeleteByFilter
constructor
A new instance of BulkDeleteByFilter.
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
Methods included from Approved
#ask_for_approval, #with_approval
Constructor Details
#initialize ⇒ BulkDeleteByFilter
Returns a new instance of BulkDeleteByFilter.
56 57 58 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 56 def initialize super('bulk-delete-by-filter', takes_commands: false) end |
Instance Method Details
#execute ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 60 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 |