From 2e0f686816d9148c768e5e88c3eae37d43503b24 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 6 Dec 2006 16:01:19 +0000 Subject: added more scnarios, integrate interop test into build --- configure.in | 1 + tests/Makefile.am | 2 +- .../Scenarios.InteropWorkshop.Dec2006.MSFT.xml | 490 ++++++++++++++ ...Scenarios.InteropWorkshop.Dec2006.OpenWSMAN.xml | 31 +- .../Scenarios.InteropWorkshop.Dec2006.WISEMAN.xml | 335 +++++++++ tests/interop/WISEMAN-results.txt | 750 +++++++++++++++++++++ tests/interop/interop.c | 81 ++- 7 files changed, 1658 insertions(+), 32 deletions(-) create mode 100755 tests/interop/Scenarios.InteropWorkshop.Dec2006.MSFT.xml create mode 100755 tests/interop/Scenarios.InteropWorkshop.Dec2006.WISEMAN.xml create mode 100644 tests/interop/WISEMAN-results.txt diff --git a/configure.in b/configure.in index 4398c21..a8fd847 100644 --- a/configure.in +++ b/configure.in @@ -25,6 +25,7 @@ AC_OUTPUT([ src/Makefile examples/Makefile tests/Makefile + tests/interop/Makefile tests/cunit/Makefile ]) diff --git a/tests/Makefile.am b/tests/Makefile.am index d311b0d..2819769 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = +SUBDIRS = interop if BUILD_CUNIT_TESTS SUBDIRS += cunit diff --git a/tests/interop/Scenarios.InteropWorkshop.Dec2006.MSFT.xml b/tests/interop/Scenarios.InteropWorkshop.Dec2006.MSFT.xml new file mode 100755 index 0000000..ad3ba70 --- /dev/null +++ b/tests/interop/Scenarios.InteropWorkshop.Dec2006.MSFT.xml @@ -0,0 +1,490 @@ + + + + + http://192.168.0.13:80/wsman + + + wsman + secret + + + + + http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd + Microsoft Corporation + OS: 6.0.5734 SP: 0.0 Stack: 1.0 + + + + + + WSMANIDENTIFY: unauthenticated + + + + http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd + Microsoft Corporation + OS: 0.0.0 SP: 0.0 Stack: 1.0 + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/ContactInfo + + 1 + + + + + 123 4th Ave. Redmond WA 98052 + 1 + Mary Jones + 425-123-4567 + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_InvalidClass + + + + + + + + The WS-Management service cannot process the request. The service cannot find the resource identified by the reso + urce URI and selectors. + + + + + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_OperatingSystem + + 150 + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Process + + 0 + + + + + + + + + The WS-Management service cannot process the request because the selectors for the resource are not valid. + + + + + + + + + wsman:microsoft.test/testresource/get/timeout + + 20000 + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_OperatingSystem + + http://www.w3.org/TR/1999/REC-xpath-19991116 + Caption/text() + + + Microsoftr Windows VistaT Ultimate + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/ContactInfo + + + + + 7 156st Ave. N.E. Apt#10 Redmond WA 98052 + 2 + Peter Parker + 425-765-4321 + + + + + 123 4th Ave. Redmond WA 98052 + 1 + Mary Jones + 425-123-4567 + + + + + + hporter@porter.com + 4 + Harry Porter + 408-654-3214 + + + + + 1 Simpson Road, Richmond Canada V71 4LC + barts@simpson.com + 3 + Bart Simpson + + + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/ContactInfo + + + + + 7 156st Ave. N.E. Apt#10 Redmond WA 98052 + 2 + Peter Parker + 425-765-4321 + + + + + 123 4th Ave. Redmond WA 98052 + 1 + Mary Jones + 425-123-4567 + + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/ContactInfo + + + + + + 7 156st Ave. N.E. Apt#10 Redmond WA 98052 + 2 + Peter Parker + 425-765-4321 + + + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/plugfest/ContactInfo + + 2 + + + + + + + + + 123 4th Ave. Redmond WA 98052 + 1 + Mary Jones + 425-123-4567 + + + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/plugfest/ContactInfo + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/* + http://schemas.microsoft.com/wbem/wsman/1/WQL + SELECT * FROM ContactInfo WHERE Name='Mary Jones' + + + + + 123 4th Ave. Redmond WA 98052 + 1 + Mary Jones + 425-123-4567 + + + + + + + + + + + + + + + + + + + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/ContactInfo + + + + + + 7 156st Ave. N.E. Apt#10 Redmond WA 98052 + 2 + Peter Parker + 425-765-4321 + + + 123 4th Ave. Redmond WA 98052 + 1 + Mary Jones + 425-123-4567 + + + + hporter@porter.com + 4 + Harry Porter + 408-654-3214 + + + 1 Simpson Road, Richmond Canada V71 4LC + barts@simpson.com + 3 + Bart Simpson + + + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service + + Spooler + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service/StartService + StartService + + + + + + + + 10 + + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/EmployeeRecord + + 1 + + Alias + bsimpson + + + + bsimpson + 1 + Bart Simpson + + + + + + http://schemas.microsoft.com/wbem/wsman/1/wmi/root/Plugfest/EmployeeRecord + + 2 + + http://www.w3.org/TR/1999/REC-xpath-19991116 + Alias + pparker + + + + pparker + + + + + + http://schemas.microsoft.com/wbem/wsman/1/windows/EventLog + + + + + + http://192.168.0.13:80/wsman + http://schemas.microsoft.com/wbem/wsman/1/windows/EventLog + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe + 153600 + uuid:757A363C-C086-49CD-B42F-666AAB930D43 + + + RenderedText + + + + + + + + PT900.000S + + UTF-8 + + PT3961315881.184S + + <QueryList> + <Query Path="System"> + <Select>*</Select> + </Query> + </QueryList> + + + + + + + + + + + + + + + http://192.168.0.13:80/wsman + http://schemas.microsoft.com/wbem/wsman/1/windows/EventLog + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe + 153600 + uuid:757A363C-C086-49CD-B42F-666AAB930D43 + + + RenderedText + + + + + + + + PT900.000S + + UTF-8 + + PT3961315881.184S + + <QueryList> + <Query Path="System"> + <Select>*</Select> + </Query> + </QueryList> + + + + + + + + + + + + + + + + + + diff --git a/tests/interop/Scenarios.InteropWorkshop.Dec2006.OpenWSMAN.xml b/tests/interop/Scenarios.InteropWorkshop.Dec2006.OpenWSMAN.xml index 3e6885b..16e54a4 100644 --- a/tests/interop/Scenarios.InteropWorkshop.Dec2006.OpenWSMAN.xml +++ b/tests/interop/Scenarios.InteropWorkshop.Dec2006.OpenWSMAN.xml @@ -160,9 +160,13 @@ - - - + http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_InitdService + + OMC_UnitaryComputerSystem + anashif-mobl.ims.intel.com + nfsserver + + ServiceStatus @@ -171,11 +175,24 @@ - - - - + http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/OMC_TimeZoneSettingData + + omc:timezone + + TimeZone + US/Pacific + + + omc:timezone + US/Eastern + false + + + + + + diff --git a/tests/interop/Scenarios.InteropWorkshop.Dec2006.WISEMAN.xml b/tests/interop/Scenarios.InteropWorkshop.Dec2006.WISEMAN.xml new file mode 100755 index 0000000..3b8a3f7 --- /dev/null +++ b/tests/interop/Scenarios.InteropWorkshop.Dec2006.WISEMAN.xml @@ -0,0 +1,335 @@ + + + + + http:/192.168.0.19:8080/wsman/ + + + + wsman + secret + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem + + IPMI Controller 32 + ComputerSystem + + + + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSyste + + IPMI Controller 32 + ComputerSystem + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem + + IPMI Controller 32 + ComputerSystem + + 8500 + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + + NumericSensor + + + + + + wsman:test/timeout + PT0.003S + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem + + IPMI Controller 32 + ComputerSystem + true + + http://www.w3.org/TR/1999/REC-xpath-19991116 + /CIM_ComputerSystem/Roles + + + + + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + + + + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + 2 + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + Bad EnumerationContxtId:uuid:bogas-context-0000-00000-0000 + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_RecordLog + + IPMI:IPMI Controller 32 SEL Log + + ClearLog + + + + + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + + NumericSensor + 10.0.32 + IPMI Controller 32 + ComputerSystem + + + + 0 + + 0 + OEM RESERVED(81.0.32) + NumericSensor + 0 + OK + SEL Fullness(81.0.32):OEM RESERVED for OEM System Integrator defined entity 0 + 81.0.32 + SEL Fullness(81.0.32) + 2 + 5 + + + + 0 + + true + + 26 + 10 + 100 + + 255 + 0 + SEL Fullness(81.0.32) + 48 + 63 + 47 + + OEM RESERVED + + OK + N/A + at or below lower non-critical threshold + at or below lower critical threshold + at or below lower non-recoverable threshold + at or above upper non-critical threshold + at or above upper critical threshold + at or above upper non-recoverable threshold + + + 0 + 12 + 0 + 1 + + + ComputerSystem + IPMI Controller 32 + + + + 0 + 80 + 90 + 66 + + + + + + + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + + NumericSensor + 81.0.32 + IPMI Controller 32 + ComputerSystem + + http://www.w3.org/TR/1999/REC-xpath-19991116 + //p:LowerThresholdNonCritical + + + + + + wsman:test/pull_source + http://www.w3.org/TR/1999/REC-xpath-19991116 + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + uuid:a34da83f-326a-441d-9a92-c30f063112ca + http://localhost:8080/wsman/ + wsman:test/pull_source + PT1M0.000S + 153600 + + + + + 5cfb05ca-9eb1-42e6-b5d0-79fd0a76b5a2 + 1 + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse + uuid:6f101b82-65e3-4d2a-b15e-97c1e04d6f10 + uuid:a34da83f-326a-441d-9a92-c30f063112ca + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + 5cfb05ca-9eb1-42e6-b5d0-79fd0a76b5a2 + + critical + + + + + + + + + + + diff --git a/tests/interop/WISEMAN-results.txt b/tests/interop/WISEMAN-results.txt new file mode 100644 index 0000000..3c5b9fa --- /dev/null +++ b/tests/interop/WISEMAN-results.txt @@ -0,0 +1,750 @@ +6.1 Identify (0) + + + + + + + + + + + + + + The Wiseman Project - https://wiseman.dev.java.net + 0.5 + http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd + 1.0.0a + 200612040909 + + + +6.1.1 Anonymous Identify: Not Supported (1) + +6.2 Get (2) + + + + + http://schemas.xmlsoap.org/ws/2004/09/transfer/Get + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem + uuid:3bf019b7-23e2-13e2-8002-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + IPMI Controller 32 + ComputerSystem + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse + uuid:1cf13918-cbf8-4025-9837-fcb4b28e7018 + uuid:3bf019b7-23e2-13e2-8002-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + BMC 32 + ComputerSystem + 14 + BMC 32 - IPMI v1.5 - fw v0.30.0.0.0.0 + IPMI Controller 32 + 2 + 5 + + Wiseman-https://wiseman.dev.java.net + + IPMI Controller 32 + Other + + 0-0 + + + 12 + + Hardware Management Controller + + + + + +6.3 Get failure - invalid resoure URI (3) + + + + + http://schemas.xmlsoap.org/ws/2004/09/transfer/Get + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSyste + uuid:3bf41645-23e2-13e2-8003-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + IPMI Controller 32 + ComputerSystem + + + + + + + + http://schemas.xmlsoap.org/ws/2004/08/addressing/fault + uuid:2fc912e4-d19a-4073-8dc4-3507a650c734 + uuid:3bf41645-23e2-13e2-8003-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + env:Sender + + wsa:DestinationUnreachable + + + + No route can be determined to reach the destination role defined by the WS-Addressing To. + + + Handler not found for resource http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSyste + http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/InvalidResourceURI + + + + +6.4 Get failure (MaxEnvelop exceeded) (4) + + + + + http://schemas.xmlsoap.org/ws/2004/09/transfer/Get + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem + uuid:3bf72507-23e2-13e2-8004-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + IPMI Controller 32 + ComputerSystem + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse + uuid:af038704-3eab-4714-b3e1-f48986aead89 + uuid:3bf72507-23e2-13e2-8004-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + BMC 32 + ComputerSystem + 14 + BMC 32 - IPMI v1.5 - fw v0.30.0.0.0.0 + IPMI Controller 32 + 2 + 5 + + Wiseman-https://wiseman.dev.java.net + + IPMI Controller 32 + Other + + 0-0 + + + 12 + + Hardware Management Controller + + + + + +6.5 Get failure - invalid selectors (5) + + + + + http://schemas.xmlsoap.org/ws/2004/09/transfer/Get + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3bf9f1f8-23e2-13e2-8005-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + NumericSensor + + + + + + + + http://schemas.dmtf.org/wbem/wsman/1/wsman/fault + uuid:04ed17b8-9fba-4fd0-a244-0570c46ce290 + uuid:3bf9f1f8-23e2-13e2-8005-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + env:Sender + + wsman:InvalidSelectors + + + + The Selectors for the resource were not valid. + + + http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/InsufficientSelectors + + + + +6.6 Get failure - operation timeout (6) + +6.7 Fragment Get (7) + +7.1 Enumerate (8) + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3bfc992c-23e2-13e2-8006-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse + uuid:e427e797-3a09-480b-b022-b52e79a2178f + uuid:3bfc992c-23e2-13e2-8006-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + 2147483647-12-31T23:59:59.999-14:00 + 8191fd9d-24c6-477f-9192-e27c59358ee3 + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3bff5769-23e2-13e2-8007-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + 8191fd9d-24c6-477f-9192-e27c59358ee3 + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse + uuid:9212ad20-d20a-4950-a258-a3eba0162acc + uuid:3bff5769-23e2-13e2-8007-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + 8191fd9d-24c6-477f-9192-e27c59358ee3 + + + 0 + + 2 + Temperature(10.0.32) + NumericSensor + 190 + OK + PCI-X Slot Temp(10.0.32):Temperature for Other 1 + 10.0.32 + PCI-X Slot Temp(10.0.32) + 2 + 5 + + + + 0 + + true + + -550 + -550 + 40 + + 2000 + -550 + PCI-X Slot Temp(10.0.32) + 300 + 350 + 250 + + + + OK + N/A + at or below lower non-critical threshold + at or below lower critical threshold + at or below lower non-recoverable threshold + at or above upper non-critical threshold + at or above upper critical threshold + at or above upper non-recoverable threshold + + + 0 + 12 + 0 + 2 + + + ComputerSystem + IPMI Controller 32 + + + + -1 + 550 + -550 + 450 + + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3c0220de-23e2-13e2-8008-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + 8191fd9d-24c6-477f-9192-e27c59358ee3 + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse + uuid:0f78735c-b096-4b50-bff9-e573002a5a0c + uuid:3c0220de-23e2-13e2-8008-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + + 0 + + 2 + Temperature(11.0.32) + NumericSensor + 210 + OK + SCSI-Gbit Temp(11.0.32):Temperature for Other 2 + 11.0.32 + SCSI-Gbit Temp(11.0.32) + 2 + 5 + + + + 0 + + true + + -550 + -550 + 40 + + 2000 + -550 + SCSI-Gbit Temp(11.0.32) + 300 + 350 + 250 + + + + OK + N/A + at or below lower non-critical threshold + at or below lower critical threshold + at or below lower non-recoverable threshold + at or above upper non-critical threshold + at or above upper critical threshold + at or above upper non-recoverable threshold + + + 0 + 12 + 0 + 2 + + + ComputerSystem + IPMI Controller 32 + + + + -1 + 550 + -550 + 450 + + + + + + +7.2 Optimized Enumerate (9) + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3c088bb3-23e2-13e2-8009-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse + uuid:de26eba6-fad2-4ef1-85cf-0cd4f366b581 + uuid:3c088bb3-23e2-13e2-8009-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + c0081c39-b43e-451f-9967-810608f94780 + + + 0 + + 2 + Temperature(10.0.32) + NumericSensor + 190 + OK + PCI-X Slot Temp(10.0.32):Temperature for Other 1 + 10.0.32 + PCI-X Slot Temp(10.0.32) + 2 + 5 + + + + 0 + + true + + -550 + -550 + 40 + + 2000 + -550 + PCI-X Slot Temp(10.0.32) + 300 + 350 + 250 + + + + OK + N/A + at or below lower non-critical threshold + at or below lower critical threshold + at or below lower non-recoverable threshold + at or above upper non-critical threshold + at or above upper critical threshold + at or above upper non-recoverable threshold + + + 0 + 12 + 0 + 2 + + + ComputerSystem + IPMI Controller 32 + + + + -1 + 550 + -550 + 450 + + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3c0b559f-23e2-13e2-800a-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + c0081c39-b43e-451f-9967-810608f94780 + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse + uuid:eb031411-bce6-46cc-a7e4-4adc9ac725cb + uuid:3c0b559f-23e2-13e2-800a-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + + 0 + + 2 + Temperature(11.0.32) + NumericSensor + 210 + OK + SCSI-Gbit Temp(11.0.32):Temperature for Other 2 + 11.0.32 + SCSI-Gbit Temp(11.0.32) + 2 + 5 + + + + 0 + + true + + -550 + -550 + 40 + + 2000 + -550 + SCSI-Gbit Temp(11.0.32) + 300 + 350 + 250 + + + + OK + N/A + at or below lower non-critical threshold + at or below lower critical threshold + at or below lower non-recoverable threshold + at or above upper non-critical threshold + at or above upper critical threshold + at or above upper non-recoverable threshold + + + 0 + 12 + 0 + 2 + + + ComputerSystem + IPMI Controller 32 + + + + -1 + 550 + -550 + 450 + + + + + + +7.3 Enumerate failure (10) + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3c0e392d-23e2-13e2-800b-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3c10d2ef-23e2-13e2-800c-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + 1fb7f89f-1bed-4b7e-b385-43ae75217f40 + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse + uuid:4f6662c9-7152-4f80-8a99-9168d03d0a03 + uuid:3c10d2ef-23e2-13e2-800c-be0448251100 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + 1fb7f89f-1bed-4b7e-b385-43ae75217f40 + + + 0 + + 2 + Temperature(10.0.32) + NumericSensor + 190 + OK + PCI-X Slot Temp(10.0.32):Temperature for Other 1 + 10.0.32 + PCI-X Slot Temp(10.0.32) + 2 + 5 + + + + 0 + + true + + -550 + -550 + 40 + + 2000 + -550 + PCI-X Slot Temp(10.0.32) + 300 + 350 + 250 + + + + OK + N/A + at or below lower non-critical threshold + at or below lower critical threshold + at or below lower non-recoverable threshold + at or above upper non-critical threshold + at or above upper critical threshold + at or above upper non-recoverable threshold + + + 0 + 12 + 0 + 2 + + + ComputerSystem + IPMI Controller 32 + + + + -1 + 550 + -550 + 450 + + + + + + + + + http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull + http://192.168.0.17:8080/wsman/ + http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor + uuid:3c13e965-23e2-13e2-800d-be0448251100 + + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + + + xxxx + + + diff --git a/tests/interop/interop.c b/tests/interop/interop.c index f747800..1695d0d 100644 --- a/tests/interop/interop.c +++ b/tests/interop/interop.c @@ -25,6 +25,15 @@ typedef enum { INTEROP_IDENTIFY = 0 } InteropTest; +static set_props(actionOptions *op, char *k, char *v) +{ + hash_t *h = hash_create(HASHCOUNT_T_MAX, 0, 0); + + if ( !hash_alloc_insert(h, k, v)) { + fprintf(stderr, "hash_alloc_insert failed"); + } + op->properties = h; +} static void wsman_add_selectors_list_from_node( WsXmlNodeH input, actionOptions *options) @@ -71,12 +80,12 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i { WsXmlDocH response; actionOptions options; - if (id == 0) { - initialize_action_options(&options); + initialize_action_options(&options); + wsman_set_action_option(&options,FLAG_DUMP_REQUEST ); + if (id == 0) { // 6.1 Identify response = wsman_identify(cl, options); xml_parser_doc_dump(stdout, response); - }else if (id == 2) { - initialize_action_options(&options); + }else if (id == 2) { // 6.2 Get WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); @@ -84,8 +93,7 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i char *resource_uri = ws_xml_get_node_text(r); response = ws_transfer_get(cl, resource_uri, options); xml_parser_doc_dump(stdout, response); - }else if (id == 3) { - initialize_action_options(&options); + }else if (id == 3) { // 6.3 Get failure - invalid resoure URI WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); @@ -93,8 +101,7 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i char *resource_uri = ws_xml_get_node_text(r); response = ws_transfer_get(cl, resource_uri, options); xml_parser_doc_dump(stdout, response); - }else if (id == 4) { - initialize_action_options(&options); + }else if (id == 4) { // 6.4 Get failure (MaxEnvelop exceeded) WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); @@ -102,8 +109,7 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i char *resource_uri = ws_xml_get_node_text(r); response = ws_transfer_get(cl, resource_uri, options); xml_parser_doc_dump(stdout, response); - }else if (id == 5) { - initialize_action_options(&options); + }else if (id == 5) { // 6.5 Get failure - invalid selectors WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); @@ -111,43 +117,70 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i char *resource_uri = ws_xml_get_node_text(r); response = ws_transfer_get(cl, resource_uri, options); xml_parser_doc_dump(stdout, response); - }else if (id == 8) { - initialize_action_options(&options); + }else if (id == 8) { // 7.1 Enumerate" WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); char *resource_uri = ws_xml_get_node_text(r); wsenum_enumerate_and_pull(cl, resource_uri , options, pull_items, NULL ); - }else if (id == 9) { - initialize_action_options(&options); + }else if (id == 9) { // 7.2 Optimized Enumerate + wsman_set_action_option(&options, FLAG_ENUMERATION_OPTIMIZATION); WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); char *resource_uri = ws_xml_get_node_text(r); wsenum_enumerate_and_pull(cl, resource_uri , options, pull_items, NULL ); - }else if (id == 10) { - initialize_action_options(&options); - wsman_set_action_option(&options, FLAG_ENUMERATION_OPTIMIZATION); + }else if (id == 10) { // 7.3 Enumerate failure WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); char *resource_uri = ws_xml_get_node_text(r); - wsenum_enumerate_and_pull(cl, resource_uri , options, pull_items, NULL ); - }else if (id == 11) { - initialize_action_options(&options); + WsXmlDocH e = wsenum_enumerate(cl, resource_uri , options ); + char *enumContext = wsenum_get_enum_context(e); + if (enumContext) { + response = wsenum_pull(cl, resource_uri, enumContext, options); + xml_parser_doc_dump(stdout, response); + WsXmlDocH response2 = wsenum_pull(cl, resource_uri, "xxxx", options); + if (response2) + xml_parser_doc_dump(stdout, response2); + } + }else if (id == 11) { // 7.4 Enumerate ObjectAndEPR + + wsman_set_action_option(&options, FLAG_ENUMERATION_ENUM_EPR); WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); char *resource_uri = ws_xml_get_node_text(r); wsenum_enumerate_and_pull(cl, resource_uri , options, pull_items, NULL ); - }else if (id == 12) { - initialize_action_options(&options); + }else if (id == 16) { // 7.9 Enumerate Polymorphism - wsman_set_action_option(&options, FLAG_ENUMERATION_ENUM_EPR); + wsman_set_action_option(&options, FLAG_POLYMORPHISM_NONE); WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); char *resource_uri = ws_xml_get_node_text(r); wsenum_enumerate_and_pull(cl, resource_uri , options, pull_items, NULL ); + }else if (id == 17) { // 8.1 Invoke + + WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); + WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); + WsXmlNodeH m = ws_xml_get_child(input, 0, NULL, "MethodName"); + char *resource_uri = ws_xml_get_node_text(r); + char *method = ws_xml_get_node_text(m); + wsman_add_selectors_list_from_node(input, &options); + response = wsman_invoke(cl, resource_uri, method, options); + xml_parser_doc_dump(stdout, response); + }else if (id == 18) { // 9.1 Put + + WsXmlNodeH input = ws_xml_get_child(scenario, 0, NULL, "Input"); + WsXmlNodeH r = ws_xml_get_child(input, 0, NULL, "ResourceURI"); + WsXmlNodeH k = ws_xml_get_child(input, 0, NULL, "PropertyName"); + WsXmlNodeH v = ws_xml_get_child(input, 0, NULL, "NewValue"); + char *resource_uri = ws_xml_get_node_text(r); + wsman_add_selectors_list_from_node(input, &options); + set_props(&options, ws_xml_get_node_text(k), ws_xml_get_node_text(v) ); + + response = ws_transfer_put(cl, resource_uri, options); + xml_parser_doc_dump(stdout, response); } return 0; @@ -227,7 +260,7 @@ int main(int argc, char** argv) WsXmlAttrH desc = ws_xml_get_node_attr(scenario, 0); char *attr_val = ws_xml_get_attr_value(desc); WsXmlAttrH supported = ws_xml_get_node_attr(scenario, 1); - if (strcmp(ws_xml_get_attr_value(supported), "true") == 0 ) { + if (strcmp(ws_xml_get_attr_value(supported), "true") == 0 ) { if (desc) { if (attr_val) printf("%s (%d)\n\n", attr_val, test_id ); -- cgit