Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2178 - in branches/SSHTelnet-MP-STABLE: conf/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters

Subject: perfsonar development work

List archive

perfsonar: r2178 - in branches/SSHTelnet-MP-STABLE: conf/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2178 - in branches/SSHTelnet-MP-STABLE: conf/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters
  • Date: Fri, 2 Mar 2007 10:06:41 -0500

Author: stijn
Date: 2007-03-02 10:06:40 -0500 (Fri, 02 Mar 2007)
New Revision: 2178

Modified:

branches/SSHTelnet-MP-STABLE/conf/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.class

branches/SSHTelnet-MP-STABLE/src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java
Log:
Code-cleanup for the configuration script

Modified:
branches/SSHTelnet-MP-STABLE/conf/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.class
===================================================================
(Binary files differ)

Modified:
branches/SSHTelnet-MP-STABLE/src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java
===================================================================
---
branches/SSHTelnet-MP-STABLE/src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java
2007-03-02 14:47:29 UTC (rev 2177)
+++
branches/SSHTelnet-MP-STABLE/src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters/ServicePropertiesConfigurator.java
2007-03-02 15:06:40 UTC (rev 2178)
@@ -21,10 +21,19 @@
BufferedReader br = new BufferedReader(new
InputStreamReader(
System.in));
List devices = new ArrayList();
+
+ String previousDevices = new String(); // de devices
die in de opgegeven service.properties zaten
+
List types = new ArrayList();
List commands = new ArrayList();
+
+ List previousCommands = new ArrayList(); // lijst van
de commands per device die in de opgegeven
+ // service.properties zaten (ook in String formaat)
+
List allCommands = new ArrayList();

+
+
//
out.write("service.ls.registration_file="+propertiesfilename+"XML.xml\n");
out.write("service.ls.registration_file=\n");

@@ -58,15 +67,24 @@
String line = "";
line = previousIn.readLine();
while (line != null) {
-
- System.out.println(line);
- out.write(line + "\n");
+ if ((line.startsWith("service.mp")
+ &&
!line.startsWith("service.mp.message_types")
+ &&
!line.startsWith("service.mp.class_name"))
+ ||
line.startsWith("service.r.mp")){
+
if(line.startsWith("service.mp.devices")){
+
previousDevices=line.substring(line.indexOf("=")+1);
+ }else
if(line.contains("commands=")){
+
previousCommands.add(line);
+ }else{
+
System.out.println(line);
+ out.write(line +
"\n");
+ }
+ }
line = previousIn.readLine();
-
}

- } else {
-
+ } else{
+
System.out.println("First the names of the
devices that have to be supported will " +
"be asked.\nHere you can
specify anything you like, but mostly this is the " +
"URL or\nthe hostname of the
machine.");
@@ -86,7 +104,9 @@
while (it.hasNext())
devicesString += "," +
it.next();

- out.write("service.mp.devices=" +
devicesString + "\n");
+ if (previousDevices.equals(""))
+
out.write("service.mp.devices=" + devicesString + "\n");
+ else out.write("service.mp.devices="
+ previousDevices +"," + devicesString + "\n");

System.out.println("");
System.out
@@ -387,9 +407,19 @@
lastCommands =
"service.mp." + device + ".commands="
+
commandString + "\n";
lastDevice = device;
-
out.write("service.mp." + device + ".commands="
+ if
(previousDevices.contains(device)){
+ Iterator
previousCommandsIt = previousCommands.iterator();
+ while
(previousCommandsIt.hasNext()){
+
String prevComm = (String) previousCommandsIt.next();
+ if
(prevComm.contains("."+device+".")){
+
out.write(prevComm+","+commandString+"\n");
+ }
+ }
+
+ }else{
+
out.write("service.mp." + device + ".commands="
+
commandString + "\n");
-
+ }
} else {


commands.addAll(lastCommandsList);



  • perfsonar: r2178 - in branches/SSHTelnet-MP-STABLE: conf/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters src/org/perfsonar/service/measurementPoint/lookingGlassType/engine/adapters, svnlog, 03/02/2007

Archive powered by MHonArc 2.6.16.

Top of Page