Sha256: a7f65df600bec976cdbfa589cd4ea948e3a5bc5fc1143319f092692e724c136e

Contents?: true

Size: 1.49 KB

Versions: 2

Compression:

Stored size: 1.49 KB

Contents

module JmeterPerf
  class DSL
    def ldap_request_defaults(params = {}, &)
      node = JmeterPerf::LDAPRequestDefaults.new(params)
      attach_node(node, &)
    end
  end

  class LDAPRequestDefaults
    attr_accessor :doc
    include Helper

    def initialize(params = {})
      testname = params.is_a?(Array) ? "LDAPRequestDefaults" : (params[:name] || "LDAPRequestDefaults")
      @doc = Nokogiri::XML(<<~EOS.strip_heredoc)
        <ConfigTestElement guiclass="LdapConfigGui" testclass="ConfigTestElement" testname="#{testname}" enabled="true">
          <stringProp name="servername"/>
          <stringProp name="port"/>
          <stringProp name="rootdn"/>
          <boolProp name="user_defined">true</boolProp>
          <stringProp name="test">add</stringProp>
          <stringProp name="base_entry_dn"/>
          <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="#{testname}" enabled="true">
            <collectionProp name="Arguments.arguments">
              <elementProp name=" " elementType="Argument">
                <stringProp name="Argument.name"> </stringProp>
                <stringProp name="Argument.value"> </stringProp>
                <stringProp name="Argument.metadata">=</stringProp>
              </elementProp>
            </collectionProp>
          </elementProp>
        </ConfigTestElement>
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jmeter_perf-0.0.6 lib/jmeter_perf/dsl/ldap_request_defaults.rb
jmeter_perf-0.0.2 lib/jmeter_perf/dsl/ldap_request_defaults.rb