Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Background

The perfSONAR-PS version of PingER supports information registration to a perfSONAR LS. This page documents how and what information is available.

Template

All queries to Lookup Services (LS) are basically xquery statements on the xml store. However, as the communication is via message based RPC, we must wrap our x-queries as such:

Code Block
<?xml version='1.0' encoding='UTF-8'?>
<nmwg:message type="LSQueryRequest"
              id="msg1"
              xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"
              xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/">

  <nmwg:metadata id="meta1">

    <xquery:subject id="sub1">

      <!-- XQUERY GOES HERE -->

    </xquery:subject>
    <nmwg:eventType>http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0</nmwg:eventType>
  </nmwg:metadata>

  <nmwg:data metadataIdRef="meta1" id="d1"/>

</nmwg:message>

What follows are snippets of the xquery to use and the resultant output.

Client

A perfSONAR command line client is provided to send xml documents to various perfsonar services. It is found in the perfsonar distribution and can be executed as follows:

Code Block
$[perfSONAR-PS/trunk/perfSONAR-PS/client]$ ./client.pl \
        http://packrat.internet2.edu:8005/perfSONAR_PS/services/LS lsQuery.xml | \
        sed s:'&gt;':'>':g | sed s:'&lt;':'<':g | sed s:'&quot;':'"':g | tidy

Note that the piping of the output is to enable presentation of the results. the returned results are in pure text, and must be formatted back into XML for analysis.

Service Presence

Code Block
        declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";
        declare namespace perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
        declare namespace psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
        /nmwg:store/nmwg:metadata/perfsonar:subject[child::psservice:service]

The resultant list will should have

Code Block
...
          <perfsonar:subject xmlns:perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/">
            <psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/">
              <psservice:serviceName>perfSONAR_PS PingER MA</psservice:serviceName>
              <psservice:accessPoint>http://134.79.24.133:8080/perfSONAR_PS/services/pinger/ma</psservice:accessPoint>
              <psservice:serviceType>MA</psservice:serviceType>
              <psservice:serviceDescription>perfSONAR_PS PingER MA</psservice:serviceDescription>
            </psservice:service>
          </perfsonar:subject>
        </psservice:datum>
      </nmwg:data>
    </nmwg:message>

h2 Metadata available

Code Block
        declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";
        declare namespace perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
        declare namespace psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
        /nmwg:store/nmwg:data[child::nmwg:metadata/nmwg:eventType='http://ggf.org/ns/nmwg/tools/pinger/2.0/']
Code Block
    <nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="message.17360681" messageIdRef="msg1" type="LSQueryResponse">
      <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="metadata.10659361" metadataIdRef="meta1"></nmwg:metadata>
      <nmwg:data xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="data.15981881" metadataIdRef="metadata.10659361">
        <psservice:datum xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/">
          <nmwg:data xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://134.79.24.133:8080/perfSONAR_PS/services/pinger/ma/1197401716/0"
          metadataIdRef="http://134.79.24.133:8080/perfSONAR_PS/services/pinger/ma">
            <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="1">
              <pinger:subject xmlns:pinger="http://ggf.org/ns/nmwg/tools/pinger/2.0/">
                <nmwgt:endPointPair xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/">
                  <nmwgt:src value="Yees-Ubuntu.slac.stanford.edu" type="hostname" />
                  <nmwgt:src value="pinger.fnal.gov" type="hostname" />
                </nmwgt:endPointPair>
              </pinger:subject>
              <pinger:parameters xmlns:pinger="http://ggf.org/ns/nmwg/tools/pinger/2.0/">
                <nmwg:parameter name="count">10</nmwg:parameter>
                <nmwg:parameter name="packetSize">1000</nmwg:parameter>
                <nmwg:parameter name="interval">1</nmwg:parameter>
                <nmwg:parameter name="ttl">32</nmwg:parameter>
              </pinger:parameters>
              <nmwg:eventType>http://ggf.org/ns/nmwg/tools/pinger/2.0/</nmwg:eventType>
            </nmwg:metadata>
          </nmwg:data>
          <nmwg:data xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://134.79.24.133:8080/perfSONAR_PS/services/pinger/ma/1197401716/1"
          metadataIdRef="http://134.79.24.133:8080/perfSONAR_PS/services/pinger/ma">
            <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="2">
              <pinger:subject xmlns:pinger="http://ggf.org/ns/nmwg/tools/pinger/2.0/">
                <nmwgt:endPointPair xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/">
                  <nmwgt:src value="Yees-Ubuntu.slac.stanford.edu" type="hostname" />
                  <nmwgt:src value="www.cern.ch" type="hostname" />
                </nmwgt:endPointPair>
              </pinger:subject>
              <pinger:parameters xmlns:pinger="http://ggf.org/ns/nmwg/tools/pinger/2.0/">
                <nmwg:parameter name="count">10</nmwg:parameter>
                <nmwg:parameter name="packetSize">1000</nmwg:parameter>
                <nmwg:parameter name="interval">1</nmwg:parameter>
                <nmwg:parameter name="ttl">32</nmwg:parameter>
              </pinger:parameters>
              <nmwg:eventType>http://ggf.org/ns/nmwg/tools/pinger/2.0/</nmwg:eventType>
            </nmwg:metadata>
          </nmwg:data>
          <nmwg:data xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="http://134.79.24.133:8080/perfSONAR_PS/services/pinger/ma/1197401716/2"
          metadataIdRef="http://134.79.24.133:8080/perfSONAR_PS/services/pinger/ma">
            <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="3">
              <pinger:subject xmlns:pinger="http://ggf.org/ns/nmwg/tools/pinger/2.0/">
                <nmwgt:endPointPair xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/">
                  <nmwgt:src value="Yees-Ubuntu.slac.stanford.edu" type="hostname" />
                  <nmwgt:src value="pinger.slac.stanford.edu" type="hostname" />
                </nmwgt:endPointPair>
              </pinger:subject>
              <pinger:parameters xmlns:pinger="http://ggf.org/ns/nmwg/tools/pinger/2.0/">
                <nmwg:parameter name="count">10</nmwg:parameter>
                <nmwg:parameter name="packetSize">1000</nmwg:parameter>
                <nmwg:parameter name="interval">1</nmwg:parameter>
                <nmwg:parameter name="ttl">32</nmwg:parameter>
              </pinger:parameters>
              <nmwg:eventType>http://ggf.org/ns/nmwg/tools/pinger/2.0/</nmwg:eventType>
            </nmwg:metadata>
          </nmwg:data>
        </psservice:datum>
      </nmwg:data>
    </nmwg:message>