Module: Pvectl::Commands::DeleteCommand

Includes:
IrreversibleCommand
Included in:
DeleteContainer, DeleteVm
Defined in:
lib/pvectl/commands/delete_command.rb

Overview

Delete-specific functionality built on IrreversibleCommand.

Adds delete-specific behavior:

  • Confirmation message mentioning disk destruction

  • –keep-disks and –purge options in service_options

  • Delegates to Services::ResourceDelete

Examples:

Including in a command class

class DeleteVm
  include DeleteCommand
  RESOURCE_TYPE = :vm
  SUPPORTED_RESOURCES = %w[vm].freeze
end

Class Method Summary collapse

Methods included from IrreversibleCommand

#execute, #initialize

Class Method Details

.included(base) ⇒ Object

Hook called when module is included.

Parameters:

  • base (Class)

    the class including this module



25
26
27
# File 'lib/pvectl/commands/delete_command.rb', line 25

def self.included(base)
  base.extend(IrreversibleCommand::ClassMethods)
end