require "devops-client/options/common_options"

class UserOptions < CommonOptions
  commands :create, :delete, :list, :password, :email, role: [:add, :delete]

  COMMAND_NAME = "user"

  def initialize args, def_options
    super(args, def_options)
    self.header = I18n.t("headers.user")
    self.list_params = []
    self.create_params = ["USER_NAME", "EMAIL"]
    self.delete_params = ["USER_NAME"]
    self.password_params = ["USER_NAME"]
    self.email_params = ["USER_NAME", "EMAIL"]
    self.role_add_params = ["USER_NAME"]
    self.role_delete_params = ["USER_NAME"]
  end

  def create_options
    self.options do |parser, options|
      parser.banner << self.create_banner

      parser.recognize_option_value(:new_password, resource_name: :user)
    end
  end

end
