NAME

Net::OpenWBEM::Client - Perl interface to OpenWBEM client libraries


DESCRIPTION

Net::OpenWBEM::Client allows a Perl program to connect to a WBEM server as a client and make WBEM requests and invoke WBEM methods.

It builds on Net::OpenWBEM, which provides general WBEM objects and related methods.


SYNOPSIS

  use Net::OpenWBEM::Client;
  
  my $WBEM = Net::OpenWBEM::Client->session(host => "localhost");
  my $ns = 'root/cimv2';
  my $instanceEnum = $WBEM->enumInstancesE($ns, 'CIM_System');
  while ($instanceEnum->hasMoreElements)
  {
      my $ci = $instanceEnum->nextElement;
      print $ci->getStringProperty('Name'), "\n";
  }
  $WBEM->close;


CONSTRUCTOR

Use this to create a new handle to a WBEM server.

session() - create a new Net::OpenWBEM::CIMOMHandleIFCRef object

  $WBEM = Net::OpenWBEM::Client->session(
              [scheme     => $scheme,]
              [principal  => $username,]
              [credential => $password,]
              [host       => $hostname,]
              [port       => $port,]
              [namespace  => $namespace,]
          );
scheme
Specifies what protocol to use to connect to the server, and whether encryption (SSL) is used. For CIMXML use one of ``cimxml.wbem'', ``cimxml.wbems'', ``http'', or ``https''. For the OpenWBEM-specific binary protocol, use ``owbinary.wbem'' or ``owbinary.wbems''. The default is ``http''.

principal
(Optional) Specifies the username.

credential
(Optional) Specifies the password. If no principal is specified, this parameter is ignored.

host
Specifies what host to connect to. Default is ``localhost''.

port
Overrides the default port, which is dependent on the protocol/SSL setting.

The return value of this function is a handle to a CIMOMHandleIFCRef, which can be found documented in the Net::OpenWBEM manpage.


METHODS

The WBEM client object is a CIMOMHandleIFCRef object, which can be found documented in the Net::OpenWBEM manpage. The documentation there speaks in the context of a provider, but generally the same methods are available to a client.

In addition...

close() - close a WBEM client connection

  $WBEM->close();

Closes the connection to the CIMOM.


SEE ALSO

the Net::OpenWBEM manpage, the Net::OpenWBEM::Provider manpage


AUTHOR

Jason Long - jason@long.name


COPYRIGHT

This file is part of owperlprovider.

Copyright (c) 2004-2005 Jason Long. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.