def run(options)
      fail_if_right_agent_is_not_running
      check_privileges
      set_logger(options)
      missing_argument unless options.include?(:action)
      # Don't use send_command callback as it swallows exceptions by design
      res = send_command(build_cmd(options), options[:verbose], options[:timeout])

      case options[:action]
      when :get_tags
        get_tags(res, options)
      when :query_tags
        query_tags(res, options)
      when :add_tag
        add_tag(res, options)
      when :remove_tag
        remove_tag(res, options)
      else
        write_error(res)
      end
    rescue SystemExit => e
      raise e
    rescue Exception => e
      fail(e)
    end
def run(options)
      fail_if_right_agent_is_not_running
      check_privileges
      set_logger(options)
      missing_argument unless options.include?(:action)
      # Don't use send_command callback as it swallows exceptions by design
      res = send_command(build_cmd(options), options[:verbose], options[:timeout])

      case options[:action]
      when :get_tags
        get_tags(res, options)
      when :query_tags
        query_tags(res, options)
      when :add_tag
        add_tag(res, options)
      when :remove_tag
        remove_tag(res, options)
      else
        write_error(res)
      end
    rescue SystemExit => e
      raise e
    rescue Exception => e
      fail(e)
    end
Manage instance tags

 === Parameters
 options(Hash):: Hash of options as defined in +parse_args+

 === Return
 true:: Always return true