Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4218 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration

Subject: perfsonar development work

List archive

perfsonar: r4218 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4218 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration
  • Date: Thu, 17 Jul 2008 04:21:12 -0400

Author: mac
Date: 2008-07-17 04:21:11 -0400 (Thu, 17 Jul 2008)
New Revision: 4218

Modified:

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
Log:
Some small bugs fixed (netmask, etc)

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
2008-07-17 08:19:31 UTC (rev 4217)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSSummaryServiceContent.java
2008-07-17 08:21:11 UTC (rev 4218)
@@ -240,10 +240,17 @@
sb.append(" <summary:subject id=\"summmary.md.1\">\n");

for (String ip : s.ipAddresses) {
+
+ //split results - ip/netmask or assume 32 as netmask if
wrong format
+ String[] ipvals = ip.split("/",2);
+ if(ipvals .length != 2) {
+ ipvals = new String[] {ip, "32"};
+ }
+
sb.append(" <nmtl3:network>\n");
sb.append(" <nmtl3:subnet>\n");
- sb.append(" <nmtl3:address
type=\"ipv4\">"+ip+"</nmtl3:address>\n");
- sb.append(" <nmtl3:netmask>32</nmtl3:netmask>\n");
+ sb.append(" <nmtl3:address
type=\"ipv4\">"+ipvals[0]+"</nmtl3:address>\n");
+ sb.append("
<nmtl3:netmask>"+ipvals[1]+"</nmtl3:netmask>\n");
sb.append(" </nmtl3:subnet>\n");
sb.append(" </nmtl3:network>\n");
}
@@ -266,11 +273,11 @@
sb.append(" <summary:parameters id=\"summmary.md.1\">\n");
for (String evt : s.eventTypes) {
sb.append(" <nmwg:parameter name=\"eventType\"
value=\""+evt+"\" />\n");
- sb.append(" <nmwg:parameter
name=\"eventType\">"+evt+"</nmwg:parameter>\n");
+ //sb.append(" <nmwg:parameter
name=\"eventType\">"+evt+"</nmwg:parameter>\n");
}
for (String kw : s.keywords) {
sb.append(" <nmwg:parameter name=\"keyword\"
value=\""+kw+"\" />\n");
- sb.append(" <nmwg:parameter
name=\"keyword\">"+kw+"</nmwg:parameter>\n");
+ //sb.append(" <nmwg:parameter
name=\"keyword\">"+kw+"</nmwg:parameter>\n");
}
sb.append(" </summary:parameters>\n");
}
@@ -591,13 +598,10 @@


public static void main(String[] s) {
- System.out.println( " declare namespace
nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\";; \n"+
- " declare namespace
nmwgt=\"http://ggf.org/ns/nmwg/topology/2.0/\";; \n"+
- " for $d in
/nmwg:store[@type='LSStore']/nmwg:data
\n"+
- " let $p :=
$d/nmwg:metadata/*:parameters/nmwg:parameter[@name='keyword']
"+
- " let $val := $p/text() \n"+
- " let $metaIdRef := data($d/@metadataIdRef) \n"+
- " return if (empty($val)) then $val else
concat($metaIdRef,',',$val) \n");
+
+
+
+
}

}//LSSummaryServiceContent



  • perfsonar: r4218 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration, svnlog, 07/17/2008

Archive powered by MHonArc 2.6.16.

Top of Page