Class: Pvectl::Commands::TemplateContainer

Inherits:
Object
  • Object
show all
Includes:
TemplateCommand
Defined in:
lib/pvectl/commands/template_container.rb,
sig/pvectl/commands/template_container.rbs

Overview

Handler for the pvectl template container command.

Converts one or more containers to templates (irreversible). Always requires confirmation (--yes to skip). Running containers must be stopped first or use --force.

Examples:

Convert a single container

pvectl template container 200 --yes

Convert using ct alias

pvectl template ct 200 --yes

Force convert running container

pvectl template container 200 --force --yes

Constant Summary collapse

RESOURCE_TYPE =
:container
SUPPORTED_RESOURCES =
%w[container ct].freeze

Method Summary

Methods included from TemplateCommand

#build_error_result, #build_presenter, #build_success_result, #confirm_message, #confirm_operation, #convert_single, included, #irreversibility_warning, #perform_operation, #perform_service_call, #running_error, #stop_resource

Methods included from IrreversibleCommand

#apply_selectors, #build_presenter, #build_repository, #confirm_operation, #determine_exit_code, #execute, included, #initialize, #load_config, #no_resources_found, #output_results, #perform_operation, #perform_service_call, #resolve_resources, #resource_type_symbol, #selector_strings, #service_options, #supported_resource?, #supported_types, #usage_error