def do_update(new_tags, old_tags, options = {}, &block)
      agent_check
      raise ArgumentError.new("Cannot add and remove tags in same update") if new_tags.any? && old_tags.any?
      tags = @agent.tags
      tags += new_tags
      tags -= old_tags
      tags.uniq!

      if new_tags.any?
        request = RightScale::RetryableRequest.new("/router/add_tags", {:tags => new_tags}, options)
      elsif old_tags.any?
        request = RightScale::RetryableRequest.new("/router/delete_tags", {:tags => old_tags}, options)
      else
        return
      end

      if block
        # Always yield raw response
        request.callback do |_|
          # Refresh agent's copy of tags on successful update
          @agent.tags = tags
          block.call(request.raw_response)
        end
        request.errback { |message| block.call(request.raw_response || message) }
      end
      request.run
      true
    end
def do_update(new_tags, old_tags, options = {}, &block)
      agent_check
      raise ArgumentError.new("Cannot add and remove tags in same update") if new_tags.any? && old_tags.any?
      tags = @agent.tags
      tags += new_tags
      tags -= old_tags
      tags.uniq!

      if new_tags.any?
        request = RightScale::RetryableRequest.new("/router/add_tags", {:tags => new_tags}, options)
      elsif old_tags.any?
        request = RightScale::RetryableRequest.new("/router/delete_tags", {:tags => old_tags}, options)
      else
        return
      end

      if block
        # Always yield raw response
        request.callback do |_|
          # Refresh agent's copy of tags on successful update
          @agent.tags = tags
          block.call(request.raw_response)
        end
        request.errback { |message| block.call(request.raw_response || message) }
      end
      request.run
      true
    end
Runs a tag update with a list of new or old tags

 === Parameters
 new_tags(Array):: new tags to add or empty
 old_tags(Array):: old tags to remove or empty
 block(Block):: optional callback for update response

 === Block
 A block is optional. If provided, should take one argument which will be set with the
 raw response

 === Return
 true:: Always return true