summaryrefslogtreecommitdiffstats
path: root/src/wsman.c
diff options
context:
space:
mode:
authorAnas Nashif <nashif@intel.com>2007-05-17 05:07:00 +0000
committerAnas Nashif <nashif@intel.com>2007-05-17 05:07:00 +0000
commit64f71ce22352d06abaec4f83c1530b3ec02440ef (patch)
tree9cc84923c075a117bbbfb23015cb9149c9b8b67f /src/wsman.c
parent5cef6368c06e3f1775943aa7c837f7676165569a (diff)
downloadwsmancli-64f71ce22352d06abaec4f83c1530b3ec02440ef.tar.gz
wsmancli-64f71ce22352d06abaec4f83c1530b3ec02440ef.tar.xz
wsmancli-64f71ce22352d06abaec4f83c1530b3ec02440ef.zip
use endpoint option
Diffstat (limited to 'src/wsman.c')
-rw-r--r--src/wsman.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/wsman.c b/src/wsman.c
index 58a690a..4034e75 100644
--- a/src/wsman.c
+++ b/src/wsman.c
@@ -59,6 +59,7 @@ static const char **wsman_argv = NULL;
static int server_port = 0;
static char *cafile = NULL;
+static char *endpoint = NULL;
static char *username = NULL;
static char *password = NULL;
static char *server = "localhost";
@@ -146,6 +147,8 @@ char wsman_parse_options(int argc, char **argv)
"Password", "<password>"},
{"hostname", 'h', U_OPTION_ARG_STRING, &server,
"Host name", "<hostname>"},
+ {"endpoint", 'b', U_OPTION_ARG_STRING, &endpoint,
+ "End point", "<url>"},
{"port", 'P', U_OPTION_ARG_INT, &server_port,
"Server Port", "<port>"},
{"proxy", 'X', U_OPTION_ARG_STRING, &proxy,
@@ -453,12 +456,16 @@ int main(int argc, char **argv)
debug("Certificate: %s", cafile);
- cl = wsmc_create(server,
- server_port,
- url_path,
- cafile? "https" : "http",
- username,
- password);
+ if (endpoint) {
+ cl = wsmc_create_from_uri(endpoint);
+ } else {
+ cl = wsmc_create(server,
+ server_port,
+ url_path,
+ cafile? "https" : "http",
+ username,
+ password);
+ }
wsmc_transport_set_auth_request_func(cl , &request_usr_pwd );