From c380c63488a7989e0fb8fa4194dafd01afad890a Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Sat, 23 Jan 2021 14:25:40 +0100
Subject: [PATCH] removed some commented code

---
 inventory_provider/juniper.py | 76 -----------------------------------
 1 file changed, 76 deletions(-)

diff --git a/inventory_provider/juniper.py b/inventory_provider/juniper.py
index 427e93b7..723ab2bc 100644
--- a/inventory_provider/juniper.py
+++ b/inventory_provider/juniper.py
@@ -267,66 +267,6 @@ def all_bgp_peers(netconf_config):
                 yield peer
 
 
-# def list_bgp_routes(netconf_config):
-#     for r in netconf_config.xpath(
-#             '//configuration/routing-instances/'
-#             'instance[name/text()="IAS"]/protocols/bgp/'
-#             'group[starts-with(name/text(), "GEANT-IX")]/'
-#             'neighbor'):
-#         name = r.find('name')
-#         description = r.find('description')
-#         local_as = r.find('local-as')
-#         if local_as is not None:
-#             local_as = local_as.find('as-number')
-#         peer_as = r.find('peer-as')
-#         yield {
-#             'name': name.text,
-#             'description': description.text,
-#             'as': {
-#                 'local': int(local_as.text),
-#                 'peer': int(peer_as.text)
-#             }
-#         }
-#
-#
-# def ix_public_peers(netconf_config):
-#     for r in netconf_config.xpath(
-#             '//configuration/routing-instances/'
-#             'instance[name/text()="IAS"]/protocols/bgp/'
-#             'group[starts-with(name/text(), "GEANT-IX")]/'
-#             'neighbor'):
-#         name = r.find('name')
-#         description = r.find('description')
-#         local_as = r.find('local-as')
-#         if local_as is not None:
-#             local_as = local_as.find('as-number')
-#         peer_as = r.find('peer-as')
-#         yield {
-#             'name': ipaddress.ip_address(name.text).exploded,
-#             'description': description.text,
-#             'as': {
-#                 'local': int(local_as.text),
-#                 'peer': int(peer_as.text)
-#             }
-#         }
-#
-#
-# def vpn_rr_peers(netconf_config):
-#     for r in netconf_config.xpath(
-#             '//configuration/logical-systems[name/text()="VRR"]/'
-#             '/protocols/bgp/'
-#             'group[name/text()="VPN-RR" or name/text()="VPN-RR-INTERNAL"]/'
-#             'neighbor'):
-#         neighbor = {
-#             'name': ipaddress.ip_address(r.find('name').text).exploded,
-#             'description': r.find('description').text,
-#         }
-#         peer_as = r.find('peer-as')
-#         if peer_as is not None:
-#             neighbor['peer-as'] = int(r.find('peer-as').text)
-#         yield neighbor
-
-
 def interface_addresses(netconf_config):
     """
     yields a list of all distinct interface addresses
@@ -342,22 +282,6 @@ def interface_addresses(netconf_config):
             }
 
 
-# note for enabling vrr data parsing ...
-# def fetch_vrr_config(hostname, ssh_params):
-#
-#     commands = [
-#         _DISABLE_PAGING_COMMAND,
-#         ('show configuration logical-systems '
-#          'VRR protocols bgp | display json')
-#     ]
-#
-#     output = list(ssh_exec_commands(hostname, ssh_params, commands))
-#     assert len(output) == len(commands)
-#
-#     return _loads(output[1]) if output[1] else {}
-#
-
-
 def load_routers_from_netdash(url):
     """
     query url for a linefeed-delmitted list of managed router hostnames
-- 
GitLab