Net::OpenWBEM::Client - Perl interface to OpenWBEM client libraries
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.
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;
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,] );
The return value of this function is a handle to a CIMOMHandleIFCRef, which can be found documented in the Net::OpenWBEM manpage.
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.
the Net::OpenWBEM manpage, the Net::OpenWBEM::Provider manpage
Jason Long - jason@long.name
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.