Class: A2::Subcommand::NodeMgmt::BulkDeleteById
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- A2::Subcommand::NodeMgmt::BulkDeleteById
- Includes:
- Approved
- Defined in:
- lib/a2/subcommands/node_mgmt.rb
Instance Method Summary collapse
- #execute(ids) ⇒ Object
-
#initialize ⇒ BulkDeleteById
constructor
A new instance of BulkDeleteById.
Methods included from Approved
#ask_for_approval, #with_approval
Constructor Details
#initialize ⇒ BulkDeleteById
Returns a new instance of BulkDeleteById.
39 40 41 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 39 def initialize super('bulk-delete-by-ids', takes_commands: false) end |
Instance Method Details
#execute(ids) ⇒ Object
43 44 45 46 47 |
# File 'lib/a2/subcommands/node_mgmt.rb', line 43 def execute(ids) with_approval("delete nodes") do puts JSON.pretty_generate(A2::Client.new(command_parser.data).bulk_delete_managed_nodes_by_id(id)) end end |