summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.in1
-rw-r--r--examples/.cvsignore8
-rw-r--r--examples/Makefile.am28
-rw-r--r--examples/win32_service.c (renamed from src/win32_service.c)0
-rw-r--r--examples/wsmid_identify.c (renamed from src/wsmid_identify.c)0
-rw-r--r--src/Makefile.am16
-rw-r--r--src/wsman.c2
-rw-r--r--tests/cunit/enumeration.c3
-rw-r--r--tests/cunit/pull.c74
-rw-r--r--wsmancli.spec.in1
11 files changed, 52 insertions, 83 deletions
diff --git a/Makefile.am b/Makefile.am
index 79f6d9c..9758187 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src tests
+SUBDIRS = src examples tests
package: dist
cp wsmancli.spec /usr/src/packages/SPEC
diff --git a/configure.in b/configure.in
index 4f17a3e..3d3bcc8 100644
--- a/configure.in
+++ b/configure.in
@@ -23,6 +23,7 @@ AC_OUTPUT([
wsmancli.spec
Makefile
src/Makefile
+ examples/Makefile
tests/Makefile
tests/cunit/Makefile
])
diff --git a/examples/.cvsignore b/examples/.cvsignore
new file mode 100644
index 0000000..884b0f3
--- /dev/null
+++ b/examples/.cvsignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+wsman
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 0000000..dc85a24
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,28 @@
+AM_CFLAGS = @CFLAGS@
+
+wsman_LDADD = \
+ $(OPENWSMAN_LIBS)
+
+CFLAGS = \
+ $(OPENWSMAN_CFLAGS)
+
+LDADD = \
+ $(OPENWSMAN_LIBS)
+
+wsman_SOURCES = wsman.c \
+ wsman-client-options.c \
+ wsman-client-options.h
+
+wsmid_identify_SOURCES = \
+ wsmid_identify.c
+
+wsman_service_SOURCES = \
+ win32_service.c
+
+bin_PROGRAMS = \
+ wsman \
+ wsmid_identify \
+ win32_service
+
+
+
diff --git a/src/win32_service.c b/examples/win32_service.c
index 8e54cba..8e54cba 100644
--- a/src/win32_service.c
+++ b/examples/win32_service.c
diff --git a/src/wsmid_identify.c b/examples/wsmid_identify.c
index 98d65cd..98d65cd 100644
--- a/src/wsmid_identify.c
+++ b/examples/wsmid_identify.c
diff --git a/src/Makefile.am b/src/Makefile.am
index d310fa0..f41f4c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,27 +6,15 @@ wsman_LDADD = \
CFLAGS = \
$(OPENWSMAN_CFLAGS)
-wsmid_identify_LDADD = \
- $(OPENWSMAN_LIBS)
-
-
-wsman_service_LDADD = \
+LDADD = \
$(OPENWSMAN_LIBS)
wsman_SOURCES = wsman.c \
wsman-client-options.c \
wsman-client-options.h
-wsmid_identify_SOURCES = \
- wsmid_identify.c
-
-wsman_service_SOURCES = \
- win32_service.c
-
bin_PROGRAMS = \
- wsman \
- wsmid_identify \
- win32_service
+ wsman
diff --git a/src/wsman.c b/src/wsman.c
index 265acd1..64bc59b 100644
--- a/src/wsman.c
+++ b/src/wsman.c
@@ -282,8 +282,8 @@ int main(int argc, char** argv)
if (wsman_options_get_optimize_enum())
{
wsman_set_action_option(&options, FLAG_ENUMERATION_OPTIMIZATION);
- options.max_elements = wsman_options_get_max_elements();
}
+ options.max_elements = wsman_options_get_max_elements();
if (wsman_options_get_estimate_enum()) {
wsman_set_action_option(&options, FLAG_ENUMERATION_COUNT_ESTIMATION);
diff --git a/tests/cunit/enumeration.c b/tests/cunit/enumeration.c
index 6b9455e..9126b7e 100644
--- a/tests/cunit/enumeration.c
+++ b/tests/cunit/enumeration.c
@@ -266,9 +266,8 @@ static void enumeration_test() {
goto RETURN;
}
check_response_header(enum_response, wsman_get_client_response_code(cl),
- "http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse");
+ ENUM_ACTION_ENUMERATERESPONSE);
-http://schemas.xmlsoap.org/ws/2004/08/addressing/fault
if (_debug) wsman_output(enum_response);
if (tests[i].filters == NULL) {
diff --git a/tests/cunit/pull.c b/tests/cunit/pull.c
index 282677d..bcef3bb 100644
--- a/tests/cunit/pull.c
+++ b/tests/cunit/pull.c
@@ -49,6 +49,11 @@
#include "common.h"
+static char *filters2[] = {
+ "/s:Envelope/s:Body/wsen:PullResponse/wsman:Items/wsa:EndpointReference/wsa:Address",
+ NULL,
+ NULL, NULL,
+};
@@ -80,7 +85,7 @@ static TestData pull_tests[] = {
NULL,
200,
FLAG_ENUMERATION_OPTIMIZATION,
- 200
+ 0
},
{
"Pull. Enumeration (Optimized/EPR/Count)",
@@ -95,7 +100,7 @@ static TestData pull_tests[] = {
200,
FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_ENUM_EPR |
FLAG_ENUMERATION_COUNT_ESTIMATION ,
- 200
+ 10
},
{
"Pull. Enumeration (Optimized/EPR)",
@@ -109,7 +114,7 @@ static TestData pull_tests[] = {
NULL,
200,
FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_ENUM_EPR,
- 200
+ 10
},
{
"Pull. Enumeration (Optimized/ObjEPR)",
@@ -123,7 +128,7 @@ static TestData pull_tests[] = {
NULL,
200,
FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_ENUM_OBJ_AND_EPR,
- 200
+ 10
},
{
"Pull. Enumeration with valid Resource URI and Items Count Estimation.",
@@ -138,66 +143,7 @@ static TestData pull_tests[] = {
200,
FLAG_ENUMERATION_COUNT_ESTIMATION,
0
- }, /*
- {
- "Enumeration with valid Resource URI.",
- "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem",
- NULL,
- 200,
- FLAG_NONE,
- 0
- },
- {
- "Enumeration with valid Resource URI and additional invalid selectors.",
- "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem",
- NULL,
- 200,
- FLAG_NONE,
- 1
- },
- {
- "Enumeration with valid Resource URI/Count Estimation.",
- "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem",
- NULL,
- 200,
- FLAG_ENUMERATION_COUNT_ESTIMATION,
- 0
- },
- {
- "Enumeration with valid Resource URI/Optimization.",
- "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem",
- NULL,
- 200,
- FLAG_ENUMERATION_OPTIMIZATION,
- 0
- },
- {
- "Enumeration with Count Estimation/Optimzation and get all elements.",
- "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem",
- NULL,
- 200,
- FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_COUNT_ESTIMATION,
- 10
-
- },
- {
- "Enumeration with Count Estimation/Optimzation/Epr and get all elements.",
- "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem",
- NULL,
- 200,
- FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_COUNT_ESTIMATION | FLAG_ENUMERATION_ENUM_EPR,
- 10
-
- },
- {
- "Enumeration with Count Estimation/Optimzation/ObjAndEpr and get all elements.",
- "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem",
- NULL,
- 200,
- FLAG_ENUMERATION_OPTIMIZATION | FLAG_ENUMERATION_COUNT_ESTIMATION | FLAG_ENUMERATION_ENUM_OBJ_AND_EPR,
- 10
-
- } */
+ }
};
diff --git a/wsmancli.spec.in b/wsmancli.spec.in
index bf4bbd8..69a50fa 100644
--- a/wsmancli.spec.in
+++ b/wsmancli.spec.in
@@ -31,4 +31,3 @@ rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(-,root,root)
%{_bindir}/wsman
-%{_bindir}/wsmid_identify