Skip to content
Snippets Groups Projects
Commit ec3e8c59 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

bgpls add doble node update removal fixed

parent ed337e67
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!211Resolve "(TID) Add support to BGP to add links"
......@@ -37,15 +37,16 @@ class DiscoveredDBManager:
# Check if node info message
if(self.checkIfNodeInUpdate(update_request)):
# Check if node exists
to_add=True
node_count=len(update_request.nodes)
for node in update_request.nodes:
if(self.CheckIfNodeNameInDb(node) or CheckIfNodeInContext(node.node_name)):
# Replace info from node if exists
LOGGER.debug("(AddToDB) Node already in DB!!!")
to_add=False
update_request.nodes.remove(node)
node_count=node_count-1
else:
LOGGER.debug("(AddToDB) Node NOT in DB!!!")
if(to_add):
if(node_count>0):
self.discoveredDB.append(update_request)
else:
# is a link
......
......@@ -77,7 +77,7 @@
</tr>
{% endif %}
</tbody>
<tbody>
<!-- <tbody>
{% if dislink %}
{% for link in dislink %}
<tr>
......@@ -100,7 +100,7 @@
<td colspan="3">No devices found</td>
</tr>
{% endif %}
</tbody>
</tbody> -->
</table>
<script src="https://d3js.org/d3.v4.min.js"></script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment