perfsonar-dev - perfsonar: r2600 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma test test/ma
Subject: perfsonar development work
List archive
perfsonar: r2600 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma test test/ma
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2600 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma test test/ma
- Date: Wed, 8 Aug 2007 06:26:51 -0400
Author: nina
Date: 2007-08-08 06:26:51 -0400 (Wed, 08 Aug 2007)
New Revision: 2600
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Discards.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Errors.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MARequest_ErrorsTest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MDKResponse1.xml
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MDKResponse2.xml
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/SDResponse1.xml
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/SDResponse2.xml
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequestPerfsonar2_0.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2_Netutil.java
Log:
support for input errors / output drops schema
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequestPerfsonar2_0.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequestPerfsonar2_0.java
2007-08-08 10:10:12 UTC (rev 2599)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequestPerfsonar2_0.java
2007-08-08 10:26:51 UTC (rev 2600)
@@ -38,12 +38,15 @@
super();
logger = new PSLogger(MARequestPerfsonar2_0.class);
}
+ protected MARequestPerfsonar2_0(int nmwg_version, int perfsonar_version)
{
+ super(nmwg_version,perfsonar_version);
+ }
@Override
protected String getSelectEventType() {
return "http://ggf.org/ns/nmwg/ops/select/2.0";
}
- @Override
- protected String getUtilizationEventType() {
+ @Override
+ protected String getSupportedEventType() {
return
"http://ggf.org/ns/nmwg/characteristic/utilization/2.0";
}
public String getRequestType() {
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Discards.java
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Errors.java
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
2007-08-08 10:10:12 UTC (rev 2599)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
2007-08-08 10:26:51 UTC (rev 2600)
@@ -43,17 +43,24 @@
*
*/
public class MARequest_NMWG2 extends AbstractMARequest {
- protected static String[] URI_nmwgt =
{"","http://ggf.org/ns/nmwg/topology/","http://ggf.org/ns/nmwg/topology/2.0/"};
- protected static String[] URI_nmwg = {"",NMWG,NMWG2};
+ protected static String[] URI_nmwgt = {
+ "",
+ "http://ggf.org/ns/nmwg/topology/",
+ "http://ggf.org/ns/nmwg/topology/2.0/"
+ };
+ protected static String[] URI_nmwg = {"",NMWG,NMWG2,NMWG2,NMWG2};
protected static String[][] URI_perfsonar = {
{"perfsonar","http://ggf.org/ns/nmwg/tools/org/perfsonar/"},
{"perfsonar","http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/"},
- {"netutil","http://ggf.org/ns/nmwg/characteristic/utilization/2.0/"}
+ {"netutil","http://ggf.org/ns/nmwg/characteristic/utilization/2.0/"},
+ {"errors","http://ggf.org/ns/nmwg/characteristic/errors/2.0/"},
+ {"discards","http://ggf.org/ns/nmwg/characteristic/discards/2.0/"},
};
protected static String[] URI_nmwg_select = {
"",
"http://ggf.org/ns/nmwg/ops/select/",
- "http://ggf.org/ns/nmwg/ops/select/2.0/"};
+ "http://ggf.org/ns/nmwg/ops/select/2.0/"
+ };
protected Namespace nmwg = null;
@@ -286,12 +293,20 @@
if
(!userData.getCharacteristic(AbstractUserData.ID_QUERY).equals(AbstractUserData.NULL_DATA)){
MetElem.addContent(new Element("eventType",
nmwg).setText(userData.getCharacteristic(AbstractUserData.ID_QUERY).toString()));
} else
- MetElem.addContent(new Element("eventType",
nmwg).setText(getUtilizationEventType()));
+ MetElem.addContent(new Element("eventType",
nmwg).setText(getSupportedEventType()));
return MetElem;
}
+ protected String getSupportedEventType() {
+ return "utilization";
+ }
+
+ /**
+ * @deprecated Use
{@link
#getSupportedEventType()}
+ * @return
+ */
protected String getUtilizationEventType() {
- return "utilization";
+ return getSupportedEventType();
}
public Element createEmptyMetadataSection(UserData userData){
@@ -340,6 +355,12 @@
IfAddrElem.setAttribute(E_IFTYPE,
userData.getIpVersion(AbstractUserData.ID_QUERY));
IfAddrElem.setText(userData.getifAddress(AbstractUserData.ID_QUERY));
NmwgtElem.addContent(IfAddrElem);
+
+ if
(!userData.getIfName(AbstractUserData.ID_QUERY).equals(AbstractUserData.NULL_DATA))
{
+ Element Ifname = new Element(E_IFNAME, nmwgt);
+
Ifname.setText(userData.getIfName(AbstractUserData.ID_QUERY));
+ NmwgtElem.addContent(Ifname);
+ }
}
MetElem.addContent(SubjElem);
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2_Netutil.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2_Netutil.java
2007-08-08 10:10:12 UTC (rev 2599)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2_Netutil.java
2007-08-08 10:26:51 UTC (rev 2600)
@@ -53,6 +53,9 @@
public MARequest_NMWG2_Netutil() {
super(2,2);
}
+ protected MARequest_NMWG2_Netutil(int nmwg_version, int
perfsonar_version) {
+ super(nmwg_version,perfsonar_version);
+ }
@Override
protected Namespace getParamsNamespace() {
return nmwg;
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MARequest_ErrorsTest.java
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MDKResponse1.xml
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MDKResponse2.xml
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/SDResponse1.xml
Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/SDResponse2.xml
- perfsonar: r2600 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma test test/ma, svnlog, 08/08/2007
Archive powered by MHonArc 2.6.16.