Stephen James Hurd > DMTF-WSMan-v0.05 > DMTF::WSMan

Download:
DMTF-WSMan-v0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.5.0   Source  

NAME ^

DMTF::WSMan - Implements the WS-Management Protocol

VERSION ^

This document describes DMTF::WSMan version 0.05

SYNOPSIS ^

  use DMTF::WSMan;

  my $wsman = DMTF::WSMan->new(user=>'user', pass=>'pass', port=623, protocol='http', host='example.com');
  my $xml = $wsman->get( epr=>{
      ResourceURI=>'http://example.org/management/instance',
      SelectorSet=>{
          ID=>'Instance21',
      },
  });

DESCRIPTION ^

This module provides access to the WS-Management protocol, but is not intended to be used directly. The returns types are generally XML strings as are many of the arguments. Refer to DMTF::CIM for full usage.

INTERFACE ^

Many of the following methods take an EPR argument. The EPR is simply a hashref with at least a ResourceURI element and optionally a SelectorSet hashref element.

METHODS

new( [user=>user,] [pass=>password,] [port=>port,] [protocol=protocol,] [host=>hostname,] );

Creates a new WS-Management context optionally specifying various connection parameters.

user=>user (default is 'Administrator')

Specifies the user ID to use with autentication.

pass=>password

Specifies the password to use with autentication.

host=>hostname (no default)

Specifies the host that will be connected to.

port=>port (default is 623)

Sets the TCP port that will be connected to.

protocol=>protocol (default is 'http')

Specifies the HTTP protocol that will be used. Valid values are:

http - Uses plain-text HTTP protocol
https - Uses HTTP over TLS for an encrypted session
get( epr=>epr )

Returns the response from a Get operation.

put( epr=>epr, body=>object )

Returns the response from a Put operation. The body argument is the complete contents of the SOAP body element.

delete( epr=>epr );

Returns the response from a Delete operation.

create( epr=>epr, body=>object );

Returns the response from a Create operation. The body argument is the complete contents of the SOAP body element.

invoke( epr=>epr, body=>object, method=>method );

Returns the response from a custom method invocation. When a method is provided, the action is constructed by appending "/" and the specified method to the end of the ResourceURI in the EPR.

enumerate( epr=>epr, filter=>filterxml, mode=>EnumerateObjects );

Returns all the responses to both an Emumerate and all the successive Pull operations to complete an enumeration.

The filter is included directly in the XML so must include the appropriate filter tags.

Mode specifies the enumeration mode. Available values are: 'EnumerateObject', 'EnumerateEPR', 'EnumerateObjectAndEPR'

get_selectorset_xml( epr )

Returns an XML representation of the SelectorSet tag constructed from the passed EPR using the same XML namespaces and prefixes that will be used in the actual message.

epr_to_xml( epr )

Returns an XML representation constructed from the passed EPR using the same XML namespaces and prefixes that will be used in the actual message.

DIAGNOSTICS ^

This module will carp() on errors and return undef or an empty list.

CONFIGURATION AND ENVIRONMENT ^

DMTF::WSMan requires no configuration files or environment variables.

DEPENDENCIES ^

Data::UUID (available from CPAN)
LWP (part of perl libwww)
LWP::Authen::Digest (part of perl libwww)

INCOMPATIBILITIES ^

None reported.

BUGS AND LIMITATIONS ^

No bugs have been reported.

Please report any bugs or feature requests to bug-dmtf-wsman@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR ^

Stephen James Hurd <shurd@broadcom.com>

LICENCE AND COPYRIGHT ^

Copyright (c) 2012, Broadcom Corporation <shurd@broadcom.com>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY ^

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

syntax highlighting: