require "devops-client/options/common_options"

class StackTemplateOptions < CommonOptions

  commands :create, :delete, :list, :show

  COMMAND_NAME = "stack_template"

  def initialize args, def_options
    super(args, def_options)
    self.header = I18n.t("headers.stack_template")
    self.banner_header = "stack_template"
    self.list_params = ["[provider]"]
    self.show_params = ["STACK_TEMPLATE"]
    self.delete_params = ["STACK_TEMPLATE"]
  end

  def create_options
    self.options do |parser, options|
      parser.banner << self.create_banner
      parser.resource_name = :stack_template

      parser.recognize_option_value(:provider, default: nil)
      parser.recognize_option_value(:provider_account, default: nil)
      parser.recognize_option_value(:id)
      parser.recognize_option_value(:template_file)
    end
  end
end
