perfSONAR_PS::Common - A module that provides common methods for performing simple, necessary actions within the perfSONAR-PS framework.
This module is a catch all for common methods (for now) in the perfSONAR-PS framework. As such there is no 'common thread' that each method shares. This module IS NOT an object, and the methods can be invoked directly (and sparingly).
The API for this module aims to be simple; note that this is not an object and each method does not have the 'self knowledge' of variables that may travel between functions.
The API of perfSONAR_PS::Common offers simple calls to common activities in the perfSONAR-PS framework.
<nmwg:metadata id="1" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"> <netutil:subject xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/" id="1"> <nmwgt:interface xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/"> <nmwgt:ifAddress type="ipv4">128.4.133.167</nmwgt:ifAddress> <nmwgt:hostName>stout</nmwgt:hostName> </nmwgt:interface> </netutil:subject> <nmwg:eventType>http://ggf.org/ns/nmwg/tools/snmp/2.0</nmwg:eventType> </nmwg:metadata> <nmwg:metadata id="2" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" metadataIdRef="1"> <netutil:subject xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/" id="2"> <nmwgt:interface xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/"> <nmwgt:ifName>eth1</nmwgt:ifName> <nmwgt:ifIndex>3</nmwgt:ifIndex> <nmwgt:direction>in</nmwgt:direction> </nmwgt:interface> </netutil:subject> <nmwg:eventType>http://ggf.org/ns/nmwg/tools/snmp/2.0</nmwg:eventType> </nmwg:metadata> Which would then become: <nmwg:metadata id="2"> <netutil:subject xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/" id="1"> <nmwgt:interface xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/"> <nmwgt:ifAddress type="ipv4">128.4.133.167</nmwgt:ifAddress> <nmwgt:hostName>stout</nmwgt:hostName> <nmwgt:ifName>eth1</nmwgt:ifName> <nmwgt:ifIndex>3</nmwgt:ifIndex> <nmwgt:direction>in</nmwgt:direction> </nmwgt:interface> </netutil:subject> <nmwg:eventType>http://ggf.org/ns/nmwg/tools/snmp/2.0/</nmwg:eventType> </nmwg:metadata> This chaining is useful for 'factoring out' large chunks of XML.
Takes two LibXML nodes containing structures and merges them together. The $attrs variable is a pointer to a hash describing which attributes on an element node should be compared to define equality. If an element's name is not defined in the hash, the element is simply replaced if one of the same name and namespace is found. To have links compared based on their 'id' attribute, you would specify $attrs as such: my %attrs = ( link => ( id => '' ); );
Exporter, IO::File, XML::XPath, Time::HiRes, Log::Log4perl
To join the 'perfSONAR-PS' mailing list, please visit:
https://mail.internet2.edu/wws/info/i2-perfsonar
The perfSONAR-PS subversion repository is located at:
https://svn.internet2.edu/svn/perfSONAR-PS
Questions and comments can be directed to the author, or the mailing list.
$Id$
Aaron Brown <aaron@internet2.edu>, Jason Zurawski, zurawski@internet2.edu
You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <http://www.internet2.edu/membership/ip.html>
Copyright (c) 2004-2007, Internet2 and the University of Delaware
All rights reserved.
To install perfSONAR_PS::Time, copy and paste the appropriate command in to your terminal.
cpanm
cpanm perfSONAR_PS::Time
CPAN shell
perl -MCPAN -e shell install perfSONAR_PS::Time
For more information on module installation, please visit the detailed CPAN module installation guide.