Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3524 - in trunk/rnp_java-cl-mp: ant conf doc doc/schema lib/misc src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools

Subject: perfsonar development work

List archive

perfsonar: r3524 - in trunk/rnp_java-cl-mp: ant conf doc doc/schema lib/misc src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3524 - in trunk/rnp_java-cl-mp: ant conf doc doc/schema lib/misc src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools
  • Date: Mon, 17 Mar 2008 16:01:58 -0400

Author: fernandes
Date: 2008-03-17 16:01:57 -0400 (Mon, 17 Mar 2008)
New Revision: 3524

Added:
trunk/rnp_java-cl-mp/lib/misc/perfsonar-base-ant-1.0.20080303.jar
Removed:
trunk/rnp_java-cl-mp/lib/misc/perfsonar-base-ant-1.0.20080204.jar
Modified:
trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml
trunk/rnp_java-cl-mp/ant/configure-targets.xml
trunk/rnp_java-cl-mp/ant/const.properties.template
trunk/rnp_java-cl-mp/ant/libs-download-targets.xml
trunk/rnp_java-cl-mp/conf/eventType-map.xml
trunk/rnp_java-cl-mp/conf/log4j.properties.template
trunk/rnp_java-cl-mp/conf/service.properties.template
trunk/rnp_java-cl-mp/conf/service.properties.template-2
trunk/rnp_java-cl-mp/doc/CLMP Interface Specification.doc
trunk/rnp_java-cl-mp/doc/Changelog.txt
trunk/rnp_java-cl-mp/doc/schema/bwctlRequest.rnc
trunk/rnp_java-cl-mp/doc/schema/bwctlResponse.rnc
trunk/rnp_java-cl-mp/doc/schema/owampRequest.rnc
trunk/rnp_java-cl-mp/doc/schema/owampResponse.rnc
trunk/rnp_java-cl-mp/doc/schema/pingRequest.rnc
trunk/rnp_java-cl-mp/doc/schema/pingResponse.rnc
trunk/rnp_java-cl-mp/doc/schema/tracerouteRequest.rnc
trunk/rnp_java-cl-mp/doc/schema/tracerouteResponse.rnc

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java

trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
Log:
Added: Autentication functionality based on eventType
Updated: Using version 1.0.20080310 of perfsonar-base.
Bug Fix: CronComponent had a bug in the new eventType's handling
Bug Fix: RNCs fixed with right eventType (bug id 254)
Bug Fix: Ping RNC PingParameters definition fixed (id 361)
Bug Fix: CL MP not reporting ping measurement with less than 8 bytes (id 365)
Bug Fix: packetSize parameter missing in Interface Specification description
of Traceroute (id 375)


Modified: trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml
===================================================================
--- trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/ant/axis-deploy-targets.xml 2008-03-17 20:01:57
UTC (rev 3524)
@@ -49,7 +49,7 @@
depends="copy-dep-base-service-jars">

<copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20080124/nmwg-1.0.20080124.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
- <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080124/perfsonar-base-1.0.20080124.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080310/perfsonar-base-1.0.20080310.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
<copy
file="${basedir}/lib/repository/perfsonar/perfsonar-web-admin/0.5b/perfsonar-web-admin-0.5b.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>

<copy file="${basedir}/conf/eventType-map.xml"
todir="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/conf"/>
@@ -221,7 +221,7 @@
<copy file="${basedir}/${build}/${jarfilename}-${version}.jar"
todir="${tmpdir}/WEB-INF/lib"/>

<copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20080124/nmwg-1.0.20080124.jar"
todir="${tmpdir}/WEB-INF/lib"/>
- <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080124/perfsonar-base-1.0.20080124.jar"
todir="${tmpdir}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080310/perfsonar-base-1.0.20080310.jar"
todir="${tmpdir}/WEB-INF/lib"/>
<copy
file="${basedir}/lib/repository/perfsonar/perfsonar-web-admin/0.5b/perfsonar-web-admin-0.5b.jar"
todir="${tmpdir}/WEB-INF/lib"/>

<copy file="${basedir}/conf/eventType-map.xml"
todir="${tmpdir}/WEB-INF/classes/perfsonar/conf"/>

Modified: trunk/rnp_java-cl-mp/ant/configure-targets.xml
===================================================================
--- trunk/rnp_java-cl-mp/ant/configure-targets.xml 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/ant/configure-targets.xml 2008-03-17 20:01:57
UTC (rev 3524)
@@ -65,6 +65,7 @@
<!-- CL-MP specific -->
<entry key="service.clmp.tools_map"
value="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/conf/eventType-map.xml"/>
<entry key="service.clmp.cron_dir"
value="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/cron"/>
+ <entry key="service.clmp.cron.local_storage_dir"
value="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/cron"/>

</propertyfile>
</target>

Modified: trunk/rnp_java-cl-mp/ant/const.properties.template
===================================================================
--- trunk/rnp_java-cl-mp/ant/const.properties.template 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/ant/const.properties.template 2008-03-17 20:01:57
UTC (rev 3524)
@@ -18,7 +18,7 @@
wsdd.webservice.name=CommandLineService

antcontrib.jar=${basedir}/lib/misc/ant-contrib-1.0b3.jar
-antpsbase.jar=${basedir}/lib/misc/perfsonar-base-ant-1.0.20080204.jar
+antpsbase.jar=${basedir}/lib/misc/perfsonar-base-ant-1.0.20080303.jar

api.location=doc/api
api.title=perfSONAR

Modified: trunk/rnp_java-cl-mp/ant/libs-download-targets.xml
===================================================================
--- trunk/rnp_java-cl-mp/ant/libs-download-targets.xml 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/ant/libs-download-targets.xml 2008-03-17 20:01:57
UTC (rev 3524)
@@ -54,7 +54,7 @@

<artifact:dependencies>

- <dependency groupId="perfsonar" artifactId="perfsonar-base"
version="1.0.20080124"/>
+ <dependency groupId="perfsonar" artifactId="perfsonar-base"
version="1.0.20080310"/>
<dependency groupId="nmwg" artifactId="nmwg"
version="1.0.20080124"/>
<dependency groupId="perfsonar" artifactId="perfsonar-web-admin"
version="0.5b"/>


Modified: trunk/rnp_java-cl-mp/conf/eventType-map.xml
===================================================================
--- trunk/rnp_java-cl-mp/conf/eventType-map.xml 2008-03-14 16:04:53 UTC (rev
3523)
+++ trunk/rnp_java-cl-mp/conf/eventType-map.xml 2008-03-17 20:01:57 UTC (rev
3524)
@@ -5,26 +5,31 @@
<eventType>
<name>http://ggf.org/ns/nmwg/tools/ping/2.0</name>

<class>org.perfsonar.service.measurementPoint.commandLine.tools.Ping</class>
+ <authentication>no</authentication>
</eventType>

<eventType>
<name>http://ggf.org/ns/nmwg/tools/traceroute/2.0</name>

<class>org.perfsonar.service.measurementPoint.commandLine.tools.Traceroute</class>
+ <authentication>no</authentication>
</eventType>

<eventType>
<name>http://ggf.org/ns/nmwg/tools/owamp/2.0</name>

<class>org.perfsonar.service.measurementPoint.commandLine.tools.Owamp</class>
+ <authentication>no</authentication>
</eventType>

<eventType>
<name>http://ggf.org/ns/nmwg/tools/bwctl/2.0</name>

<class>org.perfsonar.service.measurementPoint.commandLine.tools.Bwctl</class>
+ <authentication>no</authentication>
</eventType>

<eventType>
<name>http://ggf.org/ns/nmwg/tools/cron/2.0</name>

<class>org.perfsonar.service.measurementPoint.commandLine.tools.Cron</class>
+ <authentication>no</authentication>
</eventType>

</eventType-config>

Modified: trunk/rnp_java-cl-mp/conf/log4j.properties.template
===================================================================
--- trunk/rnp_java-cl-mp/conf/log4j.properties.template 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/conf/log4j.properties.template 2008-03-17 20:01:57
UTC (rev 3524)
@@ -1,27 +1,47 @@
-
## $Id$
## project : perfSONAR
## author: romradz


+
+# The path of a directory which contains log files.
+# Replace occurrences of _LOGPATH_ string in this file with a real path.
logDir=_LOGPATH_


##
-## All log levels is one log file.
-## Dafaultly debug level is switched off (commented).
+## All log levels in one log file.
+## By default debug level is switched off (commented).
##
+
+# Group=Log levels
+# Description=Assigns debug log messages to the specified log appender.
#log4j.logger.sonar-debug=DEBUG, psRootAppender
+
+# Group=Log levels
+# Description=Assigns info log messages to the specified log appender.
log4j.logger.sonar-info=INFO, psRootAppender
+
+# Group=Log levels
+# Description=Assigns warn log messages to the specified log appender.
log4j.logger.sonar-warn=WARN, psRootAppender
+
+# Group=Log levels
+# Description=Assigns error log messages to the specified log appender.
log4j.logger.sonar-error=ERROR, psRootAppender
+
+# Group=Log levels
+# Description=Assigns fatal log messages to the specified log appender.
log4j.logger.sonar-fatal=FATAL, psRootAppender


+
##
## Uncomment this block (and comment the one above)
## if you want to have log levels in separate log files
-##
+##
+## this section is only for developer tests
+##
#log4j.logger.sonar-debug=DEBUG, debugAppender, psRootAppender
#log4j.logger.sonar-info=INFO, infoAppender, psRootAppender
#log4j.logger.sonar-warn=WARN, warnAppender, psRootAppender
@@ -29,60 +49,185 @@
#log4j.logger.sonar-fatal=FATAL, fatalAppender, psRootAppender


-#DEBUG
+
+
+######################################### DEBUG
#######################################
+
+# Group=Debug message logging
+# Description=The maximum number of backup log files to create.
log4j.appender.debugAppender.MaxBackupIndex=11
+
+# Group=Debug message logging
+# Description=The path to the log file, including the log file's name.
log4j.appender.debugAppender.File=_LOGPATH_/perfsonar_debug.log
+
+# Group=Debug message logging
+# Description=The class responsible for the logging layout.
log4j.appender.debugAppender.layout=org.apache.log4j.PatternLayout
+
+# Group=Debug message logging
+# Description=The log message format.
log4j.appender.debugAppender.layout.ConversionPattern=%d %5p - %m%n
+
+# Group=Debug message logging
+# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
log4j.appender.debugAppender.MaxFileSize=500KB
+
+# Group=Debug message logging
+# Description=The class responsible for appending log messages to the log
file.
log4j.appender.debugAppender=org.apache.log4j.RollingFileAppender

-#INFO
+
+
+######################################### INFO
########################################
+
+# Group=Info message logging
+# Description=The maximum number of backup log files to create.
log4j.appender.infoAppender.MaxBackupIndex=11
+
+# Group=Info message logging
+# Description=The path to the log file, including the log file's name.
log4j.appender.infoAppender.File=_LOGPATH_/perfsonar_info.log
+
+# Group=Info message logging
+# Description=The class responsible for the logging layout.
log4j.appender.infoAppender.layout=org.apache.log4j.PatternLayout
+
+# Group=Info message logging
+# Description=The log message format.
log4j.appender.infoAppender.layout.ConversionPattern=%d %5p - %m%n
+
+# Group=Info message logging
+# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
log4j.appender.infoAppender.MaxFileSize=500KB
+
+# Group=Info message logging
+# Description=The class responsible for appending log messages to the log
file.
log4j.appender.infoAppender=org.apache.log4j.RollingFileAppender

-#WARN
+
+
+######################################### WARN
########################################
+
+# Group=Warn message logging
+# Description=The maximum number of backup log files to create.
log4j.appender.warnAppender.MaxBackupIndex=11
+
+# Group=Warn message logging
+# Description=The path to the log file, including the log file's name.
log4j.appender.warnAppender.File=_LOGPATH_/perfsonar_warn.log
+
+# Group=Warn message logging
+# Description=The class responsible for the logging layout.
log4j.appender.warnAppender.layout=org.apache.log4j.PatternLayout
+
+# Group=Warn message logging
+# Description=The log message format.
log4j.appender.warnAppender.layout.ConversionPattern=%d %5p - %m%n
+
+# Group=Warn message logging
+# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
log4j.appender.warnAppender.MaxFileSize=500KB
+
+# Group=Warn message logging
+# Description=The class responsible for appending log messages the log file.
log4j.appender.warnAppender=org.apache.log4j.RollingFileAppender

-#ERROR
+
+
+######################################### ERROR
#######################################
+
+# Group=Error message logging
+# Description=The maximum number of backup log files to create.
log4j.appender.errorAppender.MaxBackupIndex=11
+
+# Group=Error message logging
+# Description=The path to the log file, including the log file's name.
log4j.appender.errorAppender.File=_LOGPATH_/perfsonar_error.log
+
+# Group=Error message logging
+# Description=The class responsible for the logging layout.
log4j.appender.errorAppender.layout=org.apache.log4j.PatternLayout
+
+# Group=Error message logging
+# Description=The log message format.
log4j.appender.errorAppender.layout.ConversionPattern=%d %5p - %m%n
+
+# Group=Error message logging
+# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
log4j.appender.errorAppender.MaxFileSize=500KB
+
+# Group=Error message logging
+# Description=The class responsible for appending log messages the log file.
log4j.appender.errorAppender=org.apache.log4j.RollingFileAppender

-#FATAL
+
+
+######################################### FATAL
#######################################
+
+# Group=Fatal message logging
+# Description=The maximum number of backup log files to create.
log4j.appender.fatalAppender.MaxBackupIndex=11
+
+# Group=Fatal message logging
+# Description=The path to the log file, including the log file's name.
log4j.appender.fatalAppender.File=_LOGPATH_/perfsonar_fatal.log
+
+# Group=Fatal message logging
+# Description=The class responsible for the logging layout.
log4j.appender.fatalAppender.layout=org.apache.log4j.PatternLayout
+
+# Group=Fatal message logging
+# Description=The log message format.
log4j.appender.fatalAppender.layout.ConversionPattern=%d %5p - %m%n
+
+# Group=Fatal message logging
+# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
log4j.appender.fatalAppender.MaxFileSize=500KB
+
+# Group=Fatal message logging
+# Description=The class responsible for appending log messages the log file.
log4j.appender.fatalAppender=org.apache.log4j.RollingFileAppender

-#ALL
+
+
+######################################### ALL
#########################################
+
+# Group=All message logging
+# Description=The maximum number of backup log files to create.
log4j.appender.psRootAppender.MaxBackupIndex=11
+
+# Group=All message logging
+# Description=The path to the log file, including the log file's name.
log4j.appender.psRootAppender.File=_LOGPATH_/perfsonar.log
+
+# Group=All message logging
+# Description=The class responsible for the logging layout.
log4j.appender.psRootAppender.layout=org.apache.log4j.PatternLayout
+
+# Group=All message logging
+# Description=The log message format.
log4j.appender.psRootAppender.layout.ConversionPattern=%d %5p - %m%n
-log4j.appender.psRootAppender=org.apache.log4j.RollingFileAppender
+
+# Group=All message logging
+# Description=The maximum size the log file can reach before it replaces the
oldest backup file and a new log file is started.
log4j.appender.psRootAppender.MaxFileSize=500KB

+# Group=All message logging
+# Description=The class responsible for appending log messages the log file.
+log4j.appender.psRootAppender=org.apache.log4j.RollingFileAppender

-#ROOT
+
+
+######################################### ROOT
#########################################
+
+# this section is only for developer's tests
+
+# ROOT
#log4j.appender.rootAppender.MaxBackupIndex=11
#log4j.appender.rootAppender.File=_LOGPATH_/perfsonar_root.log
#log4j.appender.rootAppender.layout=org.apache.log4j.PatternLayout
#log4j.appender.rootAppender.layout.ConversionPattern=%d %5p - %m%n
#log4j.rootLogger=DEBUG, rootAppender
#log4j.appender.rootAppender.MaxFileSize=500KB
-#log4j.appender.rootAppender=org.apache.log4j.RollingFileAppender
+#log4j.appender.rootAppender=org.apache.log4j.RollingFileAppender
\ No newline at end of file

Modified: trunk/rnp_java-cl-mp/conf/service.properties.template
===================================================================
--- trunk/rnp_java-cl-mp/conf/service.properties.template 2008-03-14
16:04:53 UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/conf/service.properties.template 2008-03-17
20:01:57 UTC (rev 3524)
@@ -3,7 +3,7 @@
service.mp.message_types=MeasurementRequest,EchoRequest

service.mp.class_name=org.perfsonar.service.measurementPoint.commandLine.CommandLineMPServiceEngine

-component.registrator.interval=30000
+component.registrator.interval=86400000
component.registrator.scheduler_component=scheduler

component.mp.scheduler_component=scheduler
@@ -15,3 +15,4 @@
service.clmp.rp.maxthreads.traceroute=99999
service.clmp.rp.maxthreads.ping=99999

+service.as.point=http://homer.rediris.es:8080/perfSONAR-AS/services/AuthService

\ No newline at end of file

Modified: trunk/rnp_java-cl-mp/conf/service.properties.template-2
===================================================================
--- trunk/rnp_java-cl-mp/conf/service.properties.template-2 2008-03-14
16:04:53 UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/conf/service.properties.template-2 2008-03-17
20:01:57 UTC (rev 3524)
@@ -3,22 +3,24 @@
service.mp.message_types=MeasurementRequest,EchoRequest

service.mp.class_name=org.perfsonar.service.measurementPoint.commandLine.CommandLineMPServiceEngine

-component.registrator.interval=30000
+component.registrator.interval=86400000
component.registrator.scheduler_component=scheduler

component.mp.scheduler_component=scheduler

service.clmp.default_ma=local
+service.clmp.cron_dir=/home/perfsonar/webapps/perfSONAR-CLMP/WEB-INF/classes/perfsonar/cron
+service.clmp.cron.local_storage_dir=/home/perfsonar/webapps/perfSONAR-CLMP/WEB-INF/classes/perfsonar/cron

service.clmp.rp.maxthreads.owping=99999
service.clmp.rp.maxthreads.bwctl=99999
service.clmp.rp.maxthreads.traceroute=99999
service.clmp.rp.maxthreads.ping=99999

-service.clmp.default_ma=local
-
service.r.organization_name=default_organization
service.r.service_description=perfSONAR Command Line MP 2.0 Service
service.r.service_name=perfSONAR-CLMP
service.r.service_version=2.0
-service.r.contact_email=default@email
\ No newline at end of file
+service.r.contact_email=default@email
+
+service.as.point=http://homer.rediris.es:8080/perfSONAR-AS/services/AuthService

\ No newline at end of file

Modified: trunk/rnp_java-cl-mp/doc/CLMP Interface Specification.doc
===================================================================
(Binary files differ)

Modified: trunk/rnp_java-cl-mp/doc/Changelog.txt
===================================================================
--- trunk/rnp_java-cl-mp/doc/Changelog.txt 2008-03-14 16:04:53 UTC (rev
3523)
+++ trunk/rnp_java-cl-mp/doc/Changelog.txt 2008-03-17 20:01:57 UTC (rev
3524)
@@ -2,4 +2,6 @@
- New: Inter-Service communication with SQL-MA to store scheduled
measurement results.
- Change: Improved Internal Resource Protector, better implementation using
Java Semaphores.
- Change: EventType to Tools Classes mapping via structured xml file
instead of hardcoded.
-- Change: Smarter definition for tools exec timeouts, specially BWCTL.
\ No newline at end of file
+- Change: Smarter definition for tools exec timeouts, specially BWCTL.
+- Change: Old simple eventTypes no longer supported (i.e. bwctl), fully
qualified eventTypes must now be used (i.e.
http://ggf.org/ns/nmwg/tools/bwctl/2.0)
+- Bug fix: When a ping request is made with packets of size smaller than 8
bytes, the ping command-line tool doesn't gives the RTT value. CL-MP will now
have datums without the value and valueUnits attributes for this case.
\ No newline at end of file

Modified: trunk/rnp_java-cl-mp/doc/schema/bwctlRequest.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/bwctlRequest.rnc 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/bwctlRequest.rnc 2008-03-17 20:01:57
UTC (rev 3524)
@@ -59,7 +59,7 @@
attribute port { xsd:int }?

EventType =
- element nmwg:eventType { "bwctl" }
+ element nmwg:eventType { "http://ggf.org/ns/nmwg/tools/bwctl/2.0"; }

BwctlParameters =
element bwctl:parameters {

Modified: trunk/rnp_java-cl-mp/doc/schema/bwctlResponse.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/bwctlResponse.rnc 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/bwctlResponse.rnc 2008-03-17 20:01:57
UTC (rev 3524)
@@ -55,7 +55,7 @@
attribute port { xsd:int }?

EventType =
- element nmwg:eventType { "bwctl" }
+ element nmwg:eventType { "http://ggf.org/ns/nmwg/tools/bwctl/2.0"; }

BwctlParameters =
element bwctlres:parameters {

Modified: trunk/rnp_java-cl-mp/doc/schema/owampRequest.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/owampRequest.rnc 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/owampRequest.rnc 2008-03-17 20:01:57
UTC (rev 3524)
@@ -54,7 +54,7 @@
attribute type { xsd:string }

EventType =
- element nmwg:eventType { "owamp" }
+ element nmwg:eventType { "http://ggf.org/ns/nmwg/tools/owamp/2.0"; }

OwampParameters =
element owamp:parameters {

Modified: trunk/rnp_java-cl-mp/doc/schema/owampResponse.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/owampResponse.rnc 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/owampResponse.rnc 2008-03-17 20:01:57
UTC (rev 3524)
@@ -53,7 +53,7 @@
attribute type { xsd:string }

EventType =
- element nmwg:eventType { "owamp" }
+ element nmwg:eventType { "http://ggf.org/ns/nmwg/tools/owamp/2.0"; }

OwampParameters =
element owamp:parameters {

Modified: trunk/rnp_java-cl-mp/doc/schema/pingRequest.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/pingRequest.rnc 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/pingRequest.rnc 2008-03-17 20:01:57
UTC (rev 3524)
@@ -54,12 +54,12 @@
attribute type { xsd:string }

EventType =
- element nmwg:eventType { "ping" }
+ element nmwg:eventType { "http://ggf.org/ns/nmwg/tools/ping/2.0"; }

PingParameters =
element ping:parameters {
Identifier &
- PingParameter+
+ PingParameter*
}

PingParameter =

Modified: trunk/rnp_java-cl-mp/doc/schema/pingResponse.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/pingResponse.rnc 2008-03-14 16:04:53
UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/pingResponse.rnc 2008-03-17 20:01:57
UTC (rev 3524)
@@ -53,12 +53,12 @@
attribute type { xsd:string }

EventType =
- element nmwg:eventType { "ping" }
+ element nmwg:eventType { "http://ggf.org/ns/nmwg/tools/ping/2.0"; }

PingParameters =
element ping:parameters {
Identifier &
- PingParameter+
+ PingParameter*
}

PingParameter =
@@ -83,12 +83,14 @@

PingDatum =
element ping:datum {
- attribute value { xsd:float } &
- attribute valueUnits { xsd:string } &
+ (
+ attribute value { xsd:float } &
+ attribute valueUnits { xsd:string }
+ )? &
attribute numBytes { xsd:int } &
attribute numBytesUnits { xsd:string } &
attribute seqNum { xsd:int } &
attribute ttl { xsd:int } &
attribute timeType { xsd:string } &
- attribute timeValue { xsd:string }
+ attribute timeValue { xsd:string }
}
\ No newline at end of file

Modified: trunk/rnp_java-cl-mp/doc/schema/tracerouteRequest.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/tracerouteRequest.rnc 2008-03-14
16:04:53 UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/tracerouteRequest.rnc 2008-03-17
20:01:57 UTC (rev 3524)
@@ -54,7 +54,7 @@
attribute type { xsd:string }

EventType =
- element nmwg:eventType { "traceroute" }
+ element nmwg:eventType {
"http://ggf.org/ns/nmwg/tools/traceroute/2.0"; }

TracerouteParameters =
element traceroute:parameters {

Modified: trunk/rnp_java-cl-mp/doc/schema/tracerouteResponse.rnc
===================================================================
--- trunk/rnp_java-cl-mp/doc/schema/tracerouteResponse.rnc 2008-03-14
16:04:53 UTC (rev 3523)
+++ trunk/rnp_java-cl-mp/doc/schema/tracerouteResponse.rnc 2008-03-17
20:01:57 UTC (rev 3524)
@@ -52,7 +52,7 @@
attribute type { xsd:string }

EventType =
- element nmwg:eventType { "traceroute" }
+ element nmwg:eventType {
"http://ggf.org/ns/nmwg/tools/traceroute/2.0"; }

TracerouteParameters =
element traceroute:parameters {

Deleted: trunk/rnp_java-cl-mp/lib/misc/perfsonar-base-ant-1.0.20080204.jar

Added: trunk/rnp_java-cl-mp/lib/misc/perfsonar-base-ant-1.0.20080303.jar


Property changes on:
trunk/rnp_java-cl-mp/lib/misc/perfsonar-base-ant-1.0.20080303.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
2008-03-14 16:04:53 UTC (rev 3523)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineCronComponent.java
2008-03-17 20:01:57 UTC (rev 3524)
@@ -223,8 +223,10 @@
}

String tool = metadata.getEventType().getEventType();
- if(tool.startsWith("http://";))
- tool =
tool.substring(29).substring(0,tool.indexOf('/'));
+ if(tool.startsWith("http://";)){
+ tool = tool.substring(29); //remove
http://ggf.org/ns/nmwg/tools/
+ tool = tool.substring(0,tool.indexOf('/'));
+ }
String filename = tool + "_"
+ metadata.getId() + ".xml";


Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
2008-03-14 16:04:53 UTC (rev 3523)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
2008-03-17 20:01:57 UTC (rev 3524)
@@ -27,6 +27,12 @@
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.base.util.XMLUtils;
+import org.perfsonar.service.base.authn.AADispatchManager;
+import org.perfsonar.service.base.authn.AADispatchProtocolFactory;
+import org.perfsonar.service.base.authn.AuthNRequest;
+import org.perfsonar.service.base.authn.AuthNResponse;
+import org.perfsonar.service.base.authn.tokens.SecTokenManagerFactory;
+import org.perfsonar.service.base.authn.tokens.SecurityToken;
import org.w3c.dom.Document;

/**
@@ -40,6 +46,7 @@
static private final String toolsMapFileProperty =
"service.clmp.tools_map";
static protected LoggerComponent logger = null;
static private Hashtable<String,String> m2c = null;
+ static private Hashtable<String,String> m2a = null;

public static CommandLineToolBundle getCommandLineToolBundle(EventType
eventType)
throws PerfSONARException{
@@ -82,7 +89,7 @@

Document dom = XMLUtils.convertXMLFileToDom(toolsMapFile);
toolsDef = XMLUtils.getNodeElementsFromDom(dom, "eventType",
- Arrays.asList(new String[]{ "name",
"class"}));
+ Arrays.asList(new String[]{ "name", "class",
"authentication" }));

}catch(PerfSONARException e){
logger.error("CommandLineToolBundleFactory: Could not create
tools hashtable. "
@@ -94,9 +101,11 @@
}

m2c = new Hashtable<String,String>();
+ m2a = new Hashtable<String,String>();

for(Map<String,String> toolDef : toolsDef){
m2c.put(toolDef.get("name").toUpperCase(),
toolDef.get("class"));
+ m2a.put(toolDef.get("name").toUpperCase(),
toolDef.get("authentication"));
}
/*
* XXX: Probably need a plug-in's directory and config info for
@@ -121,7 +130,6 @@
String eventString = eventType.getEventType();
String className = (String) m2c.get(eventString.toUpperCase());

-
if (className == null)
throw new PerfSONARException("error.mp.clmp.unsupported_tool",
"The requested tool isn't currently supported by the CL-MP. "
+
@@ -132,8 +140,33 @@

logger.debug("CommandLineToolBundleFactory: classname asked for is "
+ className);
+
+ //TODO: Find a better way to know if the measurement is being done
by the Scheduler component.
+
if(!Thread.currentThread().getStackTrace()[4].toString().contains("CronComponent")){
+ // Check if tool needs authentication
+ String authentication = (String)
m2a.get(eventString.toUpperCase());

-
+ if(authentication != null &&
authentication.equalsIgnoreCase("yes")){
+ SecurityToken st=new
SecurityToken(SecTokenManagerFactory.getDefaultSecTokenManager());
+ if (!st.hasSecTokenInRequest()) {
+ throw new
PerfSONARException("error.authn.not_sectoken",
+ "This tool requires
authentication. Please provide a security " +
+ "token in the SOAP envelope of your
request.");
+ }
+ st.setSecTokenFromRequest();
+
+ AuthNRequest authnReq=new AuthNRequest(st);
+
+ AADispatchManager aadm=new
AADispatchManager(AADispatchProtocolFactory.getDefaultAADispatchProtocol());
+ AuthNResponse
authnRes=aadm.getAuthentication(authnReq);
+
+ if
(authnRes.getStatus()!=AuthNResponse.AUTHENTICATED) {
+ throw new
PerfSONARException(authnRes.getResultCode(),
+ "This tool requires
authentication and the authentication " +
+ "failed for your request.");
+ }
+ }
+ }
// try to create a tool for the given event type.
CommandLineToolBundle tool = null;
try {

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java
2008-03-14 16:04:53 UTC (rev 3523)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java
2008-03-17 20:01:57 UTC (rev 3524)
@@ -239,7 +239,7 @@
}

private Datum[] parseResults(CommandLineExec cle) throws
PerfSONARException{
- String datumRegex = "([0-9]*)
([a-zA-Z]*)[^=]*=([0-9]*)[^=]*=([0-9]*)[^=]*=([0-9\\.]*) ([a-zA-Z]*)";
+ String datumRegex = "([0-9]*)
([a-zA-Z]*)[^=]*=([0-9]*)[^=]*=([0-9]*)[^=]*(?:=([0-9\\.]*) ([a-zA-Z]*))?";
Pattern datumPattern = Pattern.compile(datumRegex);

String seqNum;
@@ -290,8 +290,10 @@
datum.setNumBytesUnits(numBytesUnits);
datum.setSeqNum(seqNum);
datum.setTTL(ttl);
- datum.setValue(value);
- datum.setValueUnits(valueUnits);
+ if(value != null){
+ datum.setValue(value);
+ datum.setValueUnits(valueUnits);
+ }
datum.setTimeType("unix");

datum.setTimeValue(String.valueOf(System.currentTimeMillis()));
datumList.add(datum);

Modified:
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
===================================================================
---
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
2008-03-14 16:04:53 UTC (rev 3523)
+++
trunk/rnp_java-cl-mp/src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
2008-03-17 20:01:57 UTC (rev 3524)
@@ -142,8 +142,7 @@
// TODO: Check config for cmd name
cmd.add("traceroute");
cmd.add("-n");
-
- // Check for src addr
+
cmd = cl.checkParameters(cmd, params, toolOptions);
// Check for dst addr
if(dst == null){
@@ -290,6 +289,9 @@
}

while( (line = br.readLine()) != null){
+ if(line.startsWith("traceroute to"))
+ continue;
+
matcher = datumPattern.matcher(line);

if (matcher.matches()) {



  • perfsonar: r3524 - in trunk/rnp_java-cl-mp: ant conf doc doc/schema lib/misc src/main/java/org/perfsonar/service/measurementPoint/commandLine src/main/java/org/perfsonar/service/measurementPoint/commandLine/tools, svnlog, 03/17/2008

Archive powered by MHonArc 2.6.16.

Top of Page