perfSONAR_PS::Services::MA::CircuitStatus - A module that provides methods for an E2EMon Compatible MP.
This module aims to offer simple methods for dealing with requests for information, and the related tasks of interacting with backend storage.
use perfSONAR_PS::Services::MA::CircuitStatus;
my %conf = readConfiguration();
my %ns = ( nmwg => "http://ggf.org/ns/nmwg/base/2.0/", ifevt => "http://ggf.org/ns/nmwg/event/status/base/2.0/", nmtm => "http://ggf.org/ns/nmwg/time/2.0/", nmwgtopo3 => "http://ggf.org/ns/nmwg/topology/base/3.0/", nmtl2 => "http://ggf.org/ns/nmwg/topology/l2/3.0/", nmtl3 => "http://ggf.org/ns/nmwg/topology/l3/3.0/", );
my $ma = perfSONAR_PS::Services::MA::CircuitStatus->new(\%conf, \%ns);
# or # $ma = perfSONAR_PS::Services::MA::CircuitStatus->new; # $ma->setConf(\%conf); # $ma->setNamespaces(\%ns);
if ($ma->init != 0) { print "Error: couldn't initialize measurement archive\n"; exit(-1); }
while(1) { my $request = $ma->receive; $ma->handleRequest($request); }
The offered API is simple, but offers the key functions we need in a measurement archive.
Initializes the MP and validates or fills in entries in the configuration file. Returns 0 on success and -1 on failure.
Grabs an incoming message from transport object to begin processing. It completes the processing if the message was handled by a lower layer. If not, it returns the Request structure.
Handles the specified request returned from receive()
Validates that the message is one that we can handle, calls the appropriate function for the message type and builds the response message.
Goes through each metadata/data pair, extracting the eventType and calling the function associated with that eventType.
Performs the required steps to handle a path status message: contacts the topology service to resolve node information, contacts the LS if needed to find the link status service, contacts the link status service and munges the results.
Takes the set of nodes and outputs them in an E2EMon compatiable format.
Takes the set of links and outputs them in an E2EMon compatiable format.
Parses the links configuration file. It returns an array containg up to five values. The first value is the status and can be one of 0 or -1. If it is -1, parsing the configuration file failed and the error message is in the next value. If the status is 0, the next 4 values are the domain name, a pointer to the set of links, a pointer to a hash containg the set of nodes to lookup in the topology service and a pointer to a hash containing the set of links to lookup in the status service.
Parses the output from the topology service and fills in the details for the nodes. The domain name is passed so that when a node has no name specified in the configuration file, it can be constructd based on the domain name and the node's name in the topology service.
perfSONAR_PS::Services::Base, perfSONAR_PS::Services::MA::General, perfSONAR_PS::Common, perfSONAR_PS::Messages, perfSONAR_PS::Transport, perfSONAR_PS::Client::Status::MA, perfSONAR_PS::Client::Topology::MA
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
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::Services::MA::CircuitStatus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm perfSONAR_PS::Services::MA::CircuitStatus
CPAN shell
perl -MCPAN -e shell install perfSONAR_PS::Services::MA::CircuitStatus
For more information on module installation, please visit the detailed CPAN module installation guide.