perfsonar-dev - [pS-dev] [GEANT/SA2/SA2T3-OPPD] r689 - trunk/lib/perfSONAR/DataStruct
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/SA2T3-OPPD] r689 - trunk/lib/perfSONAR/DataStruct
- Date: Wed, 9 Mar 2011 13:51:12 GMT
Author: dfn.calim
Date: 2011-03-09 13:51:12 +0000 (Wed, 09 Mar 2011)
New Revision: 689
Modified:
trunk/lib/perfSONAR/DataStruct/NMWG.pm
Log:
Some changes in MA::Hades
Modified: trunk/lib/perfSONAR/DataStruct/NMWG.pm
===================================================================
--- trunk/lib/perfSONAR/DataStruct/NMWG.pm 2011-03-07 10:20:10 UTC (rev
688)
+++ trunk/lib/perfSONAR/DataStruct/NMWG.pm 2011-03-09 13:51:12 UTC (rev
689)
@@ -66,6 +66,7 @@
$self->{NS}->{RAW} = "http://ggf.org/ns/nmwg/tools/owd/raw";
$self->{NS}->{HADES} =
"http://ggf.org/ns/nwmg/tools/hades/aggregated";
$self->{NS}->{HOPLIST} =
"http://ggf.org/ns/nmwg/tools/hades/traceroute/hoplist/2.0/";
+ $self->{NS}->{RAW} = "http://ggf.org/ns/nmwg/tools/owd/raw";
$self->{HADES}->{RESPARAMS}->{OCCUR} = undef;
$self->{HADES}->{ACTIONS} = {
@@ -495,14 +496,15 @@
#Sometimes we need here parse result
if ($$ds->{SERVICE}->{DOPARSE}){
if ($$ds->{SERVICE}->{NAME} =~ /HADES/){
- $self->{LOGGER}->info("Starting parse STATUS MA");
$self->parseHadesMA($$ds->{NMWG}->{HADES}->{STATUSDATA},$id,$ds);
}
}
}else{
#Hades MA need a another parse
if ($$ds->{SERVICE}->{NAME} =~ /HADES/){
- $datalines_ref = $self->parseHadesMA($datalines_ref,$id,$ds);
+ my @res =
$self->parseHadesMA($datalines_ref,$id,$ds);
+ $datalines_ref = $res[0]
+ $ns = $res[1]
}
$$ds->{REQUESTMSG}->set_data_ns ($id, $ns, @$datalines_ref);
@@ -610,9 +612,20 @@
my ($self, $data_obj,$id,$ds) = @_;
my @datalines;
my $ns = $self->{NS}->{HADES};
+
#$self->{LOGGER}->info(Dumper($$data_obj));
if ($$data_obj->isa("Hades::Data::IPPM_Raw")){
- $self->{LOGGER}->info("IPPM-RAW");
+ $ns = $self->{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")){
my $data = $$data_obj->{data};
my $metric =
$$ds->{REQUESTMSG}->{"dataIDs"}{$id}{"select"}{"metric"};
@@ -656,7 +669,7 @@
} #End elsif ($$data_obj->isa(
elsif ($$data_obj->isa("Hades::Data::Traceroute")){
$$data_obj->extract_data();
- my $eventType = $self->{HADES}->{ACTION}->{EVENTYPE};
+ my $eventType = $self->{HADES}->{ACTION}->{EVENTYPE};
if ($$data_obj->isa("Hades::Data::Traceroute")){
foreach my $timestamp (@{$$data_obj->{"timeline"}}){
my $ref = $timestamp->{"ref"};
@@ -699,7 +712,7 @@
}
}#End elsif ($data->isa("Hades::Data::Traceroute
- return
\@datalines;
+ return
()\@datalines,$ns);
}
- [pS-dev] [GEANT/SA2/SA2T3-OPPD] r689 - trunk/lib/perfSONAR/DataStruct, svn-noreply, 03/09/2011
Archive powered by MHonArc 2.6.16.