We get only one Instance with CIM_ComputerSystem_EnumInstances.pl

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

We get only one Instance with CIM_ComputerSystem_EnumInstances.pl

Kämpfe, Christiane

Hello OpenWS-MAN experts,

 

We want to use OpenWSMAN connections via Perl here to get enumeration lists.

 

We are beginners with openWSMAN (and right now layman's concerning Perl). We have here a RedHat 6.3

where openwsan.pm was already integrated.

With this we tried the test script  CIM_ComputerSystem_EnumInstances.pl (of version 2.3.0) with a different Class where we know

that there exist more than one instance of this class (Check with wsman command).

 

The problem: At the end of the script only one instance was printed !

 

With debug the pull seems to get more than one snipplet … it looks for us that way but we are no experts

 

Here a snippet of the debug:

Aug 22 12:58:40 [6796] *****set post buf len = 968******

Aug 22 12:58:40 [6796] write_handler: recieved 2029 bytes, all = 2029

 

Aug 22 12:58:40 [6796] curl error code: 0.

Aug 22 12:58:40 [6796] cl->response_code: 200.

Aug 22 12:58:40 [6796] cl->last_error code: 0.

Aug 22 12:58:40 [6796] *****set post buf len = 968******

Aug 22 12:58:40 [6796] write_handler: recieved 2029 bytes, all = 2029

 

Aug 22 12:58:40 [6796] curl error code: 0.

Aug 22 12:58:40 [6796] cl->response_code: 200.

Aug 22 12:58:40 [6796] cl->last_error code: 0.

Aug 22 12:58:40 [6796] *****set post buf len = 968******

Aug 22 12:58:40 [6796] write_handler: recieved 2029 bytes, all = 2029

 

Aug 22 12:58:40 [6796] curl error code: 0.

Aug 22 12:58:40 [6796] cl->response_code: 200.

Aug 22 12:58:40 [6796] cl->last_error code: 0.

 

 

Aug 22 12:58:40 [6796] *****set post buf len = 968******

Aug 22 12:58:40 [6796] write_handler: recieved 1981 bytes, all = 1981

 

Aug 22 12:58:40 [6796] curl error code: 0.

Aug 22 12:58:40 [6796] cl->response_code: 200.

Aug 22 12:58:40 [6796] cl->last_error code: 0.

Aug 22 12:58:40 [6796] *****set post buf len = 968******

Aug 22 12:58:41 [6796] write_handler: recieved 2291 bytes, all = 2291

 

Aug 22 12:58:41 [6796] curl error code: 0.

Aug 22 12:58:41 [6796] cl->response_code: 200.

Aug 22 12:58:41 [6796] cl->last_error code: 0.

Aug 22 12:58:41 [6796] *****set post buf len = 968******

Aug 22 12:58:41 [6796] write_handler: recieved 1912 bytes, all = 1912

 

Aug 22 12:58:41 [6796] curl error code: 0.

Aug 22 12:58:41 [6796] cl->response_code: 200.

Aug 22 12:58:41 [6796] cl->last_error code: 0.

 

Can you help us ? Any suggestions ?

 

---

Mit freundlichen Grüßen / With best regards / よろしくお願いします

 

Christiane Kämpfe

ServerView Development, FTS PDG SV SW 4

 

Sent from Fujitsu ESPRIMO P900

cid:image001.gif@01CBF835.B3FEDA90

FUJITSU

Fujitsu Technology Solutions GmbH

Domagkstr. 28 , 80807 Munich , Germany

Tel:           +49 89 3222 2298

Fax:          +49 89 3222 329 2298 

E-mail:      christiane.kaempfe@...

Web:       ts.fujitsu.com

Company details: ts.fujitsu.com/imprint

 

This communication contains information that is confidential, proprietary in nature and/or privileged.  It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) or the person responsible for delivering it to the intended recipient(s), please note that any form of dissemination, distribution or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender and delete the original communication. Thank you for your cooperation.

Please be advised that neither Fujitsu, its affiliates, its employees or agents accept liability for any errors, omissions or damages caused by delays of receipt or by any virus infection in this message or its attachments, or which may otherwise arise as a result of this e-mail transmission.

 

 


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: We get only one Instance with CIM_ComputerSystem_EnumInstances.pl

Klaus Kaempf
* Kämpfe, Christiane <[hidden email]> [Aug 23. 2013 11:25]:

> Hello OpenWS-MAN experts,
>
> We want to use OpenWSMAN connections via Perl here to get enumeration lists.
>
> We are beginners with openWSMAN (and right now layman's concerning Perl). We have here a RedHat 6.3
> where openwsan.pm was already integrated.
> With this we tried the test script  CIM_ComputerSystem_EnumInstances.pl (of version 2.3.0) with a different Class where we know
> that there exist more than one instance of this class (Check with wsman command).
>
> The problem: At the end of the script only one instance was printed !

It's a bug in the Perl script. It assumes a specific XML tree layout
without checking node names at this line:
      my $nodes = $result->body()->child()->child()->child();
     
Being a Perl illiterate myself, I'll try to come up with a patch
nevertheless.

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: We get only one Instance with CIM_ComputerSystem_EnumInstances.pl

Klaus Kaempf
* Klaus Kaempf <[hidden email]> [Aug 26. 2013 14:08]:
>
> It's a bug in the Perl script. It assumes a specific XML tree layout
> without checking node names at this line:
>       my $nodes = $result->body()->child()->child()->child();
>      
> Being a Perl illiterate myself, I'll try to come up with a patch
> nevertheless.

The fix turned out to be rather simple:

-    my $nodes = $result->body()->child()->child()->child();
+    my $nodes = $result->body()->find($openwsman::NS_ENUMERATION, "Items")->child();

The full file is also available on github as
https://raw.github.com/Openwsman/openwsman/master/bindings/perl/tests/CIM_ComputerSystem_EnumInstances.pl

Enjoy,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: We get only one Instance with CIM_ComputerSystem_EnumInstances.pl

Kämpfe, Christiane
It is working - hurray :-)

I have tested it right now with CIM_Processor.

Thank you.

--- ckae

-----Original Message-----
From: Klaus Kaempf [mailto:[hidden email]]
Sent: Monday, August 26, 2013 3:05 PM
To: Kämpfe, Christiane
Cc: Pippel, Ursula; [hidden email]
Subject: Re: [Openwsman-devel] We get only one Instance with CIM_ComputerSystem_EnumInstances.pl

* Klaus Kaempf <[hidden email]> [Aug 26. 2013 14:08]:
>
> It's a bug in the Perl script. It assumes a specific XML tree layout
> without checking node names at this line:
>       my $nodes = $result->body()->child()->child()->child();
>      
> Being a Perl illiterate myself, I'll try to come up with a patch
> nevertheless.

The fix turned out to be rather simple:

-    my $nodes = $result->body()->child()->child()->child();
+    my $nodes = $result->body()->find($openwsman::NS_ENUMERATION,
+ "Items")->child();

The full file is also available on github as https://raw.github.com/Openwsman/openwsman/master/bindings/perl/tests/CIM_ComputerSystem_EnumInstances.pl

Enjoy,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Loading...