Filter Dialects This Dell Technical White Paper provides information about use of filters in WSMan enumeration and subscription Dell Engineering April 2014 Abhirup Seal Chitrak Gupta 1 No Restrictions | Filter Dialects |
THIS WHITE PAPER IS FOR INFORMATIONAL PURPOSES ONLY, AND MAY CONTAIN TYPOGRAPHICAL ERRORS AND TECHNICAL INACCURACIES. THE CONTENT IS PROVIDED AS-IS, WITHOUT EXPRESS OR IMPLIED WARRANTIES OF ANY KIND. © 2014 Dell Inc. All rights reserved. Reproduction of this material in any manner whatsoever without the express written permission of Dell Inc. is strictly forbidden. For more information, contact Dell. Dell, the DELL logo, and the DELL badge are trademarks of Dell Inc.
Contents Executive Summary .......................................................................................................................................................................... 4 1 Introduction ................................................................................................................................................................................ 5 2 WS-Man Filters ..................................................................................................
Executive Summary This technical white paper is aimed at the customers of WS-Man API’s to understand the usage of filter dialects in enumeration and subscription requests. This document assumes that the reader has knowledge of the basic WS-Man specification and the usage. For detailed information about WS-Man protocol specification, refer to the WS-Man Specification (DSP-0226) at www.dmtf.org .
1 Introduction PowerEdge servers and chassis for modular servers, include management controllers, iDRAC and CMC (Chassis Management Controller). These controllers assist the system administrators to manage and monitor the chassis and servers. The management controllers provide functionality of management through GUI, CLI, and programmatic (WS-Man) interfaces. The WS-Man interface is a DMTF (Distributed Management Task Force) specification for systems management through Web Services architecture.
winrm e "http://schemas.dmtf.org/wbem/wscim/1/cimschema/2/DCIM_NICView?__cimnamespace=root/dcim" -u: -p: r:https:///wsman -encoding:utf-8 -a:basic -SkipCNcheck -SkipCAcheck filter:"{SlotLength = "0004" }" dialect:http://schemas.dmtf.org/wbem/wsman/1/wsman/SelectorFilter This example is a simple usage of a Selector Filter. The command indicates the required instances which match the specified filter, such as SlotLength = “0004”. 2.
Selector Filter can be used. The selector filter will enable the console to quickly query an instance based on a “Property=Value” expression. 2.2.1 Combining Selectors The example in section 2.1, indicates the use of one Selector Filter to filter the instances. However, multiple selectors can be provided in one Selector Query string for further filtration. The example here indicates the use of multiple selectors in an enumeration command, winrm e "http://schemas.dmtf.
2.3 Query Languages (CQL and WQL) CQL (CIM Query Language) and WQL (Windows Management Instrumentation Query Language) are languages derived from SQL with minor semantic changes. In WS-Man, both Enumeration and subscription can use the query languages to select a particular instances of a class. CQL is a DMTF standard and WQL is a Microsoft’s implementation of CQL. Familiarity with the syntax of SQL will ease the use of CQL or WQL.
http://www.dmtf.org/sites/default/files/standards/documents/DSP0202_1.0.0.pdf For details on WQL, go to http://msdn.microsoft.com/en-us/library/aa394606(v=vs.85).aspx 2.4 Dialects and Associations 2.4.1 What are Associations? Association classes describe the relation between two CIM classes. An association class has two major properties that link the classes with each other.
Associators operation is used to enumerate CIM Objects (Classes or Instances) that are associated to a particular source CIM Object. The following example indicates how the association classes of a source CIM Object, DCIM_ComputerSystem can be derived using a WinRM command. winrm e http://schemas.dell.
Selector: InstanceID = DCIM:SEL:1 Selector: __cimnamespace = root/dcim Dependent EndpointReference Address = http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous ReferenceParameters ResourceURI = http://schemas.dell.com/wbem/wscim/1/cimschema/2/DCIM_ComputerSystem SelectorSet Selector: Name = srv:system Selector: CreationClassName = DCIM_ComputerSystem Selector: __cimnamespace = root/dcim ... ... The corresponding SOAP request packet is given here, PAGE 12
2.4.3 References References operation is used to enumerate the association objects that refer to a particular target CIM Object (Class or Instance). It is quite similar to the Associators except for the fact that the associations are not listed, but all of the instances associated to the target CIM class instance is listed.
OperationalStatus = 2 OverwritePolicy = 7 RequestedState = 12 ... ... The corresponding SOAP request packet is given here. ... ... PAGE 143 Filtering on Subscriptions The Subscribe message allows a client to express interest in receiving events. Filters are used to identify the event or events a client wants to receive. The Subscription can be generic on a class of events or be specific to particular property in the class. 3.1 Subscription Management WS-Man specification defines a subscription-driven methodology for CIM indications.
The above SOAP packet includes the Filter tag which specifies the instances of the indication provider required when an event occurs. The WQL query can be modified to create a subscription for a particular job by adding the clause, WHERE JOB_ID=. The job id is typically a response received from the server after the user creates a job. 3.2 Usage from Different Consoles 3.2.1 Windows PowerShell WinRM as a tool does not provide support for Ws-events.
4 Fragment Transfer Fragment Transfer may also be an effective way to assist in filtering unnecessary data. In other transfer methods, transfer is done at instance level. However, Fragment Transfer enables to perform fragment or property level transfers while doing GET or ENUMERATION operation. In winrm, -fragment: should transfer only the property specified in option.
5 Conclusion The use of dialects in WS-Man SOAP requests enable the consoles to filter data based on the requirements. WS-Man responses may become large and difficult to manage. If the console requires particular instances matching certain conditions then filter dialect is a useful tool. This can be further improved by using Fragment Transfers which transfer only a particular property of a selected instance.
6 Appendix A List of abbreviations: 18 Acronym Definition EPR DMTF CIM CIM-OM End Point Reference, a selector set that uniquely identifies an object/instance.