def tags(options = {})
      # TODO remove use of agent identity when fully drop AMQP
      do_query(nil, @agent.mode == :http ? @agent.self_href : @agent.identity, options) do |result|
        if result.kind_of?(Hash)
          yield(result.size == 1 ? result.values.first['tags'] : [])
        else
          yield result
        end
      end
    end
def tags(options = {})
      # TODO remove use of agent identity when fully drop AMQP
      do_query(nil, @agent.mode == :http ? @agent.self_href : @agent.identity, options) do |result|
        if result.kind_of?(Hash)
          yield(result.size == 1 ? result.values.first['tags'] : [])
        else
          yield result
        end
      end
    end
Retrieve current agent tags and give result to block

 === Parameters
 options(Hash):: Request options
   :raw(Boolean):: true to yield raw tag response instead of deserialized tags
   :timeout(Integer):: timeout in seconds before giving up and yielding an error message

 === Block
 Given block should take one argument which will be set with an array
 initialized with the tags of this instance

 === Return
 true:: Always return true