diff options
author | Vadim Revyakin <vadimr@intel.com> | 2006-11-14 13:26:54 +0000 |
---|---|---|
committer | Vadim Revyakin <vadimr@intel.com> | 2006-11-14 13:26:54 +0000 |
commit | 9747ff445a0a683620477b634d4f336c8754b053 (patch) | |
tree | 7828f63f899c59d7f1ef8c66a99002b349b15c9a /src | |
parent | f9becc449b696b8fe39ed53dfa4f5121723b81b3 (diff) | |
download | wsmancli-9747ff445a0a683620477b634d4f336c8754b053.tar.gz wsmancli-9747ff445a0a683620477b634d4f336c8754b053.tar.xz wsmancli-9747ff445a0a683620477b634d4f336c8754b053.zip |
Selectors in wsman arguments
Diffstat (limited to 'src')
-rw-r--r-- | src/wsman-client-options.c | 7 | ||||
-rw-r--r-- | src/wsman-client-options.h | 1 | ||||
-rw-r--r-- | src/wsman.c | 4 |
3 files changed, 12 insertions, 0 deletions
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" , "<size>" }, { "fragment", 'F', U_OPTION_ARG_STRING, &fragment, "Fragment (Supported Dialects: XPATH)" , "<fragment>" }, + { "selectors", 's', U_OPTION_ARG_STRING, &selectors, + "Selectors for fetching", "<name1=val1&name2=val2...>"}, { 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(); |