perfsonar-dev - perfsonar: r5262 - in branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService: . selftest
Subject: perfsonar development work
List archive
perfsonar: r5262 - in branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService: . selftest
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5262 - in branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService: . selftest
- Date: Thu, 13 Aug 2009 06:05:30 -0400
Author: rodriguez
Date: 2009-08-13 06:05:29 -0400 (Thu, 13 Aug 2009)
New Revision: 5262
Added:
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/selftest/AuthrPolicyTest.java
Modified:
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/EchoServiceEngine.java
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/selftest/SelfTest.java
Log:
- Adding self-tests for checking the authr part of the service
Modified:
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/EchoServiceEngine.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/EchoServiceEngine.java
2009-08-12 12:37:12 UTC (rev 5261)
+++
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/EchoServiceEngine.java
2009-08-13 10:05:29 UTC (rev 5262)
@@ -16,6 +16,7 @@
import org.perfsonar.base2.xml.nmwg.Message;
import org.perfsonar.base2.xml.nmwg.Metadata;
import org.perfsonar.service.authService.selftest.ASValidFileTest;
+import org.perfsonar.service.authService.selftest.AuthrPolicyTest;
import org.perfsonar.service.authService.selftest.SelfTest;
import org.perfsonar.service.authService.selftest.TruststoreTest;
@@ -57,6 +58,11 @@
props.put(Configurator.PROPS_TRUSTSTORE_PASSWD,
configuration.getExtensionOption("auth-engine",
"service.as.truststore_password"));
props.put(Configurator.PROPS_TRUSTSTORE_FILE,configuration.getExtensionOption("auth-engine",
"service.as.truststore_file"));
props.put(Configurator.PROPS_VALID_COMPONENTS,configuration.getExtensionOption("auth-engine",
"service.as.valid_components"));
+
+ String authrpolicy =
configuration.getExtensionOption("authr-engine", "service.as.authr_policy");
+ if (authrpolicy != null) {
+ props.put("authr-policy", authrpolicy);
+ }
}
public void takeAction(ServiceMessage serviceRequest, ServiceMessage
serviceResponse)
@@ -89,8 +95,16 @@
else {
if (selfTest==null) {
logger.debug("EchoAction:
initializing self tests...");
- selfTest = new SelfTest[]{new
TruststoreTest(props),
- new
ASValidFileTest(props)};
+ String authrpolicy =
configuration.getExtensionOption("authr-engine", "service.as.authr_policy");
+ if (authrpolicy != null) {
+ selfTest = new SelfTest[]{new
TruststoreTest(props),
+ new
ASValidFileTest(props),
+ new
AuthrPolicyTest(props)};
+ }
+ else {
+ selfTest = new SelfTest[]{new
TruststoreTest(props),
+ new
ASValidFileTest(props)};
+ }
}
response = executeEcho();
Added:
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/selftest/AuthrPolicyTest.java
Modified:
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/selftest/SelfTest.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/selftest/SelfTest.java
2009-08-12 12:37:12 UTC (rev 5261)
+++
branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService/selftest/SelfTest.java
2009-08-13 10:05:29 UTC (rev 5262)
@@ -4,7 +4,6 @@
import org.perfsonar.base2.xml.nmwg.Data;
import org.perfsonar.base2.xml.nmwg.EventType;
import org.perfsonar.base2.xml.nmwg.Metadata;
-import org.perfsonar.base2.xml.nmwgr.Datum;
public abstract class SelfTest {
public static final String EVENT_TYPE_NAMESPACE =
"http://schemas.perfsonar.net/tools/admin/selftest/AS/";
@@ -37,10 +36,6 @@
datum.setText(description);
dataRes.addChild(datum);
-// Datum datum=new Datum();
-// datum.setText(description);
-// dataRes.setDatum(datum);
-
data.addChild(metadataRes);
data.addChild(dataRes);
}
- perfsonar: r5262 - in branches/new-structure-with-base2/ps-mdm-as/src/main/java/org/perfsonar/service/authService: . selftest, svnlog, 08/13/2009
Archive powered by MHonArc 2.6.16.