lib/liberty_buildpack/framework/dynamic_pulse_agent.rb
def detect
      dynamicpulse_remote_xml = File.join(@app_dir, 'WEB-INF/dynamicpulse-remote.xml')
      if File.exist?(dynamicpulse_remote_xml)
        doc = REXML::Document.new(open(dynamicpulse_remote_xml))
        @url = doc.elements['dynamicpulse-remote/centerUrl'].text
        @system_id = doc.elements['dynamicpulse-remote/systemId'].text

        @logger.debug("url=#{@url}")
        @logger.debug("system_id=#{@system_id}")

        return 'DynamicPULSE-3.+'
      end
    end
# Detects whether DynamicPULSE Agent can attach
#
# @return [String, nil] returns DynamicPULSE-2.+ if DynamicPULSE Agent can attach otherwise returns +nil+
Detects whether DynamicPULSE Agent can attach
Detects whether DynamicPULSE Agent can attach
def detect
      dynamicpulse_remote_xml = File.join(@app_dir, 'WEB-INF/dynamicpulse-remote.xml')
      if File.exist?(dynamicpulse_remote_xml)
        doc = REXML::Document.new(open(dynamicpulse_remote_xml))
        @url = doc.elements['dynamicpulse-remote/centerUrl'].text
        @system_id = doc.elements['dynamicpulse-remote/systemId'].text
        @logger.debug("url=#{@url}")
        @logger.debug("system_id=#{@system_id}")
        return 'DynamicPULSE-3.+'
      end
    end
def detect dynamicpulse_remote_xml = File . join ( @app_dir , 'WEB-INF/dynamicpulse-remote.xml' ) if File . exist? ( dynamicpulse_remote_xml ) doc = REXML :: Document . new ( open ( dynamicpulse_remote_xml ) ) @url = doc . elements [ 'dynamicpulse-remote/centerUrl' ] . text @system_id = doc . elements [ 'dynamicpulse-remote/systemId' ] . text @logger . debug ( "url=#{@url}" ) @logger . debug ( "system_id=#{@system_id}" ) return 'DynamicPULSE-3.+' end end
Detects whether DynamicPULSE Agent can attach
Detects whether DynamicPULSE Agent can attach
returns DynamicPULSE-2.+ if DynamicPULSE Agent can attach otherwise returns +nil+
returns DynamicPULSE - 2 . + if DynamicPULSE Agent can attach otherwise returns + nil +
String, nil