From OpenNMS
Feature Description
The OpenNMS Map will be improved to display that multiple links exist between map entities. Potentially, up to a configurable number of parallel links will be displayed between the elements and/or the linkʼs attributes will be changed to indicate multiple links exist (i.e. a thicker line, etc.).
MultiLinks on Maps Before 1.7.10
The map have the ability to display multiple links between two nodes. Actually there is no limitation on the number of links between two nodes.
A Link on a Map is identified by 4 properties:
a) The first MapElement it connects
b) The second MapElement it connects
c) The link type as described in map.properties
d) The link status as described in map.properties
MultiLink status Property Before 1.7.10
In the The map.properties file you can set the following property:
multilink.status=best (or worst)
This forces to be displayed only the links that are in the "best" or "worst" status.
This means that if you have two links between two nodes and one is up and one is down only one link is displayed.
Default Links in map.properties
You can add how many links you want in map.properties. The Links can match the following criteria: snmpiftype and speed in snmpinterface table or the linktypeid in datalinkinterface table. The application try first of all to identify links using the linktypeid field on datalinkinterface table. If this value is not defined (can be null) then it is used the parentnodeid and parentifindex to select snmpiftype and snmpifspeed into snmpinterface table. If the iftype and ifspeed are the same defined in map.properties for a specific link then the link is identified.
Here are links defined by default :
links=ethernet,fastethernet,fastethernet2,gigaethernet,gigaethernet2,ieee80211,serial,framerelay,unknown,dwo link.ethernet.id=0 link.ethernet.text=Ethernet link.ethernet.speed=10000000 link.ethernet.width=1 link.ethernet.snmptype=6 link.fastethernet.id=1 link.fastethernet.text= Fast Ethernet link.fastethernet.speed=100000000 link.fastethernet.width=2 link.fastethernet.snmptype=62 link.fastethernet2.id=10 link.fastethernet2.text= Fast Ethernet link.fastethernet2.speed=100000000 link.fastethernet2.width=2 link.fastethernet2.snmptype=6 link.gigaethernet.id=2 link.gigaethernet.text= GigaBit Ethernet link.gigaethernet.speed=1000000000 link.gigaethernet.width=3 link.gigaethernet.snmptype=117 link.gigaethernet2.id=20 link.gigaethernet2.text= GigaBit Ethernet link.gigaethernet2.speed=1000000000 link.gigaethernet2.width=3 link.gigaethernet2.snmptype=6 link.serial.id=3 link.serial.text= Serial Line link.serial.speed=64000 link.serial.width=1 link.serial.dash-array=3 link.serial.snmptype=22 link.framerelay.id=4 link.framerelay.text= Frame Relay link.framerelay.speed=64000 link.framerelay.width=1 link.framerelay.dash-array=5 link.framerelay.snmptype=32 link.ieee80211.id=5 link.ieee80211.text= WIFI link.ieee80211.speed=100000000 link.ieee80211.width=2 link.ieee80211.dash-array=3 link.ieee80211.snmptype=71 link.unknown.id=9999 link.unknown.text= Unknown link.unknown.speed=unknown link.unknown.width=1 link.unknown.dash-array=1 link.unknown.snmptype=0 link.dwo.id=777 link.dwo.text= DWO Connection link.dwo.speed=0 link.dwo.width=1 link.dwo.dash-array=3 link.dwo.snmptype=0
Default Link status in map.properties
The following properties cannot be changed!
linkstatuses=up,down,admindown,testing,unknown,good,bad
but it is possible to change the link status graphical properties:
linkstatus.up.color=green linkstatus.good.color=green linkstatus.down.flash=true linkstatus.down.color=red linkstatus.bad.color=red linkstatus.bad.flash=true linkstatus.admindown.color=blue linkstatus.testing.color=orange linkstatus.unknown.color=grey
Strategy
- Enhance the Map Application to support a new property max.links in maps.properties to setup the max number of displayed links between nodes on map.
- Enhance the Link object to represent multi link.
Add a property on the Link javascript object to display the number of "Real Links" (the link on the map) it represents.
Add a property on the Link javascript object to display the status map of Real Links it represents.
- Add a ToolTip to the Link javascript object to display status map and number of Links.
- Enhance the Application so that multilink.status=best means display the best status among the "Real Links" displayed into a "VLink" (V is for Visual)
- Enhance the Application so that multilink.status=worst means display the worst status among the "Real Links"
- Enhance the Application so that multilink.status=ignore display the Vlink status without a preference (i.e. in the order in which they are sent to the client (database datalinkinterface id field)
- Enhance the Application so that In case the number of displayed links exceed the max.links a new special link is created with a summary of all the remaining links.
- Enhance the Application so that when you double click on the "summary" Link you get a new context menu with a list of "link" (SVG Javascript Link) it represents.
The new MultiLink SVG Object
First of all we have to distinguish between a "physical Link" from a Visual Link (VLink).
The physical Link has a correspondant Java Object and is a row in the database table datalinkinterface.
The Visual Link is the Graphical representation of one or more phys Link.
The name is VLink for the java object. What I show on the map is a VLink. The correspondant SVG Javascript Object on the client side is Link.js.
A VLink can represent one or more physical Link. This is becouse you can have hundreds of links that need to be represented on the map. For example if you have an etherchannel that is made of 4 physical Link between two nodes then you'll get only a VLink that represents all the 4 physical Links.
The new Vlink has the following properties:
a) LinkId
b) the link status
c) The total number of physical links it represents
d) The status map of the link it represents
The VLink has a LinkId, that is made of 3 elements, the 2 mapelement the link connects and the link type. The following string 10N-20N-6 is the linkId of a VLink between two nodes with nodeid 10 and 20 of type 6 (that is ethernet link as you can see in map.properties).
The link type is identified in map.properties. A link without an identifier is set to unknow (id 9999).
A Link always is a connection beetween two nodes, but a VLink could be a connection between two maps and a node and a map too.
For example 1M-2M-6 is the LinkId between the maps with id 1 end id 2. Remember that the VLink is always a visual representation.
The max number of links between two "map element" is controlled by max.links property in map.properties file. My idea is that we can show three links without loosing fairness. (but you can arrange the map.properties to show only one link and if you want you can also arrange thinks so that only a VLink is displayed anyway).
A Link has also another property that is the status (up, down, good bad, admindown,unknown).
The status of the VLink is displayed by the colour (that is configurable in map.properties and actually is: up/good - green, bad/down-red and unknow - grey).
So how I should colour a VLink if it represents more then one physical link that can be in different statutes?
Here helps the multilink.status property in map.properties.
best means show the best status, worst means show the worst status, ignore means use the status of the first phisically link you get. The defaul is best.
To mantain the information about the status of the Links it represents a VLink has an HashMap that holds the status and the number of link in that status.
Also has a property that shows the total number of links it represents.
Because a "VLink" that is a Link displayed on the map we have added two new properties useful to visualize Vlink made of one physical link or Vlink made by several links...
# link.{KEY}.multilink.width (optional): define the width of the link if the link itself is a multi link
# can be used to distinguish between links with multiple links or not
# without setting there is no graphical difference with a single link
# link.{KEY}.multilink.dasharray (optional): define the outline style of the line if the link itself is a multi link
# can be used to distinguish between links with multiple links or not
# without setting there is no graphical difference with a single link
Here is the way in which you interact with the Vlink on the map:
1) If you go on the SVG Link Object (That is the VLink on the client side) with the mouse (OnMouseOver) it is displayed a tooltip.
2) If you click on the SVG Link it is displayed (in what we call DownInfoBox).
3) If you double click on the SVG Link it is displayed a ContextMenu (that is the default context menu.
Actually the toolTip has information about the status map and the total number of Links.
The DownInfoBox has the information about the graphical data on the Link (the type, the speed and other thinks you can see)
The ContextMenu is deafult contextmenu for the link and is related to the nodes the VLink represent.
The single MultiLink SVG Object
If max.links is greater then the total number physical links between two mapElement then all single links are displayed. in practice we create multi single links!
The MultiLink Status property
The multilink status is set according with the multilink.status property. Supported values are: best, worst, ignore
- best display always the color related to the best status in the multilink -worst display always the color related to the worst status of the multilink -ignore display the color related to a common status (if all links are in the same status, otherwise display the color that is set in the property:
multilink.ignore.color
Default multilink.status is best
The new SummaryLink SVG Object
The SummaryLink SVG Object extends the multi VLink object.
If the max.links=3 at the present if you have 4 Vlinks only 3 are displayed, what about the fourth?
The SummaryLink object is special and represents two or more VLink.
Rendering the SummaryLink SVG object
The layout of this SummaryLink is defined in map.properties where we add the following property:
summarylink.id = 1777
Adding a special summary link in map.properties with the following definition for link 1777 (so that the user can customize his own summarylink):
link.summary.id=1777 link.summary.text= SummaryLink link.summary.speed=Undefined link.summary.width=3 #link.summary.dash-array=3 link.summary.snmptype=Undefined
Status
The status of the summary link depends on the status of the MultiLink it holds. If the multilinks are all in the same status (same colour) then the status of Summary Link is that of its multilinks When the status is different then the colour of the summary link is changed according with a new specified property:
summarylink.color=yellow
Content of the toolTip
Display information abut the total number of MultiVlink it represents, the total numbet of Physical Links it represents and the Status Map (the total number of physical links in a specific status)
DownInfoBox when you click on this Link
It displays the same property of the MultiLink but of course related to the summaryLink id (that you can change)! See context Menu below too
Context Menu
The summaryLink contextMenu is activated by double clicking on the summarylink. Every Context Menu Item represents a MultiLink contained in the summaryLink. if you select the multilink the "SummaryLink" is rendered with the MultiLink you have selected. ToolTip and DownInfoBox are modified according to this choise. You can go back selecting Summary from the contextMenu.
Conclusion
The advantage of having MultiLink and SummaryLink is that we mantain a compatibility with the past map links.
Acceptance Criteria
To be done






