Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/SA2T3-OPPD] r846 - in trunk/perfSONAR/perfSONAR: . MA MP

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/SA2T3-OPPD] r846 - in trunk/perfSONAR/perfSONAR: . MA MP


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/SA2T3-OPPD] r846 - in trunk/perfSONAR/perfSONAR: . MA MP
  • Date: Fri, 28 Feb 2014 14:11:06 +0000 (GMT)

Author: dfn.calim
Date: 2014-02-28 14:11:06 +0000 (Fri, 28 Feb 2014)
New Revision: 846

Removed:
trunk/perfSONAR/perfSONAR/MA.old.pm
trunk/perfSONAR/perfSONAR/MA/BWCTL.pm
trunk/perfSONAR/perfSONAR/MA/Hades.old.pm
trunk/perfSONAR/perfSONAR/MA/Hades.pm
trunk/perfSONAR/perfSONAR/MA/RIPE.pm
trunk/perfSONAR/perfSONAR/MA/Status.pm
trunk/perfSONAR/perfSONAR/MP/BWCTL.pm
trunk/perfSONAR/perfSONAR/MP/Generic.pm
trunk/perfSONAR/perfSONAR/MP/LSToolreg.pm
trunk/perfSONAR/perfSONAR/MP/OWAMP.pm
Log:
removing some sub modules they will get its own directoy

Deleted: trunk/perfSONAR/perfSONAR/MA/BWCTL.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MA/BWCTL.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MA/BWCTL.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,68 +0,0 @@
-package perfSONAR::MA::BWCTL;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-use vars qw(@ISA);
-@ISA
= qw(perfSONAR::MA);
-
-#DEBUG
-use Data::Dumper;
-#/DEBUG
-
-use strict;
-use warnings;
-
-use perfSONAR::MA;
-
-sub start_action {
- my $self = shift;
- my $msg = shift;
- my $dataid = shift;
-
- my @datalines;
-
- my $data_obj = $self->SUPER::start_action($msg, $dataid);
- if ($data_obj->isa("Hades::Data::BWCTL")){
- my $data = $data_obj->{data};
- my $sample = $msg->{"dataIDs"}{$dataid}{"select"}{"sample"};
- my $count = -1;
- foreach my $ref (@$data) {
- my %data_hash;
- my $time = $$ref{"time"};
- next unless $time;
- if ($sample){
- $count++;
- next unless $count % $sample == 0;
- }
- next unless $time;
- $data_hash{"time"} = $time;
- $data_hash{"average"} = $$ref{"avg"};
- $data_hash{"minimum"} = $$ref{"min"};
- $data_hash{"maximum"} = $$ref{"max"};
- $data_hash{"unit"} = "bits/sec";
- push @datalines, \%data_hash;
- }
- }
-
- if ($#datalines > 0){
- $msg->set_data($dataid, @datalines);
- }
- return 1;
-
-}
-
-1;

Deleted: trunk/perfSONAR/perfSONAR/MA/Hades.old.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MA/Hades.old.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MA/Hades.old.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,175 +0,0 @@
-package perfSONAR::MA::Hades;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-use vars qw(@ISA);
-@ISA
= qw(perfSONAR::MA);
-
-#DEBUG
-#use Data::Dumper;
-#/DEBUG
-
-use strict;
-use warnings;
-
-
-use perfSONAR::MA;
-
-my $ns_raw="http://ggf.org/ns/nmwg/tools/owd/raw";;
-my $ns_hades="http://ggf.org/ns/nwmg/tools/hades/aggregated";;
-
-my $ns = $ns_raw;
-
-sub new {
- my $this = shift;
- my %param = (@_);
- my $self = perfSONAR::MA->new(%param);
- push @{$self->{"supportedEventtypes"}},
-
- (
- "http://ggf.org/ns/nmwg/tools/hades/";,
- "http://ggf.org/ns/nmwg/characteristic/delay/summary/";,
- "http://ggf.org/ns/nmwg/tools/owd/raw";,
- "http://ggf.org/ns/nwmg/tools/hades/aggregated";,
- "http://ggf.org/ns/nmwg/characteristic/delay/one-way/";,
- );
-
- $self->{"actions"} = {
-
- ippm_aggregated => [
- "http://ggf.org/ns/nmwg/tools/hades/";,
-
"http://ggf.org/ns/nmwg/characteristic/delay/summary/";,
- "http://ggf.org/ns/nwmg/tools/hades/aggregated";,
- ],
- ippm_raw => [
- "http://ggf.org/ns/nmwg/tools/owd/raw";,
-
"http://ggf.org/ns/nmwg/characteristic/delay/one-way/";,
- ],
- };
-
- bless $self, qw(perfSONAR::MA::Hades);
- return $self;
-}
-
-sub start_action {
- my $self = shift;
- my $msg = shift;
- my $dataid = shift;
- my $service_id = shift;
-
- my @datalines;
- my $action;
-
- #determine kind of action from eventtype
- my $agg_ets = join ('_', @{$self->{"actions"}{"ippm_aggregated"}});
- my $raw_ets = join ('_', @{$self->{"actions"}{"ippm_raw"}});
-
-
- $self->SUPER::set_eventType ($msg, $dataid);
-
-
- my $et = $self->{"eventType"};
-
- if ($agg_ets =~ /$et/){
- $action = "ippm_aggregated";
- } elsif($raw_ets =~ /$et/){
- $action = "ippm_raw";
- }
-
- my $data_obj = $self->SUPER::start_action($msg, $dataid, $action,
$service_id);
-
- if ($data_obj->isa("Hades::Data::IPPM_Raw")){
- $ns = $ns_raw;
- my $data = $data_obj->{data};
- foreach my $ref (@$data) {
- next unless (ref ($ref) eq "HASH");
- my %data_hash;
- $data_hash{"seqnr"} = $$ref{"seqnr"};
- $data_hash{"senttime_sec"} = $$ref{"senttime_sec"};
- $data_hash{"senttime_nsec"} = $$ref{"senttime_nsec"};
- $data_hash{"recvtime_sec"} = $$ref{"recvtime_sec"};
- $data_hash{"recvtime_nsec"} = $$ref{"recvtime_nsec"};
- push @datalines, \%data_hash;
- }
- } elsif ($data_obj->isa("Hades::Data::IPPM_Aggregated")){
- $ns = $ns_hades;
- my $data = $data_obj->{data};
- my $metric = $msg->{"dataIDs"}{$dataid}{"select"}{"metric"};
- my $sample = $msg->{"dataIDs"}{$dataid}{"select"}{"sample"};
- my $count = -1;
- foreach my $ref (@$data) {
- my %data_hash;
- my $time = $$ref{"time"};
- next unless $time;
- if ($sample){
- $count++;
- next unless $count % $sample == 0;
- }
- $data_hash{"time"} = $time;
- if (!$metric || $metric eq "all" || $metric eq "owd"){
- $data_hash{"min_delay"} = $$ref{"min_owd"};
- $data_hash{"med_delay"} = $$ref{"med_owd"};
- $data_hash{"max_delay"} = $$ref{"max_owd"};
- }
- if (!$metric || $metric eq "all" || $metric eq "ipdv"){
- $data_hash{"min_ipdv_jitter"} = $$ref{"min_ipdv"};
- $data_hash{"med_ipdv_jitter"} = $$ref{"med_ipdv"};
- $data_hash{"max_ipdv_jitter"} = $$ref{"max_ipdv"};
- }
- if (!$metric || $metric eq "all" || $metric eq "lost_packets"){
- $data_hash{"loss"} = $$ref{"lost_packets"};
- }
- if (!$metric || $metric eq "all" || $metric eq "duplicate_packets"){
- $data_hash{"duplicates"} = $$ref{"duplicate_packets"};
- }
- $data_hash{"sync"} = "yes";
- #sent missing (im metadata parameters)
- push @datalines, \%data_hash;
- }
-
- }
- if ($#datalines > 0){
- $msg->set_data_ns($dataid, $ns, @datalines);
- }
- return 1;
-}
-
-
-sub get_meta_info {
- my $self = shift;
- my $msg = shift;
-
-=cut
- my @eventtypes = keys %eventtype_mapping;
- my @actions = values %eventtype_mapping;
-
- my %a; #elimiating duplicates
-
- foreach my $action (@actions) {
- if (!$a{$action}){
- $self->SUPER::get_meta_info($msg, $action, @eventtypes);
- $a{$action}++;
- }
- }
-=cut
-
- foreach my $action (keys %{$self->{"actions"}}){
- $self->SUPER::get_meta_info($msg, $action,
@{$self->{"actions"}{$action}});
- }
-}
-
-1;

Deleted: trunk/perfSONAR/perfSONAR/MA/Hades.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MA/Hades.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MA/Hades.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,247 +0,0 @@
-package perfSONAR::MA::Hades;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-#DEBUG
-use Data::Dumper;
-#/DEBUG
-
-use strict;
-use warnings;
-
-use Log::Log4perl qw(get_logger);
-use base qw(perfSONAR::MA);
-
-use Hades;
-use Hades::Config;
-use Hades::Data::Finder_SQL;
-use Hades::Data::Finder;
-
-sub new{
- my ($class,%module_param) = @_;
- my $self = $class->SUPER::new(%module_param);
-
-
- # Now create config and initialise everything
- $Hades::configfile = undef;
- $Hades::config = undef;
- my $config = Hades::Config->new(
- configfile => $module_param{config},
- use_argv => 0,
- );
- $config->init() or die;
- @{$config->{config}}{keys %module_param} = values %module_param;
- $self->{CONFIG} = $config;
-
- return $self;
-}
-
-
-sub run{
- my ($self, $ds) = @_;
- my $et = "error.ma.parameters";
-
- $self->{DS} = $ds;
- my $data = $$ds->{SERVICE}->{DATA};
- $self->{FINDER} = Hades::Data::Finder_SQL->new(
- config => $self->{CONFIG},
- );
- #At teh moment all MA steps happen here
- #We have no other MA services
- foreach my $id (keys %{$data}){
- my %params = %{$data->{$id}->{PARAMS}};
- my $startTime = $params{startTime};
- my $endTime = $params{endTime};
- my $currentTime = time;
-
- if ($endTime > $currentTime){
- $endTime = $currentTime;
- my @errmsg;
- my $warnmsg = "WARN: endTime value lies ahead!";
- push @errmsg, $warnmsg;
- push @errmsg, $et;
- $$ds->{SERVICE}->{DATA}->{$id}->{WARN}->{MSG} =
\@errmsg;
- $$ds->{SERVICE}->{DATA}->{$id}->{WARN}->{OCCUR} = 1;
- $self->{LOGGER}->warn($warnmsg);
- }
-
- my $src = $params{src};
- my $dst = $params{dst};
- my $mid = $params{mid};
-
- $self->{FINDER}->reset;
- if (! $self->{FINDER}->set_time_epoch($startTime,$endTime)){
- $$ds->{ERROROCCUR} = 1;
- my @errmsg;
- push @errmsg, "Invalid date format";
- $self->{LOGGER}->error("@errmsg");
- push @errmsg, $et;
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@errmsg;
- return;
- }
- $self->{FINDER}->set_route($src,$dst); # set_route understands
"undef"!!!
- if (defined $$ds->{$$ds->{DSTYPE}}->{HADES}->{ACTION}->{TYPE}){
-
$self->{FINDER}->set_type($$ds->{$$ds->{DSTYPE}}->{HADES}->{ACTION}->{TYPE});
- }
- else{
-
$self->{FINDER}->set_type($$ds->{$$ds->{DSTYPE}}->{HADES}->{ACTION}->{EVENTYPE}
);
- }
-
#$self->{LOGGER}->error(Dumper($$ds->{$$ds->{DSTYPE}}->{HADES}->{FILTER}));
- $self->{FINDER}->set_mid($mid); # ignores "undef"
-
$self->{FINDER}->set_filter($$ds->{$$ds->{DSTYPE}}->{HADES}->{FILTER}); #
filter with metadata
- my @results = $self->{FINDER}->find;
-
- unless (@results) {
- my @errmsg;
- push @errmsg, "No data found for id: $id";
- $self->{LOGGER}->error("@errmsg");
- push @errmsg, "error.ma.data";
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@errmsg;
- $$ds->{ERROROCCUR} = 1;
- return;
- }
-
- my @result_params;
- #$self->{LOGGER}->info(Dumper(@results));
- if ($#results > 0){ #More than one measurment result found matching
the request pattern
- #get_meta_info($msg);
- my $output = "";
- my $count = 0;
- foreach my $result (@results){
- my $info = $result->{meta};
- my %par;
- foreach my $key (keys %{$info}){
- next if ($key eq "sender_port" || $key eq
"receiver_port");
- if ($key eq "interval"){
- $par{"interval"} = $info->{"interval"} / 1000000;
- } else {
- $par{$key} = $info->{$key};
- }
- }#End foreach my $key
-
- $par{"sender"} = $result->{"sender"};
- $par{"receiver"} = $result->{"receiver"};
- $par{"mid"} = $result->{"mid"};
- $par{"metadataIdRef"} = "result$count";
- $count++;
-
- push @result_params, \%par;
- $output = $output . "$result->{sender} to $result->{receiver} "
- . $result->type2string() . ", mid: $result->{mid}\n";
- }#End foreach my $result
- my $message = "More than one measurement result found";
- $self->{LOGGER}->warn($message);
- $self->{LOGGER}->debug("Measurements:\n$output");
- #Strore params for return msg
- $$ds->{$$ds->{DSTYPE}}->{HADES}->{$id}->{RESPARAMS}->{OCCURARRAY}
= 1;
- $$ds->{$$ds->{DSTYPE}}->{HADES}->{$id}->{RESPARAMS}->{DATA} =
\@result_params;
-
- $self->{LOGGER}->debug($message);
- $$ds->{ERROROCCUR} = 1;
- my @errmsg;
- push @errmsg, $message;
- push @errmsg, "warning.ma.parameters";
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@errmsg;
- return;
- }#iEnd if ($#results > 0
-
- my $warnings = $self->{FINDER}->{warnings}->get_string();
- if ($warnings) {
- #TODO is that right/useful???
- my @errmsg;
- push @errmsg, "Warnings from data modules:\n$warnings";
- $self->{LOGGER}->error("@errmsg");
- push @errmsg, "error.ma.data";
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@errmsg;
- $$ds->{ERROROCCUR} = 1;
- return;
- }
-
- my $data_obj = $results[0];
- my $info = $data_obj->{meta};
- my %par;
-
- foreach my $key (keys %{$info}){
- next if ($key eq "sender_port" || $key eq "receiver_port");
- if ($key eq "interval"){
- $par{"interval"} = $info->{"interval"} / 1000000;
- } else {
- $par{$key} = $info->{$key};
- }
- } #End foreach my $key
-
- $par{"sender"} = $data_obj->{"sender"};
- $par{"mid"} = $data_obj->{"mid"};
- $par{"receiver"} = $data_obj->{"receiver"};
- $$ds->{$$ds->{DSTYPE}}->{HADES}->{$id}->{RESPARAMS}->{OCCURHASH} = 1;
- $$ds->{$$ds->{DSTYPE}}->{HADES}->{$id}->{RESPARAMS}->{DATA} = \%par;
- if(!(exists $data_obj->{meta})) {
- my @errmsg;
- push @errmsg, "No meta data found";
- push @errmsg, "error.ma.data";
- $self->{LOGGER}->error("@errmsg");
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@errmsg;
- $$ds->{ERROROCCUR} = 1;
- return;
- }
-
- $self->{LOGGER}->info("Meta data retrieval seems to be successful");
-
- $data_obj->extract_data();
- $warnings = $self->{FINDER}->{warnings}->get_string();
- if ($warnings) {
- #TODO is that right/useful???
- $$ds->{ERROROCCUR} = 1;
- my @errmsg;
- push @errmsg,"Warnings from data modules:\n$warnings";
- $self->{LOGGER}->error("@errmsg");
- push @errmsg, "error.ma.data";
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@errmsg;
- return;
- }
-
- my $data = $data_obj->get_data;
- unless (defined $data) {
- $$ds->{ERROROCCUR} = 1;
- my @errmsg;
- push @errmsg,"No data found";
- $self->{LOGGER}->error("@errmsg");
- push @errmsg, "error.ma.data";
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@errmsg;
- return;
- }
-
- $self->{LOGGER}->info("Data retrieval seems to be successful");
-
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} = \$data_obj;
- }#End foreach my $id (keys
-
- return;
-
-
-}
-
-sub get_meta_info {
- my $self = shift;
- my $msg = shift;
-
- foreach my $action (keys %{$self->{"actions"}}){
- $self->SUPER::get_meta_info($msg, $action,
@{$self->{"actions"}{$action}});
- }
-}
-
-1;

Deleted: trunk/perfSONAR/perfSONAR/MA/RIPE.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MA/RIPE.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MA/RIPE.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,108 +0,0 @@
-package perfSONAR::MA::RIPE;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-use vars qw(@ISA);
-@ISA
= qw(perfSONAR::MA);
-
-#DEBUG
-use Data::Dumper;
-#/DEBUG
-
-use strict;
-use warnings;
-
-use perfSONAR::MA;
-
-my $ns = "http://ggf.org/ns/nmwg/characteristic/delay/one-way/";;
-
-
-sub new {
- my $this = shift;
- my %param = (@_);
- my $self = perfSONAR::MA->new(%param);
- push @{$self->{"supportedEventtypes"}},
-
- (
- "http://ggf.org/ns/nmwg/characteristic/delay/summary/";,
- "http://ggf.org/ns/nmwg/tools/owd/raw";,
- "http://ggf.org/ns/nmwg/characteristic/delay/one-way/";,
- );
-
- bless $self, qw(perfSONAR::MA::RIPE);
- return $self;
-}
-
-
-my $action = "ripe";
-
-sub start_action {
- my $self = shift;
- my $msg = shift;
- my $dataid = shift;
- my $service_id = shift;
-
- my @datalines;
-
- my $data_obj = $self->SUPER::start_action($msg, $dataid, $action,
$service_id);
- if ($data_obj->isa("Hades::Data::RIPE")){
- my $data = $data_obj->{data};
- my $metric = $msg->{"dataIDs"}{$dataid}{"select"}{"metric"};
- my $sample = $msg->{"dataIDs"}{$dataid}{"select"}{"sample"};
- my $count = -1;
- foreach my $ref (@$data) {
- my %data_hash;
- my $time = $$ref{"time"};
- next unless $time;
- if ($sample){
- $count++;
- next unless $count % $sample == 0;
- }
-
- $data_hash{"time"} = $time;
- if (!$metric || $metric eq "all" || $metric eq "owd"){
- $data_hash{"owd"} = $$ref{"min_owd"};
- }
- if (!$metric || $metric eq "all" || $metric eq "ipdv"){
- $data_hash{"ipdv"} = $$ref{"min_ipdv"};
- }
- if (!$metric || $metric eq "all" || $metric eq "lost_packets"){
- $data_hash{"loss"} = $$ref{"lost_packets"};
- }
- push @datalines, \%data_hash;
- }
- }
-
- if ($#datalines > 0){
- $msg->set_data_ns($dataid, $ns, @datalines);
- }
- return 1;
-
-}
-
-
-sub get_meta_info {
- my $self = shift;
- my $msg = shift;
-
- foreach my $ev (@{$self->{"supported_eventtypes"}}){
- $self->SUPER::get_meta_info($msg, $action, $ev);
- }
-}
-
-
-1;

Deleted: trunk/perfSONAR/perfSONAR/MA/Status.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MA/Status.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MA/Status.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,146 +0,0 @@
-package perfSONAR::MA::Status;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-use vars qw(@ISA);
-@ISA
= qw(perfSONAR::MA);
-
-#DEBUG
-use Data::Dumper;
-#/DEBUG
-
-use strict;
-use warnings;
-
-
-use perfSONAR::MA;
-use perfSONAR qw(print_log);
-
-my
$ns_status="http://ggf.org/ns/nmwg/tools/hades/traceroute/aggregated/2.0/";;
-my $ns_hoplist="http://ggf.org/ns/nmwg/tools/hades/traceroute/hoplist/2.0/";;
-
-my $ns = $ns_status;
-my $action = "traceroute";
-
-sub new {
- my $this = shift;
- my %param = (@_);
- my $self = perfSONAR::MA->new(%param);
- push @{$self->{"supportedEventtypes"}},
-
- (
- "http://ggf.org/ns/nmwg/tools/hades/traceroute/aggregated/2.0/";,
- "http://ggf.org/ns/nmwg/tools/hades/traceroute/hoplist/2.0/";,
- );
-
- bless $self, qw(perfSONAR::MA::Status);
-
- return $self;
-}
-
-sub start_action {
- my $self = shift;
- my $msg = shift;
- my $dataid = shift;
- my $service_id = shift;
-
- my @datalines;
-
- my $data = $self->SUPER::start_action($msg, $dataid, $action, $service_id);
-
-
- my $messagetype = $msg->get_message_type();
-
- my $metaref = $msg->{"dataIDs"}{$dataid}{"metaref"};
- my $eventType = $self->{"eventType"};
-
- if ($data->isa("Hades::Data::Traceroute")){
-
- $data->extract_data();
-
- if ($data->isa("Hades::Data::Traceroute")){
- #print Dumper($data->{traceroutes});
- #print Dumper($data->{timeline});
-
- foreach my $timestamp (@{$data->{"timeline"}}){
- #my %data_hash;
- my $ref = $timestamp->{"ref"};
- next if (!defined $ref); #TODO Doesn't this ignore gaps ???
- my $time = $timestamp->{"time"};
- my (@hops, $hopcount);
- if ($ref >= 0) {
- @hops = @{$data->{"traceroutes"}->[$ref]};
- $hopcount = $#hops;
- } else {
- # Error! TODO handle this correctly !!!
- @hops = (); $hopcount = 0;
- }
- if ($eventType =~ /aggregated/){
- my %data_hash;
- $data_hash{"timeValue"} = $time;
- $data_hash{"timeType"} = "unix";
- $data_hash{"hopcount"} = $hopcount;
- $data_hash{"routeref"} = $ref;
- #print "$ref, $time, $hopcount\n";
- push @datalines, \%data_hash;
-
- } elsif ($eventType =~ /hoplist/){
- #find data node:
- my $datanode = $msg->{"dataIDs"}{$dataid}{"node"};
- $ns = $ns_hoplist;
- my $i = 0;
- my $timenode = $msg->add_attribute(parent => $datanode, nodename
=> "commonTime",
- type => "unix", value => $time);
-
- foreach my $entry (@hops){
- my %data_hash;
- #$data_hash{"timeValue"} = $time;
- #$data_hash{"timeType"} = "unix";
- $data_hash{"index"} = $i;
- $data_hash{"hopAddress"} = $entry->{"ip"};
- $data_hash{"type"} = "ipv4"; #TODO IPv6!
- $data_hash{"hopHostname"} = $entry->{"name"};
-
- $msg->add_attribute(parent => $timenode, nodename => "datum",
- namespace => $ns_hoplist, %data_hash);
- $i++;
- }
- }
- }
- }
- if ($#datalines >= 0){
- $msg->set_data_ns($dataid, $ns, @datalines);
- }
- }
- return 1;
-}
-
-sub get_meta_info {
- my $self = shift;
- my $msg = shift;
-
- my $eventtype = $ns_status;
- my $action = "traceroute";
-
- #print ("get_meta_info is nich\n"); #TODO
- #$self->SUPER::get_meta_info($msg, $action, $eventtype);
-
-
-}
-
-
-1;

Deleted: trunk/perfSONAR/perfSONAR/MA.old.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MA.old.pm 2014-02-28 14:07:01 UTC (rev 845)
+++ trunk/perfSONAR/perfSONAR/MA.old.pm 2014-02-28 14:11:06 UTC (rev 846)
@@ -1,398 +0,0 @@
-package perfSONAR::MA;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-#TODO
-# - Build IPPM (and RIPE) class tree as in Hades::Data
-
-use vars qw(@ISA);
-#@ISA
= qw(SOAP::Server::Parameters);
-
-#DEBUG
-use Data::Dumper;
-#/DEBUG
-
-use strict;
-use warnings;
-
-use Carp;
-
-use Hades;
-use Hades::Config;
-use Hades::Data::Finder_SQL;
-use Hades::Data::Finder;
-
-use perfSONAR qw(print_log);
-
-#this module is responsible for the select eventtype and relays action
-#to appropriate data module
-
-sub new {
- my $this = shift;
- my $class = ref($this) || $this;
- my %param = (@_);
-
- # Now create config and initialise everything
- $Hades::configfile = undef;
- $Hades::config = undef;
- my $config = Hades::Config->new(
- configfile => $param{config},
- use_argv => 0,
- );
- # We don't need it anymore and it "may" cause trouble:
- delete $param{config};
- # Init config
- $config->init() or die;
- # Copy module config to config. TODO Really all?
- @{$config->{config}}{keys %param} = values %param;
-
- # Generate object
- my $self = {
- config => $config,
- };
- $self->{"supportedEventtypes"} = [
- "http://ggf.org/ns/nmwg/ops/select/2.0/";,
- ];
-
- bless $self, $class;
- return $self;
-}
-
-sub selftest {
- my $self = shift;
- return undef;
-}
-
-sub open_request {
- my $self = shift;
- $self->{finder} = Hades::Data::Finder_SQL->new(
- config => $self->{config},
- );
-
- return 1;
-}
-
-
-sub close_request {
- my $self = shift;
- $self->{finder} = undef;
-}
-
-sub set_eventType {
-
- my $self = shift;
- my $msg = shift;
- my $dataid = shift;
-
-
- foreach my $key (keys %{$msg->{"dataIDs"}{$dataid}}){
- next if ($key eq "node" || $key eq "metaref" || $key =~ /select/
- || $key eq "ns_uri" || $key eq "ns_prefix" );
- $self->{"eventType"} = $key;
- }
-
-}
-
-sub start_action {
-
- my $self = shift;
- my $msg = shift;
- my $dataid = shift;
- my $action = shift;
- my $service_id = shift;
-
-
- my $messagetype = $msg->get_message_type();
-
- my $metaref = $msg->{"dataIDs"}{$dataid}{"metaref"};
- my $select;
-
- $self->set_eventType ($msg, $dataid);
- my $eventType = $self->{"eventType"};
-
- foreach my $key (keys %{$msg->{"dataIDs"}{$dataid}}){
- if ($key =~ /select/) {
- $select = $key;
- }
- }
-
- if (!$select){
- print_log("error", "No select block found for data id: $dataid",
$service_id);
- return $msg->return_result_code("error.ma.parameters",
- "No select block found for data id: $dataid", $metaref);
- }
-
- if (!($msg->{"dataIDs"}{$dataid}{$select}{"startTime"}) &&
- !($msg->{"dataIDs"}{$dataid}{$select}{"endTime"})){
- print_log("error", "No timespan specified!", $service_id);
- return $msg->return_result_code("error.ma.parameters", "No timespan
specified", $metaref);
- }
-
- my $startTime = $msg->{"dataIDs"}{$dataid}{$select}{"startTime"};
- my $endTime = $msg->{"dataIDs"}{$dataid}{$select}{"endTime"};
-
- my $currentTime = time;
- if ($endTime > $currentTime){
- $endTime = $currentTime;
- $msg->return_result_code("error.ma.parameters", "endTime value lies
ahead!", $metaref);
- }
-
- #if no time is specified, take today (for convenience)
- #if (!(defined $startTime) && !(defined $endTime)) {
- # $endTime = time;
- # my ($sec,$min,$hour,$md,$mo,$ye,$wday,$yday,$isdst) =
- # localtime($endTime);
- # $startTime = Mktime(($ye+1900), $mo+1, $md, 0, 0, 0);
- # $msg->{"dataIDs"}{$dataid}{$select}{"startTime"} = $startTime;
- # $msg->{"dataIDs"}{$dataid}{$select}{"endTime"} = $endTime;
- #}
-
- my $filter = $msg->{"dataIDs"}{$dataid}{$eventType};
- if ($$filter{"interval"}){
- $$filter{"interval"} *= 1000000;
- }
-
- my $src = $msg->{"dataIDs"}{$dataid}{$eventType}{"src"}{"value"};
- my $dst = $msg->{"dataIDs"}{$dataid}{$eventType}{"dst"}{"value"};
- my $mid = $msg->{"dataIDs"}{$dataid}{$eventType}{"mid"};
-
-
- $self->{finder}->reset;
- $self->{finder}->set_time_epoch($startTime,$endTime)
- or print_log("error", "Invalid date format", $service_id),
- return $msg->return_result_code("error.ma.parameters", "Invalid
date format", $metaref);
- $self->{finder}->set_route($src,$dst); # set_route understands "undef"!!!
- if (defined $action){
- $self->{finder}->set_type($action);
- } else {
- $self->{finder}->set_type($eventType); # ignores "undef"
- }
-
-
- $self->{finder}->set_mid($mid); # ignores "undef"
- $self->{finder}->set_filter($filter); # filter with metadata
-
- my @results = $self->{finder}->find;
-
- unless (@results) {
- print_log("info","No data found", $service_id);
- return $msg->return_result_code("error.ma.data", "No data found",
$metaref);
- }
-
- my @result_params;
- if ($#results > 0){ #More than one measurment result found matching the
request pattern
- #get_meta_info($msg);
- my $output = "";
- my $count = 0;
- foreach my $result (@results){
- my $info = $result->{meta};
- my %par;
- foreach my $key (keys %{$info}){
- next if ($key eq "sender_port" || $key eq "receiver_port");
- if ($key eq "interval"){
- $par{"interval"} = $info->{"interval"} / 1000000;
- } else {
- $par{$key} = $info->{$key};
- }
- }
- $par{"sender"} = $result->{"sender"};
- $par{"receiver"} = $result->{"receiver"};
- $par{"mid"} = $result->{"mid"};
- $par{"metadataIdRef"} = "result$count";
- $count++;
-
- push @result_params, \%par;
-
-
- $output = $output . "$result->{sender} to $result->{receiver} "
- . $result->type2string() . ", mid: $result->{mid}\n";
- }
- my $message = "More than one measurement result found";
- print_log("info",$message, $service_id);
- print_log("debug","Measurements:\n$output", $service_id);
- $msg->set_parameter_list(@result_params);
- print_log("debug", $message, $service_id);
-
- return $msg->return_result_code("warning.ma.parameters", "More than one
measurement result found!", $metaref);
- }
-
- my $warnings = $self->{finder}->{warnings}->get_string();
- if ($warnings) {
- #TODO is that right/useful???
- print_log("info","Warnings from data modules:\n$warnings", $service_id);
- return $msg->return_result_code("error.ma.data", "Warnings from data
modules: $warnings", $metaref);
- }
-
-
- my $data_obj = $results[0];
-
- my $info = $data_obj->{meta};
- my %par;
- foreach my $key (keys %{$info}){
- next if ($key eq "sender_port" || $key eq "receiver_port");
- if ($key eq "interval"){
- $par{"interval"} = $info->{"interval"} / 1000000;
- } else {
- $par{$key} = $info->{$key};
- }
- }
- $par{"sender"} = $data_obj->{"sender"};
- $par{"receiver"} = $data_obj->{"receiver"};
- $par{"mid"} = $data_obj->{"mid"};
- $par{"metadataIdRef"} = $$filter{"metaID"};
- $msg->set_parameter_hash (%par);
-
- if(!(exists $data_obj->{meta})) {
- print_log("info","No meta data found", $service_id);
- return $msg->return_result_code("error.ma.data", "No meta data found",
$metaref);
- }
- print_log("info","Meta data retrieval seems to be successful",
$service_id);
-
- my @datalines;
-
- if ($messagetype eq "MetadataKeyResponse") {
- my %data_hash;
- $data_hash{"MetadataKey"} = "$src.$dst.$data_obj->{mid}";
- push @datalines, \%data_hash;
- $msg->set_data($dataid, @datalines);
- print_log("info","Created MetadataKeyResponse", $service_id);
- return 1;
- }
-
- $data_obj->extract_data();
- $warnings = $self->{finder}->{warnings}->get_string();
- #$warnings = $data_obj->{warnings}->get_string();
- if ($warnings) {
- #TODO is that right/useful???
- print_log("info","Warnings from data modules:\n$warnings", $service_id);
- return $msg->return_result_code("error.ma.data", "Warnings from data
modules: $warnings", $metaref);
- }
-
-
- my $data = $data_obj->get_data;
- unless (defined $data) {
- print_log("info","No data found", $service_id);
- return $msg->return_result_code("error.ma.data", "No data found",
$metaref);
- }
-
- print_log("info","Data retrieval seems to be successful", $service_id);
- #print_log("debug","Data:\n$data"); #Too verbose...
-
-
- return $data_obj; #let data specific modules handle this
-}
-
-sub get_meta_info {
- my $self = shift;
- my $msg = shift;
- my $action = shift;
- my @eventtypes = @_;
-
- $self->open_request;
- $self->{finder}->reset;
-
- my $endTime = time;
- my $startTime = $endTime - 300;
-
- $self->{finder}->set_time_epoch($startTime,$endTime);
-
- $self->{finder}->set_type($action);
- my @results = $self->{finder}->find;
-
- my $datanode = ($msg->{dom}->getElementsByLocalName("data"))[0];
-
-
- foreach my $result (@results){
- foreach my $key (keys %{$result}){
- next if $key eq "get_data_object";
- next if $key eq "get_data_options";
- }
- my $info = $result->{meta};
- my %par;
- my %subject;
-
- my $metaid = $result->{"mid"};
-
- my ($src_type, $dst_type) = "unknown"; #TODO ipv6!
- $src_type = "ipv4" if ($info->{"sender_ip"} =~ /\d+\.\d+\.\d+\.\d+/);
- $dst_type = "ipv4" if ($info->{"receiver_ip"} =~ /\d+\.\d+\.\d+\.\d+/);
-
-
- my $substring = "<nmwg:subject
xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\"; id=\"subject-$metaid\">\n";
- $substring .= " <nmtl4:endPointPair
xmlns:nmtl4=\"http://ogf.org/schema/network/topology/l4/20070707/\";>\n";
- $substring .= " <nmtl4:src id=\"$result->{sender}\">\n";
- $substring .= " <nmtl4:port>\n";
- $substring .= " <nmtl4:address type=\"$src_type\"
value=\"$info->{sender_ip}\"/>\n";
- $substring .= "
<nmtl4:portNum>$info->{sender_port}</nmtl4:portNum>\n";
- $substring .= " </nmtl4:port>\n";
- $substring .= " </nmtl4:src>\n";
-
- $substring .= " <nmtl4:dst id=\"$result->{receiver}\">\n";
- $substring .= " <nmtl4:port>\n";
- $substring .= " <nmtl4:address type=\"$dst_type\"
value=\"$info->{receiver_ip}\"/>\n";
- $substring .= "
<nmtl4:portNum>$info->{receiver_port}</nmtl4:portNum>\n";
- $substring .= " </nmtl4:port>\n";
- $substring .= " </nmtl4:dst>\n";
- $substring .= " </nmtl4:endPointPair>\n";
- $substring .= "</nmwg:subject>\n";
-
-=cut
- $subject{"endPointPair"}{"namespace"} =
"http://ogf.org/schema/network/topology/l4/20070707/";;
- $subject{"endPointPair"}{"prefix"} = "nmtl4";
-
- $subject{"endPointPair"}{"src"}{"port"}{"address"}{"ip"} =
$info->{"sender_ip"};
- $subject{"endPointPair"}{"src"}{"port"}{"address"}{"IFName"} =
$result->{"sender"};
- $subject{"endPointPair"}{"src"}{"port"}{"portNum"}{"element"} =
$info->{"sender_port"};
- $subject{"endPointPair"}{"dst"}{"port"}{"address"}{"ip"} =
$info->{"receiver_ip"};
- $subject{"endPointPair"}{"dst"}{"port"}{"address"}{"IFName"} =
$result->{"receiver"};
- $subject{"endPointPair"}{"dst"}{"port"}{"portNum"}{"element"} =
$info->{"receiver_port"};
-
-
-=cut
- foreach my $key (keys %{$info}){
-
- next if $key eq "sender_ip";
- next if $key eq "receiver_ip";
- next if $key eq "sender_port";
- next if $key eq "receiver_port";
-
-
- if ($key eq "interval"){
- $par{"interval"} = $info->{"interval"} / 1000000;
- } else {
- $par{$key} = $info->{$key};
- }
- }
-
- my $subref = \%subject;
- my $parref = \%par;
- my $eventref =
\@eventtypes;
-
-
- $msg->create_metadatablock( #subject => $subref,
- substring => $substring,
- parameters => $parref,
- eventtypes => $eventref,
- metadata_id => $metaid,
- parent => $datanode,
- );
-
-
- }
- $self->close_request;
-}
-1;

Deleted: trunk/perfSONAR/perfSONAR/MP/BWCTL.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MP/BWCTL.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MP/BWCTL.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,219 +0,0 @@
-package perfSONAR::MP::BWCTL;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-=head1 NAME
-
-perfSONAR::MP::BWCTL
-
-=head1 DESCRIPTION
-
-This class runs measurementds for BWCTL. It use as base class the MP class.
All BWCTL specific
-definitions done here. This class has no concstructor defined. Ituse the new
method from MP class
-
-=cut
-
-
-use strict;
-use warnings;
-
-
-#DEBUG
-use Data::Dumper;
-#DEBUG
-
-use version;
-our $VERSION = 0.53;
-
-use Log::Log4perl qw(get_logger);
-use base qw(perfSONAR::MP);
-
-
-=head2 run()
-
-The run method starts a bwctl measurement and use the runMeasurement()
-method from perfSONAR::MP. To start the measurement a data struct as
-input is needed. For example to start a bwctl measurement:
-
-1. $bwctl = perfSONAR::MP::BWCTL->new();
-2.$ds = perfSONAR::DataStruct->new($uri, $message);
-3. $bwctl->run();
-
-=cut
-sub run{
- my ($self, $ds) = @_;
- $self->{LOGGER} = get_logger(__PACKAGE__);
- $self->{DS} = $ds;
- $self->runMeasurement();
-}
-
-
-=head2 createCommandLine({})
-
-To start a measurement with bwctl a commandline expression is needed.
-This expression will be created here. As input a hash parameter of bwctl
options are needed.
-On success it will return a array with bwctl options and parameters. On
errpr it
-will return an array with ("ERROR,error message as string).
-
-=cut
-sub createCommandLine{
- my ($self,%parameters) = @_;
- my @commandline;
- my $errormsg;
-
- unless ($parameters{"src"} || $parameters{"dst"}) {
- $errormsg = "Neither source nor destination ip address specified.";
- $self->{LOGGER}->error($errormsg);
- return "ERROR", $errormsg;
- }
-
- if ($parameters{"src"} eq $parameters{"dst"}) {
- $errormsg = "Source ip address equal to destination ip address.";
- $self->{LOGGER}->error($errormsg);
- return "ERROR", $errormsg;
- }
-
- #check parameters to be correct input:
- #TODO test this condition
- foreach my $param (keys %parameters){
- next if ($param eq "param_ns_prefix" ||
- $param eq "metaID" ||
- $param eq "subject_ns_prefix" ||
- $param eq "parameter_ID" ||
- $param eq "param_ns_uri" ||
- $param eq "subject_ns_uri");
- next if ($param eq "src" || $param eq "dst");
- if ($param eq "login" || $param eq "password"){
- unless ($parameters{$param} =~ /^\w+$/){
- $errormsg = "Invalid login/password string specified.";
- $self->{LOGGER}->error($errormsg);
- return "ERROR", $errormsg;
- }
- next;
- }#End if ($param eq "login
- if ($param eq "TOS"){
- unless ($parameters{$param} =~ /^\d+|0x\d+$/){
- $errormsg = "Invalid TOS string specified.";
- $self->{LOGGER}->error($errormsg);
- return "ERROR", $errormsg;
- }
- next;
- }#End if ($param eq "TOS
- if ($param eq "protocol"){
- unless ($parameters{$param} =~ /^udp$/i || $parameters{$param}
=~ /^tcp$/i){
- $errormsg = "Unknown protocol: $parameters{protocol}";
- $self->{LOGGER}->error($errormsg);
- return "ERROR", $errormsg;
- }
- next;
- }#End if ($param eq "protocol
- unless ($parameters{$param} =~ /^\d+$/){
- $errormsg = "Invalid value specified for $param.";
- $self->{LOGGER}->error($errormsg);
- return "ERROR",
- }
- }#End foreach my $param
- #End parameter check
-
- #Now create Command
- push @commandline , "-s" , $parameters{"src"};
- push @commandline , "AE", "AESKEY" if($parameters{"login"});
- push @commandline , $parameters{login} if($parameters{"login"});
- push @commandline , "-c", $parameters{dst};
- push @commandline , "AE", "AESKEY" if($parameters{"login"});
- push @commandline , $parameters{login} if($parameters{"login"});
- push @commandline , "-i", $parameters{interval}
if($parameters{"interval"});
- push @commandline , "-t", $parameters{duration}
if($parameters{"duration"});
- push @commandline , "-w", $parameters{windowSize}
if($parameters{"windowSize"});
- push @commandline , "-u" if ($parameters{"protocol"} &&
$parameters{"protocol"} =~ /^udp$/i);
- push @commandline , "-l", $parameters{bufferSize}
if($parameters{"bufferSize"});
- push @commandline , "-b", $parameters{bandwidth}
if($parameters{"bandwidth"});
- push @commandline , "-S", $parameters{TOS} if($parameters{"TOS"});
-
- return @commandline;
-
-}
-
-
-=head2 parse_result({})
-
-After a measurement call the result message of the tool should be parsed.
-This method will be called from the MP class. The measurement result
-ub $$ds->{PARAMS}->{$id}->{MEASRESULT}will be used. On success it returns
-a array. The elements of the array are hashes. On error the
$$ds->{ERROROCCUR}
-will be set to 1. For this $$ds->{RETURNMSG} will be set to the error string.
-
-=cut
-sub parse_result {
-
- my ($self, $ds, $id) = @_;
- my $result = $$ds->{SERVICE}->{DATA}->{$id}->{MEASRESULT};
- my @result = split(/\n/, $result);
- my @datalines;
- my $time = time;
-
-
- foreach my $resultline (@result){
- next unless ($resultline =~
-
/(\d+\.\d+\s*\-\s*\d+\.\d+)\s+sec\s+(\d+\.?\d*)\s+(\w+)\s+(\d+\.?\d*)\s+(\w+\/\w+)/);
-
- my %data_hash;
-
- $data_hash{"timeType"} = "unix";
- $data_hash{"timeValue"} = $time;
- $data_hash{"interval"} = $1;
- $data_hash{"numBytes"} = $2;
- $data_hash{"numBytesUnits"} = $3;
- $data_hash{"value"} = $4;
- $data_hash{"valueUnits"} = $5;
- push @datalines, \%data_hash;
- }
- if($#datalines < 0){
- #no data -> something wrong, write result as error description:
- $datalines[0]="BWCTL Error:";
- my $errorstring = "@result";
- $errorstring =~ s/usage.*$//;
- $$ds->{ERROROCCUR} = 1;
- $self->{LOGGER}->error($errorstring);
- push @datalines, @result;
- push @datalines,"error.mp.bwctl";
- }
- return @datalines;
-}
-
-
-=head2 selftest()
-Define here the steps for the selftest
-=cut
-sub selftest{
- my ($self, $ds, $id) = @_;
- my $params = $$ds->{SERVICE}->{DATA};
- my @datalines;
-
- foreach my $id (keys %{$params}){
- my %data_hash;
-
- $data_hash{'bwctl_command_test'} =
[$self->checkTool("bwctl")];
- $data_hash{"bwctld_running_test"} =
[$self->checkToolisrunning("bwctld")];
- $data_hash{"ntpd_running_test"} =
[$self->checkToolisrunning("ntpd")];
-
- push @datalines, \%data_hash;
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@datalines
- }#End foreach
- return;
-}
-
-1;

Deleted: trunk/perfSONAR/perfSONAR/MP/Generic.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MP/Generic.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MP/Generic.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,165 +0,0 @@
-package perfSONAR::MP::Generic;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-use vars qw(@ISA);
-@ISA
= qw(perfSONAR::MP);
-
-#DEBUG
-use Data::Dumper;
-#/DEBUG
-
-use strict;
-use warnings;
-
-use Carp;
-
-use perfSONAR::MP;
-
-BEGIN {
- use vars qw($VERSION);
- $VERSION = 0.51;
-}
-
-my $ns_store = "http://ggf.org/ns/nmwg/ops/store/2.0";;
-
-sub new {
-
- my $self = perfSONAR::MP->new;
- push @{$self->{"supportedEventtypes"}},
- (
- "http://ggf.org/ns/nmwg/tools/generic/2.0/";,
- );
-
- $self->{"known_parameters"} = {
-
- src => 1,
- dst => 1,
- command => 1,
- commandline => 1,
- };
-
- $self->{"unsupported_parameters"} = undef;
-
- bless $self, qw(perfSONAR::MP::Generic);
- return $self;
-}
-
-sub selftest {
- my $self = shift;
- my $test = shift;
- my $message = "perfSONAR Status: ";
- if ($test eq "basic"){ #perform basic selftest
- #$message .= `ps auxw |grep bwctld`;
- $message .= "basic... ";
- }
-}
-
-
-sub start_action {
- my $self = shift;
- my $msg = shift;
- my $dataid = shift;
- my $service_id = shift;
-
- $self->{"service_id"} = shift;
-
- my %parameters;
-
- %parameters = $self->get_parameters($msg->{"dataIDs"}{$dataid});
-
- my $error = $self->check_parameters(%parameters);
-
- if ($error){
- $self->print_log_id ("info", $error);
- return $msg->return_result_code("error.mp.bwctl", $error,
$msg->{"dataIDs"}{$dataid}{"metaref"});
- }
-
-
- my $ns = "http://ggf.org/ns/nmwg/tools/generic/2.0/";;
-
- my @datalines;
-
- my $messagetype = $msg->get_message_type();
-
- if ($messagetype =~ /EchoResponse/){
- #do selftests TODO
- return $msg->return_result_code("error.mp.generic", "Action not
supported", $msg->{"dataIDs"}{$dataid}{"metaref"});
- return 1;
- }
-
- if ($messagetype eq "MetadataKeyResponse") {
- #TODO
- return $msg->return_result_code("error.mp.generic", "Action not
supported", $msg->{"dataIDs"}{$dataid}{"metaref"});
- return 1;
- }
-
-
- my $commandline = $parameters{"commandline"};
- my $command = $parameters{"command"};
-
- my $command_path = `which $command`;
- if(!$command_path){
-
- my @paths = ( "/bin/", "/usr/bin/", "/sbin/", "/usr/sbin/",
"/usr/local/bin/", "/usr/local/sbin/" );
-
- foreach my $p (@paths){
-
- my $c = `which $p$command`;
- if ($c){
- $command_path = $c;
- last;
- }
- }
- }
- if(!$command_path){
- return $msg->return_result_code("error.mp.generic", "$command not found
(maybe not in PATH?)", $msg->{"dataIDs"}{$dataid}{"metaref"});
- }
-
- chomp ($command_path);
-
- print "$command_path $commandline | sed 's/^/STDOUT:/'\n";
-
- open (COMMAND, "($command_path $commandline | sed 's/^/STDOUT:/') 2>&1 |")
||
- return $msg->return_result_code("error.mp.generic", "Could not perform
$command: $!", $msg->{"dataIDs"}{$dataid}{"metaref"});
-
- while (<COMMAND>){ #read in output of command
- my $line = $_;
- chomp $line;
- print "$line\n";
- my %outputhash;
- if (/^STDOUT:/){
- $line =~ s/^STDOUT://;
- $outputhash{"output"} = $line;
- } else {
- $outputhash{"error"} = $line;
- }
- push @datalines, \%outputhash;
- }
-
-
- if ($ns){
- $msg->set_data_ns($dataid, $ns, @datalines);
- } else{
- $msg->set_data($dataid, @datalines);
- }
- return 1;
-
-}
-
-1;
-

Deleted: trunk/perfSONAR/perfSONAR/MP/LSToolreg.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MP/LSToolreg.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MP/LSToolreg.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,74 +0,0 @@
-package perfSONAR::MP::LSToolreg;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-
-use strict;
-use warnings;
-
-#DEBUG
-use Data::Dumper;
-#/DEBUG
-use Config::General qw(ParseConfig SaveConfig SaveConfigString);
-use base qw(perfSONAR::MP);
-
-=head1 NAME
-
-perfSONAR::MP::LSToolreg - Module for registering lokal tools on a Lookup
service
-
-=head1 SYNOPSIS
-
-use perfSONAR::MP::LSToolreg;
-my $lstoolreg = perfSONAR::MP::LSToolreg->new();
-$lstoolreg->run();
-
-=head1 DESCRIPTION
-
-if you want to register local tools on you host like nwctld on a lookup
service
-so use this modul for registering.
-=cut
-
-=head2 run()
-start this method to start this module
-=cut
-sub run{
- my $self = shift;
-
- #Define default
- $self->{DEFAULT}->{PORT}->{'bwctld'} = "4823";
- $self->{DEFAULT}->{PORT}->{'owampd'} = "861";
- $self->{DEFAULT}->{PORT}->{'owamp2hades'} = "8610";
-
- #look if tools are availible
- my $i = scalar keys %{$self->{MODPARAM}};
- if ($i < 1){
- $self->{LOGGER}->warn("No tools defined for LSToolreg.Please
define it in lstoolreg.conf file");
- }
- foreach my $tool (keys %{$self->{MODPARAM}}){
- #look if tool is running
- my @res = $self->checkToolisrunning($tool);
- if ($res[1] eq "success"){
- #set tool is availible
- $self->{MODPARAM}->{$tool}->{REGTOOL} = "yes";
-
- if (!defined($self->{MODPARAM}->{$tool}->{'port'})){
- $self->{LOGGER}->warn("Port is not defined.
Using default port for tool: $tool");
- $self->{MODPARAM}->{$tool}->{'port'} =
$self->{DEFAULT}->{PORT}->{$tool};
- } }
- } # End foreach
-
-}
-1;

Deleted: trunk/perfSONAR/perfSONAR/MP/OWAMP.pm
===================================================================
--- trunk/perfSONAR/perfSONAR/MP/OWAMP.pm 2014-02-28 14:07:01 UTC (rev
845)
+++ trunk/perfSONAR/perfSONAR/MP/OWAMP.pm 2014-02-28 14:11:06 UTC (rev
846)
@@ -1,404 +0,0 @@
-package perfSONAR::MP::OWAMP;
-#
-# Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e.
V.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-=head1 NAME
-
-perfSONAR::MP::OWAMP
-
-=head1 DESCRIPTION
-
-This class runs measurementds for OWAMP. It use as base class the MP class.
All OWAMP specific
-definitions done here. This class has no concstructor defined. Ituse the new
method from MP class
-
-=cut
-
-
-use strict;
-use warnings;
-
-
-#DEBUG
-use Data::Dumper;
-#DEBUG
-
-use version;
-our $VERSION = 0.53;
-
-use Log::Log4perl qw(get_logger);
-use base qw(perfSONAR::MP);
-use POSIX;
-
-
-=head2 run()
-
-The run method starts a OWAMP measurement and use the runMeasurement()
-method from perfSONAR::MP. To start the measurement a data struct as
-input is needed. For example to start a OWAMP measurement:
-
-1. $owamp = perfSONAR::MP::OWAMP->new();
-2.$ds = perfSONAR::DataStruct->new($uri, $message);
-3. $owamp->run();
-
-=cut
-sub run{
- my ($self, $ds) = @_;
- $self->{LOGGER} = get_logger(__PACKAGE__);
- $self->{DS} = $ds;
- $self->runMeasurement();
-}
-
-
-=head2 createCommandLine({})
-
-To start a measurement with owamp a commandline expression is needed.
-This expression will be created here. As input a hash parameter of owamp
options is needed.
-On success it will return a array with owamp options and parameters. On
errpr it
-will return an array with ("ERROR,error message as string).
-
-=cut
-sub createCommandLine{
- my ($self,%parameters) = @_;
- my @commandline;
- my $errormsg;
- my $ds = $self->{DS};
-
- #$self->{LOGGER}->debug(Dumper(%parameters));
-
- push @commandline, "-S" , $parameters{src} if($parameters{"src"});
- push @commandline, "-c" , $parameters{count} if $parameters{count};
- push @commandline, "-L" , $parameters{timeout} if $parameters{timeout};
- #TODO HOW to
- push @commandline, "-s" , $parameters{size} if $parameters{size};
- push @commandline, "-H" , $parameters{PHB} if $parameters{PHB};
- push @commandline, "-D", $parameters{DSCP} if $parameters{DSCP};
- push @commandline, "-i", $parameters{wait} if $parameters{wait};
- push @commandline, "-E", $parameters{enddelay} if $parameters{enddelay};
- push @commandline, "-z", $parameters{startdelay} if
$parameters{startdelay};
- push @commandline, "-b", $parameters{bucket_width} if
$parameters{bucket_width};
- if ( $parameters{intermediates} ) {
- push @commandline, "-N", $parameters{intermediates};
- if ($parameters{intermediates} >= $parameters{count} ){
- $self->{intermediates} = 1;
- }else{
- my $mod_res = ceil( $parameters{count} /
$parameters{intermediates});
- $self->{intermediates} = $mod_res;
-
- #Let us calculate wait time to start measurement every minute
- my $dt = DateTime->now;
- my $waittime = 60 - $dt->second;
- push @commandline, "-z", $waittime;
- }
- } else {
- $self->{intermediates} = 1;
- }
- #Look for the output type
- if ($parameters{"output"} && $parameters{"output"} eq "summary"){
- $self->{OUTPUTTYPE} = "summary";
- }
- elsif ($parameters{"output"} && ($parameters{"output"} eq
"machine_readable")){
- push @commandline, "-M";
- $self->{OUTPUTTYPE} = "machine_readable";
- }
- elsif ($parameters{"output"} && ($parameters{"output"} eq "raw")){
- push @commandline, "-R";
- $self->{OUTPUTTYPE} = "raw";
- }
- elsif ($parameters{"output"} ){
- #unknown output type
- $errormsg = "You choose a unknown output type: $parameters{output}.";
- $self->{LOGGER}->error($errormsg);
- return "ERROR", $errormsg, "error.mp.owamp";
- }
- else{
- #No output type defined
- push @commandline, "-R";
- $self->{OUTPUTTYPE} = "raw";
- }
-
- push @commandline, "-P", $parameters{portrange} if
$parameters{portrange};
-
- push @commandline, "-a" if($parameters{"percentile"});
- if($parameters{"one_way"} && ($parameters{"one_way"} eq "from")){
- push @commandline, "-f";
- }elsif($parameters{"one_way"} && ($parameters{"one_way"} eq "to")){
- push @commandline, "-t";
- }else{
- push @commandline, "-t";
- }
-
- #Append destination
- if ($parameters{"dst"} ){
- if ($parameters{"port"} ){
- my $dst = "$parameters{dst}:$parameters{port}";
- push @commandline, $dst;
- }
- else{
- push @commandline, $parameters{"dst"};
- }
- }
- else{
- $errormsg = "No destination address specified.";
- $self->{LOGGER}->error($errormsg);
- return "ERROR", $errormsg, "error.mp.owamp";
- }
-
- #Check the command
-
#$self->{LOGGER}->info(Dumper($$ds->{SERVICES}->{$$ds->{SERVICE}->{NAME}}->{module_param}));
- my $countlimit =
$$ds->{SERVICES}->{$$ds->{SERVICE}->{NAME}}->{module_param}->{countlimit};
- if (int($parameters{"count"}) >int($countlimit)){
- $errormsg = "count parameter greater than $countlimit is not allowed.
Please change it in your request.";
- return "ERROR", $errormsg;
- }
- #$self->{LOGGER}->info(Dumper($countlimit));
-
- return @commandline;
-
-}
-
-
-=head2 parse_result({})
-
-After a measurement call the result message of the tool should be parsed.
-This method will be called from the MP class. The measurement result
-in $$ds->{PARAMS}->{$id}->{MEASRESULT}will be used. On success it returns
-a array. The elements of the array are hashes. On error the
$$ds->{ERROROCCUR}
-will be set to 1. For this $$ds->{RETURNMSG} will be set to the error string.
-
-=cut
-sub parse_result {
-
- my ($self, $ds, $id) = @_;
- my $result = $$ds->{SERVICE}->{DATA}->{$id}->{MEASRESULT};
- my @result = split(/\n/, $result);
- my $time = time;
- my @datalines = ();
-
- #$self->{LOGGER}->info("@result");
-
- if ($self->{OUTPUTTYPE} eq "raw"){
- foreach my $resultline (@result){
- if ($resultline =~
- #SEQNO STIME SSYNC SERR RTIME RSYNC RERR TTL\n
- /(\d+)\s*(\d+)\s*(\d+)\s(.+)\s(\d+)\s(\d+)\s(.+)\s(\d+)/){
- my %data_hash;
- $data_hash{"sequenceNumber"} = $1;
- $data_hash{"sendTime"} = $2;
- $data_hash{"sendSynchronized"} = $3;
- $data_hash{"sendTimeError"} = $4;
- $data_hash{"receiveTime"} = $5;
- $data_hash{"receiveSynchronized"} = $6;
- $data_hash{"receiveTimeError"} = $7;
- $data_hash{"packetTTL"} = $8;
- push @datalines, \%data_hash;
- } #End foreach
- #$self->{LOGGER}->info(Dumper(@datalines));
- }#End if
- }elsif ($self->{OUTPUTTYPE} eq "machine_readable"){
- my $begin_buckets = 0;
- my $begin_nreorder = 0;
- my %data_hash = ();
- my $linecount = 0;
-
-
- #$self->{LOGGER}->debug(Dumper(@result));
-
- foreach my $resultline (@result){
- next if $resultline =~ /Approximately/;
- next if $resultline =~ s/^\s+//;
-
- #look if <BUCKETS> begin
- $begin_buckets = 1 if $resultline =~ /<BUCKETS/;
-
- #Look if <NREORDERING>
- $begin_nreorder = 1 if $resultline =~ /<NREORDERING>/;
-
-
- if (!$begin_buckets){
- if (!$begin_nreorder){
- my ($key, $value) = split (/\s+/, $resultline);
- $data_hash{$key} = $value;
- $linecount++;
- if ($linecount == 24){
- push @datalines, \%data_hash;
- $linecount = 0;
- }
- }
- }#End if (!$begin_buckets
- else{
- #TODO add buckets
- }
-
- $begin_buckets = 0 if $resultline =~ /\/BUCKETS/;
- $begin_nreorder = 0 if $resultline =~ /\/NREORDERING/;
-
- #$self->{LOGGER}->debug(Dumper($linecount));
- }# End foreach
- }#End if
- elsif ($self->{OUTPUTTYPE} eq "summary"){
- my $count = 0;
- while( $count < $self->{intermediates} ){
- my %data_hash;
- $count += 1;
- #foreach my $resultline (@result){
- while(@result){
- my $resultline = shift(@result);
- next if $resultline =~ /Approximately/;
- next if $resultline =~ /owping: FILE=/;
- next if $resultline =~ s/^\s+//;
- #--- owping statistics from [131.188.81.234]:38399 to
[198.124.252.101]:9169 --- if ($resultline =~
- if ($resultline =~
-
/---\s+owping\s+statistics\s+from\s+\[(\S+)\]:(\S+)\s+to\s+\[(\S+)\]:(\S+)/){
- $data_hash{"sender"} = $1;
- $data_hash{"receiver"} = $3;
- }elsif ($resultline =~
- #10 sent, 0 lost (0.000%), 0 duplicates
-
/(\d+)\s+sent,\s+(\d+)\s+lost\s+\((\S+)\),\s+(\d+)\s+duplicates/){
- $data_hash{"sent"} = $1;
- $data_hash{"loss"} = $2;
- my $lostPercentage = substr($3, 0, 1); #delete the percent
symbol
- $data_hash{"lost_percent"} = $lostPercentage / 100; #Percent
as float
- $data_hash{"duplicates"} = $4;
- #push @datalines, \%data_hash;
- }elsif ($resultline =~
- #first: 2012-10-17T11:45:00.601
- /first:\s+(\d+-\d+-\d+T\d+:\d+:\d+.\d+)/){
- my $starttime = $self->parseOWAMPTime($1);
- $self->{LOGGER}->debug("Starttime: $starttime");
- $data_hash{"startTime"} = $starttime;
- }elsif ($resultline =~
- #last: 2012-11-29T15:13:11.386
- /last:\s+(\d+-\d+-\d+T\d+:\d+:\d+.\d+)/){
- my $endTime = $self->parseOWAMPTime($1);
- $data_hash{"endTime"} = $endTime;
- } elsif ($resultline =~
- #one-way delay min/median/max = 0.202/0.4/0.582 ms,
(err=0.628 ms)
- #/one-way delay min\/median\/max =
(\S+\/\S+\/\S+)\s+(\w+),\s+\(err=(.+)\s+(\w+)/){
- /one-way delay min\/median\/max =
(\S+\/\S+\/\S+)\s+(\w+),\s+\((.+)\)/){
- my $delay = $1;
- my ($min,$med,$max) = split ("/", $delay);
- $data_hash{"timeType"} = $2;
- if ( $3 =~
- # unsynchronized
- /unsync/ ){
- $data_hash{"maxError"} = "NaN";
- }elsif ( $3 =~
- #err=0.628 ms
- /err=(.+)\s+(\w+)/){
- $data_hash{"maxError"} = $1;
- }
- #Sometime occur for delay nan adjust it to schema NaN
- $min = "NaN" if $min =~ m/nan/;
- $med = "NaN" if $med =~ m/nan/;
- $max = "NaN" if $max =~ m/nan/;
- $data_hash{"min_delay"} = $min;
- $data_hash{"med_delay"} = $med;
- $data_hash{"max_delay"} = $max;
- #$data_hash{"error_units"} = $4;
- #push @datalines, \%data_hash;
- }elsif ($resultline =~
- #one-way jitter = 0.1 ms (P95-P50)
- /one-way jitter\s+=\s+([0-9.]+)\s+(\w+)\s\(P95-P50\)/){
- my $jitter = $1;
- $jitter = "NaN" if $jitter =~ m/nan/;
- $data_hash{"jitter"} = $jitter;
- #$data_hash{"jitter_units"} = $2;
- }elsif ($resultline =~
- #Hops = 12 (consistently)
- /Hops =\s+(\d+)\s+\(consistently\)/){
- $data_hash{"hops"} = $1;
- #Hops is the last line which we use as the end of a summary
- last;
- }elsif ($resultline =~
- #TTL not reported
- /TTL not reported/){
- $data_hash{"hops"} = 0; #No hops
- last;
- }else { next; }
- }#End foreach
- # Add hash to data container after break from foreach
- push @datalines, \%data_hash; # if (scalar keys %data_hash > 0)
- } #End while ($count <
- }#elsif ($self->{OUTPUTTYPE} eq "summary"
- #$self->{LOGGER}->info(Dumper(@datalines));
- if($#datalines < 0){
- #no data -> something wrong, write result as error description:
- $datalines[0]="OWAMP Error:";
- push @datalines, @result;
-
- my $errorstring = "@datalines";
- $$ds->{ERROROCCUR} = 1;
- $self->{LOGGER}->error($errorstring);
- push @datalines,"error.mp.owamp";
- } #End if ($#datalines < 0
-
- return @datalines;
-}
-
-=head2 selftest()
-Define here the steps for the selftest
-=cut
-sub selftest{
- my ($self, $ds, $id) = @_;
- $self->{LOGGER} = get_logger(__PACKAGE__);
- my $params = $$ds->{SERVICE}->{DATA};
- my @datalines;
-
- foreach my $id (keys %{$params}){
- my %data_hash;
-
- $data_hash{'owping_command_test'} =
[$self->checkTool("owping")];
- $data_hash{"owampd_running_test"} =
[$self->checkToolisrunning("owampd")];
- $data_hash{"ntpd_running_test"} =
[$self->checkToolisrunning("ntpd")];
-
- push @datalines, \%data_hash;
- $$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@datalines
- }#End foreach
- return;
-}
-
-=head2 parseOWAMPTime(owamptime)
-The owping returns a time stamp of format:
year-month-dayThours:minutes:seconds.millisecond
-Use this method to get a time stamp like Wed Aug 25 14:20:09.2638497491 UTC
2010
-=cut
-sub parseOWAMPTime{
-
- my ($self,$starttime) = @_;
- my ($date,$time) = split ("T", $starttime);
- my ($year,$month,$day) = split ("-", $date);
- my ($hour,$min,$asec) = split (":", $time);
- my ($sec,$msec) = split ('\.', $asec);
-
- my $dt = DateTime->new(
- year => $year,
- month => $month,
- day => $day,
- hour => $hour,
- minute => $min,
- second => $sec,
- nanosecond => $msec * 1000
- #time_zone => strftime("%Z", localtime())
-
- );
-
-
- # We need the UTC Time
- my $isoTS = $dt->day_abbr ." ". $dt->month_abbr . " ". $dt->day ." ".
$dt->hms ."." . $msec ." UTC " . $dt->year;
- return $isoTS;
-
-}
-
-1;



  • [pS-dev] [GEANT/SA2/SA2T3-OPPD] r846 - in trunk/perfSONAR/perfSONAR: . MA MP, svn-noreply, 02/28/2014

Archive powered by MHonArc 2.6.16.

Top of Page