perfSONAR_PS::Client::Status::MA

A module that provides methods for interacting with Status MA servers
Download

perfSONAR_PS::Client::Status::MA Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Aaron Brown
  • Publisher web site:
  • http://search.cpan.org/~perfsonar/

perfSONAR_PS::Client::Status::MA Tags


perfSONAR_PS::Client::Status::MA Description

A module that provides methods for interacting with Status MA servers perfSONAR_PS::Client::Status::MA is a Perl module that allows one to interact with the Status MA via its Web Services interface. The API provided is identical to the API for interacting with the MA database directly. Thus, a client written to read from or update a Status MA can be easily modified to interact directly with its underlying database allowing more efficient interactions if required.The module is to be treated as an object, where each instance of the object represents a connection to a single database. Each method may then be invoked on the object for the specific database.SYNOPSISuse perfSONAR_PS::Client::Status::MA;my $status_client = new perfSONAR_PS::Client::Status::MA("http://localhost:4801/axis/services/status"); if (not defined $status_client) { print "Problem creating client for status MA\n"; exit(-1); }my ($status, $res) = $status_client->open; if ($status != 0) { print "Problem opening status MA: $res\n"; exit(-1); }($status, $res) = $status_client->getAll(); if ($status != 0) { print "Problem getting complete database: $res\n"; exit(-1); }my @links = ();foreach my $id (keys %{ $res }) { print "Link ID: $id\n"; foreach my $link ( @{ $res->{$id} }) { print "\t" . $link->getStartTime . " - " . $link->getEndTime . "\n"; print "\t-Knowledge Level: " . $link->getKnowledge . "\n"; print "\t-operStatus: " . $link->getOperStatus . "\n"; print "\t-adminStatus: " . $link->getAdminStatus . "\n"; } push @links, $id;}($status, $res) = $status_client->getLinkStatus(\@links, ""); if ($status != 0) { print "Problem obtaining most recent link status: $res\n"; exit(-1); }foreach my $id (keys %{ $res }) { print "Link ID: $id\n"; foreach my $link ( @{ $res->{$id} }) { print "-operStatus: " . $link->getOperStatus . "\n"; print "-adminStatus: " . $link->getAdminStatus . "\n"; }}($status, $res) = $status_client->getLinkHistory(\@links); if ($status != 0) { print "Problem obtaining link history: $res\n"; exit(-1); }foreach my $id (keys %{ $res }) { print "Link ID: $id\n"; foreach my $link ( @{ $res->{$id} }) { print "-operStatus: " . $link->getOperStatus . "\n"; print "-adminStatus: " . $link->getAdminStatus . "\n"; }} Requirements: · Perl


perfSONAR_PS::Client::Status::MA Related Software