Commit ec3e8c59 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

bgpls add doble node update removal fixed

parent ed337e67
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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>