Openwsman Users Guide

Openwsman is a project intended to provide an open-source implementation of the Web Services Management specification (WS-Management) and to expose system management information on the Linux operating system using the WS-Management protocol. WS-Management is based on a suite of web services specifications and usage requirements that exposes a set of operations focused on and covers all system management aspects.

The openwsman project is maintained by Intel's Open-Source Technology Center.

Introduction

This chapter deals with supported features and general architecture of openwsman.

CIM Binding in Openwsman

Openwsman supports the CIM data model using a special plugin which handles a CIM classes in a generic way. The mapping of the CIM data into WS-Management resources happens on the fly using the CIM binding guidelines published by the DMTF.

Currently the following features are supported:

Accounting for Different CIM Namespaces

A special Selector is defined to indicate the CIM namespace of the resource or resources for which the message is intended.

<wsman:Selector Name=”__cimnamespace”>xs:anyURI</wsman:Selector>

Using the command line client, the namespace can be set using the namespace option, for example:

wsman enumerate  http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem --port 8889 --username  wsman -p secret    -h somehost.example.com --namespace smash/ipmi

Enumeration

Polymorphism

Client and server support all three polymorphism modes:

  • None
  • IncludeSubClassProperties
  • ExcludeSubClassProperties

The following examples show the client request with the corresponding responses for !CIM_ComputerSystem. The example shows three providers with CIM_ComputerSystem derivative classes. The vendor namespaces are just examples and are not official.

WS-Eventing in Openwsman

In an implementation or environment supporting WS-Eveneting there are three actors:

  • Subscriber,
  • Event Source and
  • Event Sink.

The Event Sink subscribes an interest with the Event Source by operation contract, such as Subscribe. Event Source is responsible for controlling the information that Event
Sinks are interested in. The event sink can be the receiving end and the initiator of a subscription, however it is also possible that the subscription comes from a seperate component.

The Event Source can consist of two parts: Subscription Manager and Notification Manager. Subscription manager is responsible for managing a Subscription's
lifetime using operation contracts such as Unsubscribe, Renew and GetStatus while Notification Manager with the notification.

Processing Model of WS-Eventing

In this implementation openwsman acts as an Event Source, which is responsible for receiving a subscription from a subscriber and sending a notification to an event sink. As there are different events created by different applications in the real world, it is important to make this process as general as possible.

The solution is to put the specific eventing production in the plug-in part and intergrate shared WS-Eventing protocol process in the framework of openwsman. That is to say, the framework and plug-in act together to accomplish the process of WS-Eventing. This process model is shown below.

WS-Eveneting Architecture

In this process model, the Subscribe, Unsubscribe and Renew Interfaces act together as the Subscription Manager. The Ack and Pull Interfaces are part of the Notification Manager from the point of view of the event sink.

Subscription Manager

Workflow

When a subscription request is received, if it is a valid request, it will be saved in the subscription repository and in the memory at the same time and a response message will be returned with expiration time(if any) and corresponding subscription identifier. If it is not, an error message will be returned with causes.

Renew request message should include subscripton identifier which is returned by the subscription manager when subscription is made.

Unsubscribe request should include subscription identifier which is returned by the subscription manager when subscription is made.

Subscription Repository

Why is Subscription Repository needed?

There are mainly two reasons:

  • In many occasions, WS-Management working environment is distributed. When the Subscription Manager receives a subscribe request, it has to save this subscription to a Subscription Repository in another physical location, which can also be accessed by the Notification Manager.
  • If there is a subscription repository, the service will recover after restarting without loss of subscribed data.

Goal of implementation

Although we have to decide one kind of repository in our implementation, the implementation should be designed extensible. That is, it should be changed easily if another kind of repository is considered.

Related Data structures

To achieve this goal, callback functions are used. Fuction table of Subscription Repository operations will be registered in the __Soap object when the service finishes loading all plug-ins. The function table should include operations “load all subscriptions”, “get/update/save/delete a specific subscription”. Once the function table is registered, it can be used in the runtime late. If you want to implement a different repository, just change related subscriptions functions.

Related data structures are shown below:

  1. typedef int (*SubscriptionOpInit) (char *, void *);
  2. typedef int (*SubscriptionOpFinalize) (char *, void *);
  3. typedef int (*SubscriptionOpSave) (char *, char *, char *);
  4. typedef int (*SubscriptionOpDelete) (char *, char *);
  5. typedef int (*SubscriptionOpGet)(char *, char *, char *);
  6. typedef int (*SubscriptionOpSearch) (char *, char *);
  7. typedef int (*SubscriptionOpUpdate)(char *, char *, char *);
  8. typedef int (*SubscriptionOpLoad) (char *, list_t *);
  9. struct __SubsRepositoryEntry {
  10. char *strdoc;
  11. char *uuid;
  12. };
  13. typedef struct __SubsRepositoryEntry *SubsRepositoryEntryH;
  14. struct __SubsRepositoryOpSet{
  15. SubscriptionOpLoad load_subscription;
  16. SubscriptionOpGet get_subscription;
  17. SubscriptionOpSave save_subscritption;
  18. SubscriptionOpUpdate update_subscription;
  19. SubscriptionOpDelete delete_subscription;
  20. };

And we also need to add two fields in the __Soap structure:

  1. char *uri_subsRepository; //URI of repository
  2. SubsRepositoryOpSetH subscriptionOpSet; //Function talbe of Subscription Repository

Implementation of Local Subscription Repository

If you want another repository, just change related subscription operations. In this implementation a subscription is saved in a file with the name of UUID returned by the Notification Manager.

Definitions of local Subscription Repository operations:

  1. int LocalSubscriptionOpInit (char * uri_repository, void *opaqueData);
  2. int LocalSubscriptionOpFinalize(char * uri_repository, void *opaqueData);
  3. int LocalSubscriptionOpGet(char * uri_repository, char * uuid, char **subscriptionDoc);
  4. int LocalSubscriptionOpSearch(char * uri_repository, char * uuid);
  5. int LocalSubscriptionOpLoad (char * uri_repository, list_t * subscription_list);
  6. int LocalSubscriptionOpSave (char * uri_repository, char * uuid, char *subscriptionDoc);
  7. int LocalSubscriptionOpUpdate(char * uri_repository, char * uuid, char *expire);
  8. int LocalSubscriptionOpDelete (char * uri_repository, char * uuid);

Function tabre of local Subscription Repository operations:

  1. struct __SubsRepositoryOpSet subscription_repository_op_set = {LocalSubscriptionOpInit, LocalSubscriptionOpFinalize, LocalSubscriptionOpLoad, LocalSubscriptionOpGet, LocalSubscriptionOpSearch, LocalSubscriptionOpSave, LocalSubscriptionOpUpdate, LocalSubscriptionOpDelete};

Event Pool

The Event Pool is responsible for events storage. All events except heatbeats generated by the service are put here before they are sent eventually. Notification Manager gets events from Event Pool, while Plug-in adds events to it.

Event Pool

 

Notification Manager

A Notification defined in WS-Eventing can be a real event produced by the event source or a heartbeat event to be sent in a fixed interval. It is an obvious and reasonable idea to put the two functions in two separate threads. So the notification manager can be designed to consist of the notification manager and the heartbeat threads.

To decrease the memory footprintf, the implementation has a single notification manager thread for all notifications. The thread is created when the service is started. The notification mangager thread works for all notifications. It loops for ever until the service is stopped and detects whether there is an event. If an event is detected, a notification sender thread will be created to send the event to the event sink. The notification sender will quit after the send operation is finished. The notification manager is also responsible for subscriptions. If there is a subscription that is unsubscribed or expired, the notification manager will delete it from the memory. If the subscription is unsubscribed, the subscription data will also be deleted from the repository.

If heartbeat is requested in the “subscribe” message, a heartbeat event will be sent in a fixed interval if there is no event from the event source. The Heartbeat generator is also an independent loop thread strarted when the service launches. It generates all heartbeat events in the system. Like the notification manager thread, if there is a heartbeat event, the heartbeat generator will also create a notification sender to send the event to the event sink.

So the notification manager consists of a notification manager thread, a notification sender and the shared heartbeat generator.

Notification Manager

Installation

Currently the only supported way to install openwsman is via source released on sourceforge. Some distributions already include or plan to include openwsman as a package where you would use the package installation manager to install openwsman and its depenedencies.

Requirements

Most of the requirement are part of any modern Linux distribution and can be installed using the package installer that comes with your favorite Linux distribution. We recommend using recent Linux distribution as the project uses some recent features in the libraries.

  • libxml2 -- Libxml2 is the XML C parser and toolkit developed for the Gnome project. (You need to also install the development package of libxml2)
  • SBLIM SFCC -- Small Footprint CIM Client. You will need to checkout the source from SBLIM CVS and compile it before attempting to compile Openwsman.
  • other development packages like autoconf, automake etc.

CIMOM Requirements and Configuration

The current version of openwsman uses the sfcc (Small Foortprint CIM Client) to connect to any CIMOM running on the same host using cimxml. This is not optimal and comes with some overhead, however the intention of the project is to initially support all CIMOMs and there is no common protocol or client interface that can be used to talk to all available CIMOMs.

We have tested with two CIMOMs and all other CIMOMs with cimxml support should also work, the CIMOMs we have tested with are:

  • Openwbem -- OpenWBEM is an enterprise-grade open-source implementation of WBEM, written in C++, suitable for commercial and non-commercial applications. Openwbem is the default CIMOM in Novell products, especially SLES10. An experimental requesthandler for openwbem also exists. This handler uses the openwsman library to make openwbem accept WS-Management connection directly and without the openwsman service.
  • SBLIM SFC Broker -- The Small Footprint CIM Broker can be accessed either via the default CIMXML interface or using a local binary interface which works without CIMXML.

Installation of Openwsman from Source

Openwsman Source Repository

Openwsman uses Subversion for Code version control. The Openwsman repository is hosted at Sourceforge and provides read only access to everyone and read/write access to developers. You can either view the repository online on Sourceforge or using this site which keeps an uptodate mirror of the SourceForge repository.

In order to access a Subversion repository, you must install a special piece of software called a Subversion client. Subversion clients are available for most any operating system.

Subversion Access

This project's Sourceforge.net Subversion repository can be checked out through SVN with the following instruction set:

 svn co https://openwsman.svn.sourceforge.net/svnroot/openwsman openwsman

(Warning: This is a generic Subversion checkout command which will pull all modules, tags and/or branches of the project. Please refer to project home page for specific SVN instructions, or use "Browse Repository" link; in most cases, you will want to add '/trunk' to the HTTPS URL above to check out only trunk (main development line)).

Information about accessing this Subversion repository may be found in our document titled Subversion (Version Control for Source Code).

Browse the Subversion Tree

Though Subversion repositories are most commonly accessed using a special piece of software called a Subversion client, we also provide a web-based interface to view Subversion repositories. Browsing the Subversion tree gives you a great view into the current status of this project's code. You may also view the complete history of any file in the repository.

After checking out the project from Subversion run

./bootstrap

in the Top directory and follow that by running

./configure <options>.

If you download a packaged version (a compressed tar), then there is no need to run ./autoconfiscate and you will be able to run the configuration script directly.

Installation

After all packages are installed, compile the source and install (make and then make install).

To be able to put the configuration files under /etc/openwsman, run the configure script with the --sysconfdir option using the value /etc. If this option is not used, the default will be under PREFIX (/usr/local/etc ).

Openwsman Installation using RPM Packages

This section describes installation of openwsman and the needed CIM packages to provide a complete stack. In this document and other documents we use Openwbem as an example. Openwsman however supports all CIMOMs providing a cim-xml interface. Openwbem with the OMC packages (OMC Project) provide a complete set of providers to manage both hardware and software, thus they provide a good example for different usage models of the WS-Management protocol.

Openwsman Installation

Download the needed the RPMs for the distribution you are using. Currently we provide RPM packages for recent SUSE/Novell distributions in addition to FC4 and FC5.

The RPMs can be downloaded from the SuSE Build repository. The following RPM packages are needed:

  • openwsman
  • sblim-sfcc

CIMOM Back End

Installation and Configuration

Openwsman relies on a CIMOM as the back end for providing system information. Openwsman currently uses the SBLIM CIM client library which connects to major CIMOMs supporting cimxml or connects using a local interface to the SFC Broker.

While there is an added communication overhead using this library, the main purpose of the intial release of Openwsman is to implement the WS-Management specification. Later, better integration with CIMOMs is planned.

To get started, install a CIMOM with cimxml support and make sure it does support HTTP. For the authentication, make sure you follow one of the scnarios:

  • Allow anonymous connections (usefull only for testing), this way you can use either BASIC or DIGEST with openwsman.
  • Enable PAM authentication if Openwsman is also configured it. This way, both Openwsman and the CIMOM will use PAM.
  • Use the same BASIC password file for both the CIMOM and Openwsman.

Once the CIMOM is up and running, make sure you can access the classes using a WBEM client (e.g. wbemcli from the SBLIM project or the python client from OMC). If the classes are accessible then you are ready to use openwsman with the CIMOM.

Namespaces

Because Openwsman can be used by multiple vendors, the configuration file provides a way to define the vendor specific namespaces and how they corrospond to the CIM classes provided in the CIMOM. See the section about the configuration file for more details.

Configuration and Running Openwsman

This sections guides you through the configuration and initial setup of the openwsman service.

Configuration File Options

Openwsman uses an ini style configuration file for all components (server, client and plugins). Currently, the following options are supported

Server

The example below shows a typical server configuration.

[server]
port = 8889
#ssl_port = 8888
ssl_cert_file = /etc/openwsman/servercert.pem
ssl_key_file = /etc/openwsman/serverkey.pem
digest_password_file = /etc/openwsman/digest_auth.passwd
basic_password_file = /etc/openwsman/simple_auth.passwd
min_threads = 1
max_threads = 4
#use_digest is OBSOLETED, see below.
#
# Authentication backend for BASIC authentication. Default is to read a configuration file defined with 'basic_password_file'
#
#basic_authenticator = libwsman_pam_auth.so
#basic_authenticator_arg = openwsman

Authentication and Password Files

The password files for BASIC and DIGEST can be created with the htpasswd and htdigest utilities. Both utilities usually come with Apache packages on Linux distributions.

The realm for openwsman has to be OPENWSMAN. An example password file for DIGEST with one entry:

wsman:OPENWSMAN:5a659df1ac36d2f4eb84092145532919

If both password files for basic and digest authentication are defined then both methods will be offered by the service. The client will automatically connect using the strongest authentication method.

Authentication Plugins

Authentication plug-ins support only Basic authentication. DIGEST authentication support is only available using a password file created with htdigest or similar utilities.

Plain Text Plugins

Is the default plug-in used in Openwsman and provides access to a password file generated with htpasswd or similar utilities.

PAM Plugin

To activate PAM authentication, enable the PAM authentication plug-in the configuration file and provide the name of the PAM service. The service configuration has to be provided as a file in the /etc/pam.d directory and can for example have the following contents:

/etc/pam.d/openwsman:

#%PAM-1.0
auth       required     pam_unix2.so    nullok
auth       required     pam_nologin.so
account    required     pam_unix2.so
password   required     pam_pwcheck.so  nullok
password   required     pam_unix2.so    nullok use_first_pass use_authtok
session    required     pam_unix2.so    none

Client

[client]
port = 8889
agent = openwsman 0.3.2

CIM Plugin

Until recently, the namespace in the resource URI (the part of the url before the class name) was very flexible. You could request something like that:

http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem (valid) and http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/Linux_ComputerSystem (invalid)

and both would work.

Now this does not work anymore. For CIM base classes you should use the DMTF namespace, for others you can specify the namespace in the configuration file. Depending on your CIM providers there might be no CIM/WSMan namespace available, so you can make something up, the list of namespaces I have as an example:

vendor_namespaces =
OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,
Linux=http://sblim.sf.net/wbem/wscim/1/cim-schema/2,
OMC=http://schema.omc-project.org/wbem/wscim/1/cim-schema/2,
REEF=http:///reef.sblim.sf.net/wbem/wscim/1/cim-schema/2,
CWS=http:///cws.sblim.sf.net/wbem/wscim/1/cim-schema/2

So the above Linux_ComputerSystem resource URI should actually be:

http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_ComputerSystem
[cim]
default_cim_namespace = root/cimv2
# The following are in part fake namespaces for some publicly available CIM implementations.
vendor_namespaces = OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,Linux=http://sblim.sf.net/wbem/wscim/1/cim-schema/2,OMC=http://schema.omc-project.org/wbem/wscim/1/cim-schema/2 

Running the Openwsman Service

The server can run as a daemon, which would require root access; But it can be run in the foreground with debugging messages printed to stdout as well. This is the help output when you run the daemon:

# /usr/sbin/wsmand --help
Usage:
wsmand [Option...] WS-Management Server
Help Options
-?, --help
Application Options
-n, --no-plugins                                Do not load any plugins
-S, --ssl                                       Work through SSL port
-d, --debug                                     Start daemon in foreground and turn on debugging
-s, --syslog=0-6                                Set the verbosity of syslog output.
-c, --config-file=<file>                        Alternate configuration file
-p, --pid-file=<file>                           PID file

Openwsman Command-Line Client

The command line client uses openwsman client interface and API to provide a utility for testing and accessing WS-Management information from the command line.

Using the command line client

The command line utility uses the client interface of the openwsman library and supports all features accepted by service in addition to experiemntal feature currently not available in the Openwsman service (Fragment level transfer and Filtering).

To view all support options, run the client with the --help-all option.

The client requires an action, a resource uri and additional options to connect and authenticate with the server.

wsman [Option...] <action> <Resource Uri>

Note that the Identify request does not require any Resource Uri.

 

Using WS-Eventing

Introduction

This HOWTO was to create a demo for MDC, see the slides for more information.

Configure indication provider setting in CIMOM

First, download the latest sfcbd source code from SBLIM project repository. The latest sfcbd has some bugs fixed which enables WS-Eventing features in OpenWSMAN to run smoothly. Compile it with indication enabled and install it in your system. It is assumed that you have an indication provider – 'libprocessIndication.so', a corresponding registry file – "processIndication.reg", and a MOF file (if it is necessary). The content of registry file is like the following:

  1. [CIM_ProcessIndication]
  2. provider: CPUUsage
  3. location: processIndication
  4. type: indication
  5. namespace: root/cimv2

Steps to register a new indication provider in sfcbd are:

 

Configure indication source namespace setting in OpenWSMAN

If the indication namespace is different from CIM namespace defined in openwsman.conf or what you specify in wsmancli through the option “--namespace”, add indication source namespace configuration in OpenWSMAN configuration file. For example, if default_cim_namespace = root/interop, then we should add another option “indication_source_namespace = root/cimv2” in cim section of openwsman.conf in this case.

Run wseventsink utility as an event sink

Run wseventsink as an event sink. Utility wseventsink accepts incoming events and prints them to stdout. Default service path is /eventsink and port is 80.

Run wsmancli to subscribe

Push delivery mode, 2 seconds heartbeat and 3600 seconds expiration

Run command:

wsman subscribe http://schemas.dmtf.org/wbem/wscim/1/* -x "SELECT * FROM CIM_ProcessIndication" -D "http://schemas.microsoft.com/wbem/wsman/1/WQL" -Z http://127.0.0.1:80/eventsink  --namespace=root/interop -r 600 -H 2 -u wsmantest -p wsmantest -h localhost -G push –R

We will see incoming events from wseventsink. If there is no real event from indication provider, heartbeat events will be sent every 2 seconds.

PushWithAck delivery mode

Run command:

wsman subscribe http://schemas.dmtf.org/wbem/wscim/1/* -x "SELECT * FROM CIM_ProcessIndication" -D "http://schemas.microsoft.com/wbem/wsman/1/WQL"; -Z http://127.0.0.1:80/eventsink  --namespace=root/interop -r 600 -H 2 -u wsmantest -p wsmantest -h localhost -G pushwithack –R

We will see incoming real events and heartbeats from wseventsink. This delivery mode demands acknowledgement from event sink. If wseventsink is closed, this subscription will be terminated by openwsman when it cannot receive acknowledgment.

Batched delivery mode

Run command:

wsman subscribe http://schemas.dmtf.org/wbem/wscim/1/* -x "SELECT * FROM CIM_ProcessIndication" -D "http://schemas.microsoft.com/wbem/wsman/1/WQL" –Z http://127.0.0.1:80/eventsink  --namespace=root/interop -r 600 -H 2 -u wsmantest -p wsmantest -h localhost -G events –R

This delivery mode provides a way to deliver multiple events in a single SOAP event message. It also needs acknowledgement from event sink. The subscription will be terminated if Openwsman cannot receive acknowledgment of an event.

Pull delivery mode

wsman subscribe http://schemas.dmtf.org/wbem/wscim/1/* -x "SELECT * FROM CIM_ProcessIndication" -D "http://schemas.microsoft.com/wbem/wsman/1/WQL" -Z http://127.0.0.1:80/eventsink  --namespace=root/interop -r 600 -u wsmantest -p wsmantest -h localhost -G pull –R

This delivery mode borrows the wsen:Pull message to retrieve events from the logical queue. If the returned subscription response is like the following:

  1. <s:envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration">
  2. <s:header>
  3. <wsa:to>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:to>
  4. <wsa:action>http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse</wsa:action>
  5. <wsa:relatesto>uuid:1f557836-3ec7-1ec7-8002-6ae2ccb7d000</wsa:relatesto>
  6. <wsa:messageid>uuid:1f756cda-3ec7-1ec7-955e-6ae2ccb7d000</wsa:messageid>
  7. </s:header>
  8. <s:body>
  9. <wse:subscriberesponse>
  10. <wse:subscriptionmanager>
  11. <wsa:address>http://localhost:8889/wsman</wsa:address>
  12. <wsa:referenceparameters>
  13. <wse:identifier>uuid: 26dca9cb-3ec7-1ec7-8002-6ae2ccb7d000</wse:identifier>
  14. </wsa:referenceparameters>
  15. </wse:subscriptionmanager>
  16. <wse:expires>PT600.000000S</wse:expires>
  17. <wsen:enumerationcontext>uuid: 26dca9cb-3ec7-1ec7-8002-6ae2ccb7d000</wsen:enumerationcontext>
  18. </wse:subscriberesponse>
  19. </s:body>
  20. </s:envelope>

Then, corresponding command to pull events is shown below:

  1. wsman pull <a href="http://schemas.dmtf.org/wbem/wscim/1/*" title="http://schemas.dmtf.org/wbem/wscim/1/*">http://schemas.dmtf.org/wbem/wscim/1/*</a> -U uuid:26dca9cb-3ec7-1ec7-8002-6ae2ccb7d000 -u wsmantest -p wsmantest -h localhost

If there is an event in the queue, the response will be like the following:

  1. <s:envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n1="http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/CIM_ProcessIndication">
  2. <s:header>
  3. <wsa:action>http://schema.omc-project.org/wbem/wscim/1/cim-schema/2/CIM_ProcessIndication</wsa:action>
  4. <wsa:messageid>uuid:2782e580-3ec7-1ec7-8004-6ae2ccb7d000</wsa:messageid>
  5. <wsa:relatesto>uuid:2782ce67-3ec7-1ec7-8002-6ae2ccb7d000</wsa:relatesto>
  6. </s:header>
  7. <s:body>
  8. <wsen:pullresponse>
  9. <wsen:enumerationcontext>uuid:26dca9cb-3ec7-1ec7-8002-6ae2ccb7d000</wsen:enumerationcontext>
  10. <n1:cim_processindication>
  11. <n1:indicationidentifier>
  12. ChangeOfUsers
  13. </n1:indicationidentifier>
  14. <n1:indicationtime>
  15. </n1:indicationtime>
  16. <n1:classname>
  17. </n1:classname>
  18. </n1:cim_processindication>
  19. </wsen:pullresponse>
  20. </s:body>
  21. </s:envelope>

If there is no event in the queue, the response will be like:

  1. <s:envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
  2. <s:header>
  3. <wsa:to>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:to>
  4. <wsa:action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</wsa:action>
  5. <wsa:relatesto>uuid:3002e928-3ec7-1ec7-8002-6ae2ccb7d000</wsa:relatesto>
  6. <wsa:messageid>uuid:3002ffb9-3ec7-1ec7-8005-6ae2ccb7d000</wsa:messageid>
  7. </s:header>
  8. <s:body>
  9. <s:fault>
  10. <s:code>
  11. <s:value>s:Receiver</s:value>
  12. <s:subcode>
  13. <s:value>wsman:TimedOut</s:value>
  14. </s:subcode>
  15. </s:code>
  16. <s:reason>
  17. <s:text xml:lang="en">The operation has timed out.</s:text>
  18. </s:reason>
  19. </s:fault>
  20. </s:body>
  21. </s:envelope>

Renew a Subscription

If the returned subscription Identifier is uuid: 26dca9cb-3ec7-1ec7-8002-6ae2ccb7d000, renew this subscription to 200 seconds.

  1. wsman renew -i uuid: 26dca9cb-3ec7-1ec7-8002-6ae2ccb7d000 -r 200 -u wsmantest -p wsmantest -h localhost

Unsubscribe a subscription

If the returned subscription Identifier is uuid: 26dca9cb-3ec7-1ec7-8002-6ae2ccb7d000, renew this subscription to 200 seconds.

  1. wsman unsubscribe -i uuid:569f6af6-3ec7-1ec7-8002-6ae2ccb7d000 --namespace=root/interop -u wsmantest -p wsmantest -h localhost

Demonstrate that a subscription is terminated if there is no acknowledgment from event sink.

If the delivery mode of a subscription is “pushwithack” or “events”, no acknowledgement from event sink will cause it to be terminated

Appendices

All other topics related to the project.

Vista WinRM over OpenWSMAN Setup

Windows Remote Management is one component of Windows Hardware Management features that manage server hardware locally and remotely.

WinRM Client Configuration

  • Install Vista RC1 or higher.
  • Activate “Command Prompt” window with “Administrator privilege.”
  • Click through to Start/All Programs/Accessories
  • Right-click on Command Prompt
  • Click on Run as administrator
  • Press Continue button.
  • Run the following “winrm” commands in the command prompt window to change the default settings:
    winrm set winrm/config/client/auth @{Basic="true"} 
    	
    winrm set winrm/config/client  @{AllowUnencrypted="true"}
    	
    winrm set winrm/config/client  @{TrustedHosts="192.168.1.100"} 
    	

Note: Replace the 192.168.1.100 with the host address of the server hosting the target OpenWSMAN service.

WinRM Service Configuration

  • Run the following “winrm” commands in the command prompt window to enable WinRM firewall exception:
    winrm quickconfig
    	
  • Additionaly, security needs to be untightened bu enabling Basic Authentication and enabling encypred communication (required for testing only):
    winrm set winrm/config/service/auth @{Basic="true"} 
    	
    winrm set winrm/config/service  @{AllowUnencrypted="true"}
    	

WinRM over Openwsman Test

Verify the OpenWSMAN service is running on the target server. Run the following “winrm command” to test the connection:

winrm enumerate http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem -username:wsman -password:secret -r:143.166.157.213:8889/wsman -auth:basic

Output should look something like:

CIM_ComputerSystem
Name = ZPB9K34
CreationClassName = CIM_ComputerSystem
NameFormat = 'other'
Dedicated = null
ResetCapability = 1
PrimaryOwnerName = null
PrimaryOwnerContact = null
EnabledState = 2
OtherEnabledState = null
RequestedState = 2
EnabledDefault = 2
TimeOfLastStateChange = null
InstallDate = null
OperationalStatus = null
Status = null
HealthState = 25
Caption = null
Description
ElementName = server1.domain.com