summaryrefslogtreecommitdiffstats
path: root/examples/cpp/GetInstance.cpp
diff options
context:
space:
mode:
authorAnas Nashif <nashif@intel.com>2007-02-11 23:59:19 +0000
committerAnas Nashif <nashif@intel.com>2007-02-11 23:59:19 +0000
commitcba573282de40d22c4d14ea8280b563e86c4a61b (patch)
treea244c81821658f58595a57790c18a69072ea29d2 /examples/cpp/GetInstance.cpp
parent74c5d61a0589f794b0545b8712d416502ad0428a (diff)
downloadwsmancli-cba573282de40d22c4d14ea8280b563e86c4a61b.tar.gz
wsmancli-cba573282de40d22c4d14ea8280b563e86c4a61b.tar.xz
wsmancli-cba573282de40d22c4d14ea8280b563e86c4a61b.zip
one more example for Get
Diffstat (limited to 'examples/cpp/GetInstance.cpp')
-rw-r--r--examples/cpp/GetInstance.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/cpp/GetInstance.cpp b/examples/cpp/GetInstance.cpp
new file mode 100644
index 0000000..965fccc
--- /dev/null
+++ b/examples/cpp/GetInstance.cpp
@@ -0,0 +1,16 @@
+#include <iostream>
+#include <cpp/WsmanClient.h>
+
+using std::cout;
+
+using namespace WsmanClientNamespace;
+int main(int argc, char* argv[])
+{
+ WsmanClient client = WsmanClient("http://wsman:secret@192.168.1.41:8889/wsman");
+ NameValuePairs selectors = NameValuePairs();
+ selectors["CreationClassName"] = "CWS_Instance";
+ selectors["Id"] = "Instance #1";
+ string r = client.Get("http:///cws.sblim.sf.net/wbem/wscim/1/cim-schema/2/CWS_Instance", &selectors );
+ cout << "resource: \n" << r << "\n";
+ return 0;
+}