Send Netdot-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
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-devel digest..."
Today's Topics:
1. [Netdot - Bug #1827] (New) Strange display of vlan with
database id = 1 ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 30 Jun 2014 03:53:15 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1827] (New) Strange display of
vlan with database id = 1
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1827 has been reported by Brian Candler.
----------------------------------------
Bug #1827: Strange display of vlan with database id = 1
https://osl.uoregon.edu/redmine/issues/1827
Author: Brian Candler
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Resolution:
When you are in the device info page and show topology, check "include vlans",
and you look at the section labelled "List of vlans and their colors", then the
VLAN with database id=1 appears an extra time with label "1".
The vlan with database id 1 has no special significance as far as I can see.
(In my case it corresponds to vlan tag 6; vlan tag 1 has database id 2)
This is especially apparent if you select the view of a single VLAN, because
the color key shows two entries. For example, if I ask to see only vlan 5, I
get two links labelled "1" (which is vlan 6) and "VLAN0005".
I found the following code in build_device_topology_graph_html and I am at a
loss as to what it is trying to achieve:
<pre>
my $vlans = { 1=>{color=>'#000000', vlan=>Vlan->search(id=>1)->first} };
$argv{vlans} = $vlans;
</pre>
Maybe the intention was to search for vid=>1 not id=>1? If you change this then
the output is a bit more sensible, because at least the VLAN labelled "1" is
the default VLAN.
But simply putting "my $vlans = {}" appears to do the right thing, so I'm not
sure what problem it was trying to solve.
Idea: perhaps it was just trying to make sure that "_randomcolor" always
assigns black to the default vlan? If so, I think it would be better to pass
the vid as an argument to _randomcolor. This would also allow the color to be
chosen deterministically (e.g. use a hash of the vlan ID to assign a color)
which would be very helpful when switching between different views.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 87, Issue 16
********************************************