Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Perfsonar lookup service question

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Perfsonar lookup service question


Chronological Thread 
  • From: "Weiping Mandrawa" <>
  • To: <>
  • Cc: <>, <>
  • Subject: Re: [perfsonar-user] Perfsonar lookup service question
  • Date: Fri, 30 Apr 2010 14:01:48 -0400

Andy,

Thank you for clarification and quick response.

I tested the code and it is working well.


I have another question,

let say I want to filter my lookup search based on Project name (e.g ESnet)
and
in the example code (ls-ex3-bwctl.pl)

\$keyword=\"project:ESnet\" . Is this case sensitive ?
and how do I get list of keyword "project"
e.g LBNL, Internet2 etc to be used with lookup service


Thank you

Kind Regards

Weiping







>>> Andrew Lake
>>> <>
>>> 04/30/10 1:28 PM >>>
Hi Weiping,

The html on the page was causing those lines to be displayed incorrectly. The
</ in the regular expression was the source of the problem. I have now
corrected the page. The correct code block looks like the following:

if( $hLSResult->{response} && $hLSResult->{response} =~ /^<./ ){
# Print list of matching bwctl server addresses
my $resParser = XML::LibXML->new();
my $hLSDoc = $resParser->parse_string($hLSResult->{response});

Also, if it helps you may download the code examples on this page here:
http://psps.perfsonar.net/ps-client-examples-v1.1.tar.gz. There is also a
link to this file on the bottom of the page.

Thanks!
Andy


On Apr 30, 2010, at 1:09 PM, Jason Zurawski wrote:

> Hello, I am trying to understand lookup service based on the address
>
> http://psps.perfsonar.net/client-doc.html
>
> In the paragraph
>
> The instance in the above example is the URL of an LS service to contact.
> Examples
> 1. Find all SNMP Measurement Archives
>
>
> There are examples how to crate XQuery to be sent to home lookup services
>
> In the example code (XQuery to be sent up to home lookup based on Find all
> SNMP Measurement Archieves)
>
>
> (Line1) if($hLSResult->{response} && $hLSResult->{response} =~ /^new();
> (Line2) my $hLSDoc =
> $resParser->parse_string($hLSResult->{response});
>
>
>
> For some reason, perl can't understand (Line1) to (Line2)
>
> for example
>
> in Line2 , it is using $resParser but $resParser is not declared anywhere
> in the code
> and when I run the code, it complains about it
>
>
>
> if I change $resParser to $parser, it complains that
>
> Thread 65 terminated abnormally: Can't call method "parse_string" on
> unblessed reference
>
>
> Thank you
>





Archive powered by MHonArc 2.6.16.

Top of Page