From 9747ff445a0a683620477b634d4f336c8754b053 Mon Sep 17 00:00:00 2001 From: Vadim Revyakin Date: Tue, 14 Nov 2006 13:26:54 +0000 Subject: Selectors in wsman arguments --- src/wsman-client-options.c | 7 +++++++ src/wsman-client-options.h | 1 + src/wsman.c | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'src') diff --git a/src/wsman-client-options.c b/src/wsman-client-options.c index 8116be9..3f4b7b2 100644 --- a/src/wsman-client-options.c +++ b/src/wsman-client-options.c @@ -89,6 +89,7 @@ static char *cim_namespace = NULL; static char *fragment = NULL; static char *wsm_filter = NULL; static char *wsm_dialect = NULL; +static char *selectors = NULL; static unsigned long operation_timeout = 0; static unsigned long max_envelope_size = 0; @@ -168,6 +169,8 @@ char wsman_parse_options(int argc, char **argv) "maximal envelope size" , "" }, { "fragment", 'F', U_OPTION_ARG_STRING, &fragment, "Fragment (Supported Dialects: XPATH)" , "" }, + { "selectors", 's', U_OPTION_ARG_STRING, &selectors, + "Selectors for fetching", ""}, { NULL } }; @@ -445,6 +448,10 @@ char * wsman_options_get_filter (void) { return wsm_filter; } +char * wsman_options_get_selectors(void) +{ + return selectors; +} char * wsman_options_get_dialect (void) { return wsm_dialect; diff --git a/src/wsman-client-options.h b/src/wsman-client-options.h index e18a6ad..130b9dd 100644 --- a/src/wsman-client-options.h +++ b/src/wsman-client-options.h @@ -37,6 +37,7 @@ extern char wsman_options_get_step_request (void); extern char wsman_options_get_estimate_enum (void); extern char * wsman_options_get_fragment (void); extern char * wsman_options_get_filter (void); +extern char * wsman_options_get_selectors (void); extern char * wsman_options_get_dialect (void); extern const char * wsman_options_get_config_file (void); extern unsigned long wsman_options_get_max_envelope_size (void); diff --git a/src/wsman.c b/src/wsman.c index 41e280a..2e98c5e 100644 --- a/src/wsman.c +++ b/src/wsman.c @@ -191,6 +191,10 @@ int main(int argc, char** argv) if (wsman_options_get_dialect()) { options.dialect = wsman_options_get_dialect(); } + if (wsman_options_get_selectors()) { + wsman_add_selectors_from_query_string(&options, + wsman_options_get_selectors()); + } options.properties = wsman_options_get_properties(); options.cim_ns = wsman_options_get_cim_namespace(); -- cgit