def save(connection)
      request = @id > 0 ? 'EnginePoolUpdateRequest' : 'EnginePoolCreateRequest'
      xml = %(<#{request} session-id="#{connection.session_id}">)
      xml << '<EnginePool'
      xml << %( id="#{@id}") if @id > 0
      xml << %( name="#{@name}" scope="#{@scope}">)
      @engines.each do |engine|
        xml << %(<Engine name="#{engine.name}" />)
      end
      xml << '</EnginePool>'
      xml << %(</#{request}>)

      r = connection.execute(xml, '1.2')
      if r.success
        r.res.elements.each(request.gsub('Request', 'Response')) do |v|
          return @id = v.attributes['id'].to_i
        end
      end
    end
def save(connection)
      request = @id > 0 ? 'EnginePoolUpdateRequest' : 'EnginePoolCreateRequest'
      xml = %(<#{request} session-id="#{connection.session_id}">)
      xml << '<EnginePool'
      xml << %( id="#{@id}") if @id > 0
      xml << %( name="#{@name}" scope="#{@scope}">)
      @engines.each do |engine|
        xml << %(<Engine name="#{engine.name}" />)
      end
      xml << '</EnginePool>'
      xml << %(</#{request}>)

      r = connection.execute(xml, '1.2')
      if r.success
        r.res.elements.each(request.gsub('Request', 'Response')) do |v|
          return @id = v.attributes['id'].to_i
        end
      end
    end
Save an engine pool to a security console.

 @param [Connection] connection Connection to console where site exists.