Author: ips
Date: Mon Apr 4 15:35:38 2005
New Revision: 160115
URL: http://svn.apache.org/viewcvs?view=rev&rev=160115
Log:
various
Modified:
incubator/muse/trunk/src/site/content/interop/build.xml
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
Modified: incubator/muse/trunk/src/site/content/interop/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/build.xml?view=diff&r1=160114&r2=160115
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/build.xml (original)
+++ incubator/muse/trunk/src/site/content/interop/build.xml Mon Apr 4 15:35:38
2005
@@ -16,7 +16,6 @@
<property name="src.dir" location="${basedir}\src\java" />
<property name="wsdl.dir" location="${basedir}\src\wsdl" />
-
<target name="init" unless="muse.classpath">
<fail message="Please set the location of the wsdm.webapp.dir in
build.properties" unless="wsdm.webapp.dir" />
@@ -31,8 +30,7 @@
<property name="muse.classpath" refid="muse.classpath.id" />
</target>
-
-
+
<target name="generate"
depends="init"
description="generate Axis service classes and XMLBeans types
for the filesystem WSDL">
@@ -45,8 +43,7 @@
</fileset>
</copy>
<mkdir dir="${wsdm.webapp.dir}/wsdl" />
-
-
+
<taskdef name="wsdl2Java"
classname="org.apache.ws.resource.tool.Wsdl2JavaTask"
classpath="${muse.classpath}" />
<wsdl2Java outputDir="${out.dir}"
@@ -56,7 +53,7 @@
proxyPort="${http.proxyPort}"
nonProxyHosts="${http.nonProxyHosts}">
<wsdls dir="${tmp.dir}">
- <include name="**/*.wsdl" />
+ <include name="**/*.wsdl" />
</wsdls>
</wsdl2Java>
@@ -64,7 +61,6 @@
</target>
-
<target name="compile"
depends="init"
description="compile all classes below classes directory">
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java?view=diff&r1=160114&r2=160115
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
Mon Apr 4 15:35:38 2005
@@ -88,10 +88,6 @@
assertTrue( statusPropElems[0] instanceof
OperationalStatusDocument.OperationalStatus );
}
- protected void performMuwsStatusChangeEventAct( ResourceStub resource )
throws FaultException
- {
- }
-
protected XmlObject getSingleProperty( ResourceStub resource, QName
propName )
throws FaultException
{
@@ -133,11 +129,9 @@
return (EndpointReferenceDocument) XmlObject.Factory.parse( url );
}
- protected ManagementEventType waitForManagementEvent( PortListen
notificationListener ) throws XmlException
+ protected ManagementEventType waitForManagementEvent( PortListen
notifListener ) throws XmlException
{
- // TODO: add support for unwrapped events
- // wait for that termination notification
- String incomingMsg = notificationListener.waitForIncomingMessage();
+ String incomingMsg = notifListener.waitForIncomingMessage();
assertTrue( incomingMsg, incomingMsg.indexOf( "ERROR" ) == -1 );
//get envelope
@@ -146,13 +140,12 @@
EnvelopeDocument envelope = (EnvelopeDocument) xmlObject;
Body body = envelope.getEnvelope().getBody();
- XmlObject xmlManagementEvent = null;
-
+ XmlObject mgmtEventElem = null;
if (ResourceStub.USE_WRAPPED_NOTIFICATIONS) //wrapped
{
//get notify
XmlObject bodyElems[] = XmlBeanUtils.getChildElements(body, new
QName(BaseNotification1_2Constants.NSURI_WSNT_SCHEMA, "Notify"));
- assertEquals("The SOAP Body does not contain exactly one
element.", 1, bodyElems.length);
+ assertEquals("The SOAP Body does not contain exactly one
wsnt:Notify element.", 1, bodyElems.length);
XmlObject notifyDoc = bodyElems[0];
assertTrue("The SOAP Body does not contain a wrapped notification
with a Notify element.", notifyDoc instanceof NotifyDocument.Notify);
NotifyDocument.Notify notify = (NotifyDocument.Notify) notifyDoc;
@@ -161,15 +154,19 @@
NotificationMessageHolderType notificationMessageType =
notify.getNotificationMessageArray(0);
XmlObject message = notificationMessageType.getMessage();
- xmlManagementEvent = XmlBeanUtils.getChildElements(message, new
QName(MuwsConstants.NSURI_MUWS_PART1_SCHEMA, "ManagementEvent"))[0];
- assertTrue("The Notify did not contain a ManagementEvent.",
xmlManagementEvent instanceof ManagementEventType);
+ XmlObject mgmtEventElems[] =
XmlBeanUtils.getChildElements(message, new
QName(MuwsConstants.NSURI_MUWS_PART1_SCHEMA, "ManagementEvent"));
+ assertEquals("The Notify element does not contain exactly one
muws-p1-xs:ManagementEvent element.", 1, mgmtEventElems.length);
+ mgmtEventElem = mgmtEventElems[0];
+ assertTrue("The Notify element does not contain a
ManagementEvent.", mgmtEventElem instanceof ManagementEventType);
}
else //unwrapped
{
- xmlManagementEvent = XmlBeanUtils.getChildElements(body, new
QName(MuwsConstants.NSURI_MUWS_PART1_SCHEMA, "ManagementEvent"))[0];
- assertTrue("The SOAP Body did not contain an unwrapped
ManagementEvent.", xmlManagementEvent instanceof ManagementEventType);
+ XmlObject mgmtEventElems[] = XmlBeanUtils.getChildElements(body,
new QName(MuwsConstants.NSURI_MUWS_PART1_SCHEMA, "ManagementEvent"));
+ assertEquals("The SOAP Body does not contain exactly one
muws-p1-xs:ManagementEvent element.", 1, mgmtEventElems.length);
+ mgmtEventElem = mgmtEventElems[0];
+ assertTrue("The SOAP Body did not contain an unwrapped
ManagementEvent.", mgmtEventElem instanceof ManagementEventType);
}
- ManagementEventType mgmtEvent = (ManagementEventType)
xmlManagementEvent;
+ ManagementEventType mgmtEvent = (ManagementEventType) mgmtEventElem;
return mgmtEvent;
}
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java?view=diff&r1=160114&r2=160115
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
Mon Apr 4 15:35:38 2005
@@ -17,9 +17,20 @@
import org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument;
import org.apache.ws.addressing.XmlBeansEndpointReference;
+import
org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
+import org.apache.ws.muws.v1_0.capability.ConfigurationCapability;
+import org.apache.ws.muws.v1_0.capability.OperationalStatusCapability;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlString;
+import org.apache.xmlbeans.XmlBoolean;
import java.net.URL;
+import rim.pda.DateDocument;
+import com.dell.wsdm.demos.interop.x2005.x04.IpmiserverPropertyQNames;
+import com.dell.wsdm.demos.interop.x2005.x04.AttentionLedOnDocument;
+import com.dell.wsdm.demos.interop.x2005.x04.CoverOpenDocument;
+
/**
* A test case containing a test for each act in the "Server Management"
* playbook, as defined in the WSDM 1.0 interop scenarios doc.
@@ -34,6 +45,12 @@
private static final String DEFAULT_IPMI_SERVER_EPR =
"http://cvs.apache.org/~ips/interop/ipmi_server-epr.xml";
private static final String IPMI_SERVER_EPR = System.getProperty(
SYSPROP_IPMI_SERVER_EPR, DEFAULT_IPMI_SERVER_EPR );
+ private static final String NSURI_IPMI_SERVER =
"http://dell.com/wsdm/demos/interop/2005/04";
+ private static final String NSPREFIX_IPMI_SERVER = "svr";
+ private static final String CAPABILITY_URI_SERVER_CONFIGURATION =
NSURI_IPMI_SERVER + "/ServerConfiguration";
+ private static final String CAPABILITY_URI_SERVER_CHASSIS_CONFIGURATION =
NSURI_IPMI_SERVER + "/ServerChassisConfiguration";
+ private static final String CAPABILITY_URI_SERVER_ALERT_STATUS =
NSURI_IPMI_SERVER + "/ServerAlertStatus";
+
private ResourceStub m_resource;
protected void setUp() throws Exception
@@ -49,19 +66,45 @@
performMuwsIdentityCharacteristicsAct( m_resource );
}
- public void testServerAssets()
+ public void testServerAssets() throws FaultException
{
- // TBD in interop doc
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
+
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, ConfigurationCapability.URI );
+ assertContainsURI( capabilityElems,
CAPABILITY_URI_SERVER_CONFIGURATION );
+ XmlObject serialNumberPropElem = getSingleProperty( m_resource,
IpmiserverPropertyQNames.SERIALNUMBER );
+ assertTrue( serialNumberPropElem instanceof XmlString );
+ System.out.println( "Serial number value returned by server: " +
((XmlString)serialNumberPropElem).getStringValue() );
+ XmlObject modelNamePropElem = getSingleProperty( m_resource,
IpmiserverPropertyQNames.MODELNAME );
+ assertTrue( modelNamePropElem instanceof XmlString );
+ XmlObject ipNamePropElem = getSingleProperty( m_resource,
IpmiserverPropertyQNames.IPNAME );
+ assertTrue( ipNamePropElem instanceof XmlString );
+ XmlObject sysContactPropElem = getSingleProperty( m_resource,
IpmiserverPropertyQNames.SYSCONTACT );
+ assertTrue( sysContactPropElem instanceof XmlString );
}
- public void testServerAlert()
+ public void testServerAlert() throws FaultException
{
- // TBD in interop doc
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
+
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, OperationalStatusCapability.URI );
+ assertContainsURI( capabilityElems, CAPABILITY_URI_SERVER_ALERT_STATUS
);
+ AttentionLedOnDocument attentionLedOnDoc =
AttentionLedOnDocument.Factory.newInstance();
+ attentionLedOnDoc.setAttentionLedOn( true );
+ setSingleProperty( m_resource, attentionLedOnDoc );
+ System.out.println( "AttentionLedOn property has been set to true.
Please verify that the LED on the physical server is now lit up." );
}
- public void testServerChassisIntrusionDetection()
+ public void testServerChassisIntrusionDetection() throws FaultException
{
- // TBD in interop doc
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
+
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, ConfigurationCapability.URI );
+ assertContainsURI( capabilityElems,
CAPABILITY_URI_SERVER_CHASSIS_CONFIGURATION );
+ XmlObject coverOpenPropElem = getSingleProperty( m_resource,
IpmiserverPropertyQNames.COVEROPEN );
+ assertTrue( coverOpenPropElem instanceof XmlBoolean );
+ // TODO
+ System.out.println( "Please verify that ..." );
}
public void testMuwsStatus() throws FaultException
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]