Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2186 - in branches/CL-MP-STABLE/perfsonar: ant ant/clmp doc/mp/cliTypeMP schema/example-instances/perfSONAR src/org/perfsonar/commons/messages src/org/perfsonar/service/measurementPoint/commandLine src/org/perfsonar/service/measurementPoint/commandLine/tools

Subject: perfsonar development work

List archive

perfsonar: r2186 - in branches/CL-MP-STABLE/perfsonar: ant ant/clmp doc/mp/cliTypeMP schema/example-instances/perfSONAR src/org/perfsonar/commons/messages src/org/perfsonar/service/measurementPoint/commandLine src/org/perfsonar/service/measurementPoint/commandLine/tools


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2186 - in branches/CL-MP-STABLE/perfsonar: ant ant/clmp doc/mp/cliTypeMP schema/example-instances/perfSONAR src/org/perfsonar/commons/messages src/org/perfsonar/service/measurementPoint/commandLine src/org/perfsonar/service/measurementPoint/commandLine/tools
  • Date: Mon, 5 Mar 2007 13:11:00 -0500

Author: fernandes
Date: 2007-03-05 13:10:58 -0500 (Mon, 05 Mar 2007)
New Revision: 2186

Added:
branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Functional
Specification.doc
branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Interface
Specification.doc
Removed:
branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Functional
Specification 1.0.doc
branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Interface
Specification 1.4.doc
Modified:
branches/CL-MP-STABLE/perfsonar/ant/clmp/clmp-configure-targets.xml
branches/CL-MP-STABLE/perfsonar/ant/configure-targets.xml
branches/CL-MP-STABLE/perfsonar/ant/pre-install-targets.xml

branches/CL-MP-STABLE/perfsonar/schema/example-instances/perfSONAR/Echo-Req.xml

branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java

branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java

branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java

branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
Log:
Ant modifications for AdminService bug and some tools bug fixes


Modified: branches/CL-MP-STABLE/perfsonar/ant/clmp/clmp-configure-targets.xml
===================================================================
--- branches/CL-MP-STABLE/perfsonar/ant/clmp/clmp-configure-targets.xml
2007-03-05 15:14:45 UTC (rev 2185)
+++ branches/CL-MP-STABLE/perfsonar/ant/clmp/clmp-configure-targets.xml
2007-03-05 18:10:58 UTC (rev 2186)
@@ -53,7 +53,6 @@
comment="This file was created by the Ant
configuration script.">

<entry key="service.r.type" value="mp"/>
- <entry key="service.r.access_point"
value="http://${target.server}:${target.port}/${deploy.root}/services/${webservice.name}"/>
<entry key="service.r.service_name" value="Command Line
Measurement Point"/>
<entry key="service.r.service_type" value="CL MP"/>
<entry key="service.r.service_description" value="Command Line
MP, perfSONAR project"/>

Modified: branches/CL-MP-STABLE/perfsonar/ant/configure-targets.xml
===================================================================
--- branches/CL-MP-STABLE/perfsonar/ant/configure-targets.xml 2007-03-05
15:14:45 UTC (rev 2185)
+++ branches/CL-MP-STABLE/perfsonar/ant/configure-targets.xml 2007-03-05
18:10:58 UTC (rev 2186)
@@ -72,6 +72,9 @@
addproperty="functionality.register.interval"
defaultvalue="30000"/>

+ <input message="Enter IP or DNS address of the host you are using now
to deploy the service []:"
+ addproperty="functionality.register.access_point"/>
+
<input message="Enter the descirption of service that will be send
to the LS [perfSONAR service]:"
addproperty="functionality.register.description"
defaultvalue="perfSONAR service"/>
@@ -79,7 +82,7 @@
<propertyfile file="conf/service.properties"
comment="This file was created by the Ant configuration script.">

- <entry key="service.r.access_point"
value="http://${target.server}:${target.port}/${deploy.root}/services/${webservice.name}"/>
+ <entry key="service.r.access_point"
value="http://${functionality.register.access_point}:${target.port}/${deploy.root}/services/${webservice.name}"/>
<entry key="service.r.service_description"
value="${functionality.register.description}"/>
<entry key="service.r.ls_url"
value="${functionality.register.ls_address}"/>
<entry key="component.registrator.interval"
value="${functionality.register.interval}"/>

Modified: branches/CL-MP-STABLE/perfsonar/ant/pre-install-targets.xml
===================================================================
--- branches/CL-MP-STABLE/perfsonar/ant/pre-install-targets.xml 2007-03-05
15:14:45 UTC (rev 2185)
+++ branches/CL-MP-STABLE/perfsonar/ant/pre-install-targets.xml 2007-03-05
18:10:58 UTC (rev 2186)
@@ -251,7 +251,7 @@

<!-- getting the server address -->

-
+<!--
<target name="get-server-address">

<input message="Enter the address (ip or hostname) of your
application server Tomcat [localhost]:"
@@ -267,8 +267,20 @@
</propertyfile>

</target>
+-->

+ <target name="get-server-address">

+ <propertyfile file="ant/const.properties"
+ comment="This file was created by the Ant configuration script.">
+
+ <entry key="target.server" value="127.0.0.1"/>
+
+ </propertyfile>
+
+ </target>
+
+
<!-- getting the server port -->



Deleted: branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Functional
Specification 1.0.doc

Added: branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Functional
Specification.doc


Property changes on: branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP
Functional Specification.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Deleted: branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Interface
Specification 1.4.doc

Added: branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP Interface
Specification.doc


Property changes on: branches/CL-MP-STABLE/perfsonar/doc/mp/cliTypeMP/CLMP
Interface Specification.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Modified:
branches/CL-MP-STABLE/perfsonar/schema/example-instances/perfSONAR/Echo-Req.xml
===================================================================
---
branches/CL-MP-STABLE/perfsonar/schema/example-instances/perfSONAR/Echo-Req.xml
2007-03-05 15:14:45 UTC (rev 2185)
+++
branches/CL-MP-STABLE/perfsonar/schema/example-instances/perfSONAR/Echo-Req.xml
2007-03-05 18:10:58 UTC (rev 2186)
@@ -7,7 +7,7 @@


<nmwg:metadata id="meta">
- <nmwg:eventType>echo</nmwg:eventType>
+
<nmwg:eventType>http://schemas.perfsonar.net/tools/admin/echo/2.0</nmwg:eventType>
</nmwg:metadata>

<nmwg:data id="data" metadataIdRef="meta"/>

Modified:
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
===================================================================
---
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
2007-03-05 15:14:45 UTC (rev 2185)
+++
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
2007-03-05 18:10:58 UTC (rev 2186)
@@ -32,6 +32,14 @@



+ // ---------------------------------- fields
+
+
+
+ public static final String ECHO_NAMESPACE =
"http://schemas.perfsonar.net/tools/admin/echo/2.0";;
+
+
+
// ---------------------------------- constructors


@@ -121,7 +129,7 @@

Message response = null;

- if (eventType.getEventType().equals("echo")) {
+ if (eventType.getEventType().equals(ECHO_NAMESPACE)) {
response = executeSimpleEcho();
} else if (eventType.getEventType().equals("")) {
response = getEmptyEventTypeResponse();

Modified:
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java
===================================================================
---
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java
2007-03-05 15:14:45 UTC (rev 2185)
+++
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java
2007-03-05 18:10:58 UTC (rev 2186)
@@ -255,7 +255,7 @@

public void waitFor(
int timeout
- )
+ ) throws SystemException
{
long curr_time = System.currentTimeMillis();
long end_time = curr_time + timeout;
@@ -296,7 +296,7 @@
err.interrupt();
}

- return;
+ throw new SystemException("error.mp.clmp.exec", "The request timed
out (configured timeout: "+timeout+"ms).");
}

public void run_synchronous(

Modified:
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java
===================================================================
---
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java
2007-03-05 15:14:45 UTC (rev 2185)
+++
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java
2007-03-05 18:10:58 UTC (rev 2186)
@@ -16,28 +16,31 @@
*/
package org.perfsonar.service.measurementPoint.commandLine.tools;

+import java.io.FileReader;
import java.io.BufferedReader;
-import java.io.File;
+import java.io.InputStreamReader;
import java.io.FileInputStream;
-import java.io.FileReader;
import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
+
import java.util.Hashtable;
+import java.util.ArrayList;
+
import java.util.regex.Matcher;
import java.util.regex.Pattern;

-import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.tools.bwctl.v2_0.Datum;
+
+import org.perfsonar.service.commons.exceptions.RequestException;
+import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
+import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.measurementPoint.commandLine.CommandLineExec;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineResourceProtector;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineToolBundle;
@@ -132,40 +135,15 @@

org.ggf.ns.nmwg.tools.bwctl.v2_0.Subject sub =
(org.ggf.ns.nmwg.tools.bwctl.v2_0.Subject) subject.getSubject();
-
- if (sub == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The request message metadata must have a subject
element with " +
- "an endPointPair element. The endPointPair element must
have at" +
- " least a dst element."
- );
- }
-
org.ggf.ns.nmwg.topology.v2_0.EndPointPair end =
sub.getEndPointPair();
-
- if (end == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The request message must have an endPointPair element
inside " +
- "the subject element of its metadata. The endPointPair
element" +
- " must have at least a dst element."
- );
- }
-
org.ggf.ns.nmwg.topology.v2_0.Dst dst = end.getDestinationElement();
org.ggf.ns.nmwg.topology.v2_0.Src src = end.getSourceElement();

//String tmpFolder = System.getProperty("java.io.tmpdir");

- Parameters params = subject.getParameters();
+ Parameters params = subject.getParameters();
Parameter p = null;

- if (params == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The request message metadata must have a parameters
element. If " +
- "no parameters are wanted, an empty parameters element
must exist."
- );
- }
-
/*
* Build cmd array
*/
@@ -199,10 +177,7 @@

// Check for dst addr
if(dst == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The endPointPair element must have at least a
dst element. " +
- "The dst element informs the destination IP
address."
- );
+ //TODO: throw request exception
}
else{
if (dst.getPort().length() > 0) {
@@ -321,7 +296,7 @@
return respMess;
}

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

@@ -367,11 +342,8 @@
datumList[0] = new ArrayList();
datumList[1] = new ArrayList();

- File os = cle.getOsFile();
- File es = cle.getEsFile();
-
try{
- FileInputStream fis = new FileInputStream(os);
+ FileInputStream fis = new FileInputStream(cle.getOsFile());
InputStreamReader isr = new InputStreamReader(fis);
BufferedReader br = new BufferedReader(isr);

@@ -381,16 +353,6 @@
Matcher matcher = null;
int idxDatumList;

- if (cle.getOsFile().length() < 2){
- logger.debug(
- CNAME + ": Got empty out response for the
request. Check the error file "+ es.getName()
- );
- throw new
SystemException("error.mp.clmp.system.tool_response",
- "The tool returned no response data. This might
be caused by a wrong parameter syntax " +
- "or this tool might not be available at the
server."
- );
- }
-
while( (line = br.readLine()) != null){
System.out.println(line);
if (line.endsWith("bw")) {
@@ -504,52 +466,30 @@
}
}
} catch (IOException e) {
- logger.debug(
- CNAME + ": IOException
ocurred while processing response. " +
- "Related files: "+ os.getName() + "
and "+ es.getName()
- );
+ logger.fatal(
+ CNAME + " IOException when parsing bwctl
results: "+e.getMessage();
+ );
throw new
SystemException("error.mp.clmp.system.ioexception.bwctl",
"An error ocurred while trying to parse
the results of the request. Please try again. " +
"If this problem persists, contact the
service administrator."
);
- }
-
- try {
- File tmp = new File(line);
- if (tmp != null){
- tmp.delete();
- }
- }catch(Exception e){
-
- }
+ }
+
}
}
br.close();
- isr.close();
- fis.close();
}
catch(IOException ioe)
{
- logger.debug(
- CNAME + ": IOException ocurred while
processing response. " +
- "Related files: "+ os.getName() + " and "+
es.getName()
- );
+ logger.fatal(
+ CNAME + " IOException when parsing bwctl results:
"+e.getMessage();
+ );
throw new
SystemException("error.mp.clmp.system.ioexception.bwctl",
"An error ocurred while trying to parse the results of
the request. Please try again. " +
"If this problem persists, contact the service
administrator."
);
}

- try {
-
- if (os != null)
- os.delete();
- if (es != null)
- es.delete();
- }catch(Exception e){
-
- }
-
Datum[][] datums = new Datum[datumList.length][];

datums[0] = new Datum[datumList[0].size()];
@@ -581,9 +521,12 @@
toolOptions.put("dynamicWindowSize","-W:");
toolOptions.put("concurrentConnections","-P:");
toolOptions.put("tos","-S:");
- toolOptions.put("unsynchronized","-a:novalue");
toolOptions.put("bandwidth","-b:");
toolOptions.put("duration","-t:");
+ toolOptions.put("sessionInterval","-I:");
+ toolOptions.put("testNumber","-n:");
+ toolOptions.put("randomize","-R:");
+ toolOptions.put("latestDelay","-L:");

}
}

Modified:
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
===================================================================
---
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
2007-03-05 15:14:45 UTC (rev 2185)
+++
branches/CL-MP-STABLE/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
2007-03-05 18:10:58 UTC (rev 2186)
@@ -17,7 +17,6 @@
package org.perfsonar.service.measurementPoint.commandLine.tools;

import java.io.BufferedReader;
-import java.io.File;
import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.IOException;
@@ -98,38 +97,13 @@

org.ggf.ns.nmwg.tools.owamp.v2_0.Subject sub =
(org.ggf.ns.nmwg.tools.owamp.v2_0.Subject) mdArr[0].getSubject();
-
- if (sub == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The request message metadata must have a subject
element with " +
- "an endPointPair element. The endPointPair element must
have at" +
- " least a dst element."
- );
- }
-
org.ggf.ns.nmwg.topology.v2_0.EndPointPair end =
sub.getEndPointPair();
-
- if (end == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The request message must have an endPointPair element
inside " +
- "the subject element of its metadata. The endPointPair
element" +
- " must have at least a dst element."
- );
- }
-
org.ggf.ns.nmwg.topology.v2_0.Dst dst = end.getDestinationElement();
org.ggf.ns.nmwg.topology.v2_0.Src src = end.getSourceElement();

Parameters params = mdArr[0].getParameters();
Parameter p = null;

- if (params == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The request message metadata must have a parameters
element. If " +
- "no parameters are wanted, an empty parameters element
must exist."
- );
- }
-
/*
* Build cmd array
*/
@@ -151,11 +125,10 @@
else if
(p.getParameterValue().toLowerCase().equals("to")) {
cmd.add("-t");
} else
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "Parameter direction must be 'from' or
'to'."
- );
+ //throw exception
+ ;
} else {
- cmd.add("-t");
+ //default both directions test
}
}

@@ -163,10 +136,7 @@

// Check for dst addr
if(dst == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
- "The endPointPair element must have at least a
dst element. " +
- "The dst element informs the destination IP
address."
- );
+ //TODO: throw request exception
}
else{
cmd.add(dst.getValue());
@@ -240,7 +210,7 @@
return respMess;
}

- private Datum[] parseResults(CommandLineExec cle) throws SystemException{
+ private Datum[] parseResults(CommandLineExec cle) {
//0 14401306382784727093 1 2.15625 14401306380491903908 1 0.0544434
255
String datumRegex = "([0-9]*) ([0-9]*) ([0-9]) ([0-9\\.[Ee]\\-?]*)
([0-9]*) ([0-9]) ([0-9\\.[Ee]\\-?]*) ([0-9]*)";
Pattern datumPattern = Pattern.compile(datumRegex);
@@ -256,11 +226,8 @@

ArrayList datumList = new ArrayList();

- File os = cle.getOsFile();
- File es = cle.getEsFile();
-
try{
- FileInputStream fis = new FileInputStream(os);
+ FileInputStream fis = new FileInputStream(cle.getOsFile());
InputStreamReader isr = new InputStreamReader(fis);
BufferedReader br = new BufferedReader(isr);

@@ -268,17 +235,6 @@

String line = null;
Matcher matcher = null;
-
- if (cle.getOsFile().length() < 2){
- logger.debug(
- CNAME + ": Got empty out response for the
request. Check the error file "+ es.getName()
- );
- throw new
SystemException("error.mp.clmp.system.tool_response",
- "The tool returned no response data. This might
be caused by a wrong parameter syntax " +
- "or this tool might not be available at the
server."
- );
- }
-
while( (line = br.readLine()) != null){
matcher = datumPattern.matcher(line);
System.out.println(line);
@@ -308,30 +264,12 @@
}
}
br.close();
- isr.close();
- fis.close();
}
catch(IOException ioe)
{
- logger.debug(
- CNAME + ": IOException ocurred while
processing response. " +
- "Related files: "+ os.getName() + " and "+
es.getName()
- );
- throw new
SystemException("error.mp.clmp.system.ioexception.owamp",
- "An error ocurred while trying to parse the results of
the request. Please try again. " +
- "If this problem persists, contact the service
administrator."
- );
+ //Define how to handle this Exceptions
}

- try {
-
- if (os != null)
- os.delete();
- if (es != null)
- es.delete();
- }catch(Exception e){
- }
-
Datum[] datums = new Datum[datumList.size()];
datumList.toArray(datums);

@@ -356,7 +294,8 @@
toolOptions.put("phb","-H:");
toolOptions.put("wait","-i:");
toolOptions.put("timeOut","-L:");
- toolOptions.put("padding","-s:");
+ toolOptions.put("padding","-s:");
+ toolOptions.put("delayStart","-z:");
toolOptions.put("portRange","-P:");
}
}



  • perfsonar: r2186 - in branches/CL-MP-STABLE/perfsonar: ant ant/clmp doc/mp/cliTypeMP schema/example-instances/perfSONAR src/org/perfsonar/commons/messages src/org/perfsonar/service/measurementPoint/commandLine src/org/perfsonar/service/measurementPoint/commandLine/tools, svnlog, 03/05/2007

Archive powered by MHonArc 2.6.16.

Top of Page