diff options
author | Anas Nashif <nashif@intel.com> | 2006-12-07 22:04:12 +0000 |
---|---|---|
committer | Anas Nashif <nashif@intel.com> | 2006-12-07 22:04:12 +0000 |
commit | 92999888aca22092ccafe3d9c379dd12c6eae4ae (patch) | |
tree | 5a7b719fa61649ed489bd32f064d5cca16446156 /tests/interop/interop.c | |
parent | a73c08946be944794a446c0409a8a97ecf538b14 (diff) | |
download | wsmancli-92999888aca22092ccafe3d9c379dd12c6eae4ae.tar.gz wsmancli-92999888aca22092ccafe3d9c379dd12c6eae4ae.tar.xz wsmancli-92999888aca22092ccafe3d9c379dd12c6eae4ae.zip |
improved examples with new functions
Diffstat (limited to 'tests/interop/interop.c')
-rw-r--r-- | tests/interop/interop.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/interop/interop.c b/tests/interop/interop.c index 97cb795..2aa6afc 100644 --- a/tests/interop/interop.c +++ b/tests/interop/interop.c @@ -29,12 +29,12 @@ typedef enum { static set_props(actionOptions *op, char *k, char *v) { - hash_t *h = hash_create(HASHCOUNT_T_MAX, 0, 0); + op->properties = hash_create(HASHCOUNT_T_MAX, 0, 0); - if ( !hash_alloc_insert(h, k, v)) { + if ( !hash_alloc_insert(op->properties, k, v)) { fprintf(stderr, "hash_alloc_insert failed"); } - op->properties = h; + //op->properties = h; } static void @@ -134,6 +134,7 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i wsenum_enumerate_and_pull(cl, resource_uri , options, pull_items, NULL ); }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); @@ -146,6 +147,7 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i if (response2) xml_parser_doc_dump(stdout, response2); } + */ }else if (id == 11) { // 7.4 Enumerate ObjectAndEPR @@ -177,6 +179,7 @@ static int run_interop_test (WsManClient *cl, WsXmlNodeH scenario, InteropTest i 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"); + printf("%s=%s\n", ws_xml_get_node_text(k), ws_xml_get_node_text(v) ); 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) ); @@ -264,7 +267,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 && test_id == 18 ) { if (desc) { if (attr_val) printf("%s (%d)\n\n", attr_val, test_id ); |