builder/extra/tools/ruby-tpm/configure/configure_validation_handler.rb
def validate(configs)
    reset_errors()
    @config.reset()
    
    if @deployment_checks.size() == 0
      trace("Skipping checks because none are set for this command")
      return is_valid?()
    end
    
    configs.each{
      |config|
      @config.import(config)
      
      begin
        if run_locally?()
          Configurator.instance.write ""
          Configurator.instance.write_header "Local checks for #{@config.getProperty(HOME_DIRECTORY)}"
        
          validate_config(@config)
          debug("Finish: Local checks for #{@config.getProperty(HOME_DIRECTORY)}")
        else
          Configurator.instance.write ""
          Configurator.instance.write_header "Remote checks for #{@config.getProperty(HOST)}:#{@config.getProperty(HOME_DIRECTORY)}"
          
          # Invoke ValidationChecks on the remote server
          if Configurator.instance.command.use_remote_package?()
            validation_temp_directory = get_validation_temp_directory()
            command = "#{@config.getProperty(REMOTE_PACKAGE_PATH)}/tools/tpm validate-single-config --profile=#{validation_temp_directory}/#{Configurator::TEMP_DEPLOY_HOST_CONFIG} --command-class=#{Configurator.instance.command.class.name} #{Configurator.instance.get_remote_tpm_options().join(' ')}"
          else
            command = "#{@config.getProperty(CURRENT_RELEASE_DIRECTORY)}/tools/tpm validate-single-config --command-class=#{Configurator.instance.command.class.name} #{Configurator.instance.get_remote_tpm_options().join(' ')}"
          end
          
          result_dump = ssh_result(command, @config.getProperty(HOST), @config.getProperty(USERID), true)
          
          begin
            result = Marshal.load(result_dump)
            
            add_remote_result(result)
            
            debug("Finish: Remote checks for #{@config.getProperty(HOST)}:#{@config.getProperty(HOME_DIRECTORY)}")
          rescue ArgumentError => ae
            error("Unable to load the validation result.  This can happen due to a bug in Ruby.  Try updating to a newer version and retry the installation.")
          end
        end
      rescue => e
        exception(e)
      end
    }
    
    @config.reset()
    
    is_valid?()
  end
# These checks are more in-depth
These checks are more in-depth
These checks are more in - depth
def validate(configs)
    reset_errors()
    @config.reset()
    if @deployment_checks.size() == 0
      trace("Skipping checks because none are set for this command")
      return is_valid?()
    end
    configs.each{
      |config|
      @config.import(config)
      begin
        if run_locally?()
          Configurator.instance.write ""
          Configurator.instance.write_header "Local checks for #{@config.getProperty(HOME_DIRECTORY)}"
          validate_config(@config)
          debug("Finish: Local checks for #{@config.getProperty(HOME_DIRECTORY)}")
        else
          Configurator.instance.write ""
          Configurator.instance.write_header "Remote checks for #{@config.getProperty(HOST)}:#{@config.getProperty(HOME_DIRECTORY)}"
          if Configurator.instance.command.use_remote_package?()
            validation_temp_directory = get_validation_temp_directory()
            command = "#{@config.getProperty(REMOTE_PACKAGE_PATH)}/tools/tpm validate-single-config --profile=#{validation_temp_directory}/#{Configurator::TEMP_DEPLOY_HOST_CONFIG} --command-class=#{Configurator.instance.command.class.name} #{Configurator.instance.get_remote_tpm_options().join(' ')}"
          else
            command = "#{@config.getProperty(CURRENT_RELEASE_DIRECTORY)}/tools/tpm validate-single-config --command-class=#{Configurator.instance.command.class.name} #{Configurator.instance.get_remote_tpm_options().join(' ')}"
          end
          result_dump = ssh_result(command, @config.getProperty(HOST), @config.getProperty(USERID), true)
          begin
            result = Marshal.load(result_dump)
            add_remote_result(result)
            debug("Finish: Remote checks for #{@config.getProperty(HOST)}:#{@config.getProperty(HOME_DIRECTORY)}")
          rescue ArgumentError => ae
            error("Unable to load the validation result.  This can happen due to a bug in Ruby.  Try updating to a newer version and retry the installation.")
          end
        end
      rescue => e
        exception(e)
      end
    }
    @config.reset()
    is_valid?()
  end
def validate ( configs ) reset_errors ( ) @config . reset ( ) if @deployment_checks . size ( ) == 0 trace ( "Skipping checks because none are set for this command" ) return is_valid? ( ) end configs . each { | config | @config . import ( config ) begin if run_locally? ( ) Configurator . instance . write "" Configurator . instance . write_header "Local checks for #{@config.getProperty(HOME_DIRECTORY)}" validate_config ( @config ) debug ( "Finish: Local checks for #{@config.getProperty(HOME_DIRECTORY)}" ) else Configurator . instance . write "" Configurator . instance . write_header "Remote checks for #{@config.getProperty(HOST)}:#{@config.getProperty(HOME_DIRECTORY)}" if Configurator . instance . command . use_remote_package? ( ) validation_temp_directory = get_validation_temp_directory ( ) command = "#{@config.getProperty(REMOTE_PACKAGE_PATH)}/tools/tpm validate-single-config --profile=#{validation_temp_directory}/#{Configurator::TEMP_DEPLOY_HOST_CONFIG} --command-class=#{Configurator.instance.command.class.name} #{Configurator.instance.get_remote_tpm_options().join(' ')}" else command = "#{@config.getProperty(CURRENT_RELEASE_DIRECTORY)}/tools/tpm validate-single-config --command-class=#{Configurator.instance.command.class.name} #{Configurator.instance.get_remote_tpm_options().join(' ')}" end result_dump = ssh_result ( command , @config . getProperty ( HOST ) , @config . getProperty ( USERID ) , true ) begin result = Marshal . load ( result_dump ) add_remote_result ( result ) debug ( "Finish: Remote checks for #{@config.getProperty(HOST)}:#{@config.getProperty(HOME_DIRECTORY)}" ) rescue ArgumentError => ae error ( "Unable to load the validation result.  This can happen due to a bug in Ruby.  Try updating to a newer version and retry the installation." ) end end rescue => e exception ( e ) end } @config . reset ( ) is_valid? ( ) end
These checks are more in-depth
These checks are more in - depth
# Invoke ValidationChecks on the remote server
configs