Send Netdot-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-users digest..."
Today's Topics:
1. Help Debug (CYPRIEN Marc)
2. Re: Help Debug (CYPRIEN Marc)
3. Re: Help Debug (CYPRIEN Marc)
----------------------------------------------------------------------
Message: 1
Date: Thu, 10 Jul 2014 10:18:42 +0200
From: CYPRIEN Marc <[email protected]>
Subject: [Netdot-users] Help Debug
To: Netdot user <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Hello,
I am trying to debug
HTDOCS/CABLE_PLANT/CABLE_PLANT_BACKBONE.MHTML because it doens't display
what I want I saw this line :
@cables =
BackboneCable->search_by_site(site1=>$start_id, site2=>$end_id);
which
seems to return the cables list of what we want.
I tried to modify
LIB/NETDOT/MODEL/BACKBONECABLE.PM but nothing change at all even with
die""; in it.
I think I must compile the lib again but I don't really
know how to do it because I don't want Netdot to crash.
Could someone
help me ?
Cordially
--
CYPRIEN Marc
ESIGETEL, ing?nieur Promo 2015
ESIGETEL
33, Impasse Victor HUGO
94800 VILLEJUIF
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osl.uoregon.edu/pipermail/netdot-users/attachments/20140710/48f7581e/attachment-0001.html
------------------------------
Message: 2
Date: Thu, 10 Jul 2014 12:03:36 +0200
From: CYPRIEN Marc <[email protected]>
Subject: Re: [Netdot-users] Help Debug
To: Netdot user <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Ok I find the way to do it, I just have to restart my Apache Server
and I think I fixed my bug.
In LIB/NETDOT/MODEL/BACKBONECABLE.PM in
sub search_by_site
There is :
else{
# backbone starts and ends in
same site
# Get the backbone connected to this site
# which has only
one site
foreach my $bb ( keys %{$graph->{SITE}->{$s1}} ){
my @n =
keys %{$graph->{BB}->{$bb}};
if ( scalar(@n) == 1 ){
push @res, $bb;
last;
}
}
}
I think "last;" is my problem because the loop
stopped when it found the first device. I just comment it and now it
works.
Is it a fix ? or I am doing something I shouldn't do?
Cordially
---
CYPRIEN Marc
ESIGETEL, ing?nieur Promo 2015
ESIGETEL
33, Impasse Victor HUGO
94800 VILLEJUIF
Le 2014-07-10 10:18, CYPRIEN
Marc a ?crit :
> Hello,
>
> I am trying to debug
HTDOCS/CABLE_PLANT/CABLE_PLANT_BACKBONE.MHTML because it doens't display
what I want I saw this line :
>
> @cables =
BackboneCable->search_by_site(site1=>$start_id, site2=>$end_id);
> which
seems to return the cables list of what we want.
>
> I tried to modify
LIB/NETDOT/MODEL/BACKBONECABLE.PM but nothing change at all even with
die""; in it.
>
> I think I must compile the lib again but I don't
really know how to do it because I don't want Netdot to crash.
>
>
Could someone help me ?
>
> Cordially
>
> --
>
> CYPRIEN Marc
>
ESIGETEL, ing?nieur Promo 2015
> ESIGETEL
> 33, Impasse Victor HUGO
>
94800 VILLEJUIF
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osl.uoregon.edu/pipermail/netdot-users/attachments/20140710/d82357e4/attachment-0001.html
------------------------------
Message: 3
Date: Thu, 10 Jul 2014 14:33:43 +0200
From: CYPRIEN Marc <[email protected]>
Subject: Re: [Netdot-users] Help Debug
To: Netdot user <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
And now to select fiber Strads in the same site for a circuit, I had
to comment a line in LIB/NETDOT/MODEL/CABLESTRAND.PM. There was :
sub
find_sequences {
my ($class, $site_a, $site_b) = @_;
RETURN IF
$SITE_A == $SITE_B;
# Depth-first search (recursive) subroutine
#
returns an arrayref of cablestrand IDs
# for each sequence of strands
that goes from A to B
sub _dfs {
my ($g, $csid, $end, $seen, $path)
= @_;
push @$path, $csid;
# check if this strand ends in $end
if (
exists $g->{SITE}{$end}{$csid} ){
return $path;
}else{
# Check if
this strand is spliced
foreach my $cs ( sort { $a <=> $b } keys
%{$g->{SPLICE}{$csid}} ){
next if ($seen->{$csid}{$cs} ||
$seen->{$cs}{$csid});
$seen->{$csid}{$cs} = 1;
$seen->{$cs}{$csid} =
1;
return &_dfs($g, $cs, $end, $seen, $path);
}
}
# Return undef
because we did not reach $end
}
# Get graph structure
my $g =
$class->get_graph();
my @seq; # Stores sequences
# For each strand
connected to A
foreach my $csid ( sort { $a <=> $b } keys
%{$g->{SITE}{$site_a}} ){
# depth first search
my $seen = {};
my
$path = [];
if ( my $p = &_dfs($g, $csid, $site_b, $seen, $path) ){
# We have a valid path vector
push @seq,
$class->_get_sequence_names($p);
}
}
return @seq;
}
I wanted to
know why is there this line?
Maybe I am not understanding the real
purpose of circuits, and if so, can someone explain me what it is?
---
CYPRIEN Marc
ESIGETEL, ing?nieur Promo 2015
ESIGETEL
33,
Impasse Victor HUGO
94800 VILLEJUIF
Le 2014-07-10 12:03, CYPRIEN Marc
a ?crit :
> Ok I find the way to do it, I just have to restart my
Apache Server and I think I fixed my bug.
>
> In
LIB/NETDOT/MODEL/BACKBONECABLE.PM in sub search_by_site
>
> There is :
> else{
> # backbone starts and ends in same site
> # Get the
backbone connected to this site
> # which has only one site
> foreach
my $bb ( keys %{$graph->{SITE}->{$s1}} ){
>
> my @n = keys
%{$graph->{BB}->{$bb}};
> if ( scalar(@n) == 1 ){
> push @res, $bb;
>
last;
> }
>
> }
> }
> I think "last;" is my problem because the loop
stopped when it found the first device. I just comment it and now it
works.
> Is it a fix ? or I am doing something I shouldn't do?
>
Cordially
>
> ---
>
> CYPRIEN Marc
> ESIGETEL, ing?nieur Promo 2015
>
ESIGETEL
> 33, Impasse Victor HUGO
> 94800 VILLEJUIF
>
> Le
2014-07-10 10:18, CYPRIEN Marc a ?crit :
>
>> Hello,
>>
>> I am
trying to debug HTDOCS/CABLE_PLANT/CABLE_PLANT_BACKBONE.MHTML because it
doens't display what I want I saw this line :
>>
>> @cables =
BackboneCable->search_by_site(site1=>$start_id, site2=>$end_id);
>>
which seems to return the cables list of what we want.
>>
>> I tried to
modify LIB/NETDOT/MODEL/BACKBONECABLE.PM but nothing change at all even
with die""; in it.
>>
>> I think I must compile the lib again but I
don't really know how to do it because I don't want Netdot to crash.
>>
>> Could someone help me ?
>>
>> Cordially
>>
>> --
>>
>> CYPRIEN
Marc
>> ESIGETEL, ing?nieur Promo 2015
>> ESIGETEL
>> 33, Impasse
Victor HUGO
>> 94800 VILLEJUIF
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osl.uoregon.edu/pipermail/netdot-users/attachments/20140710/e5f39ec0/attachment.html
------------------------------
_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users
End of Netdot-users Digest, Vol 68, Issue 8
*******************************************