Skip to content
Snippets Groups Projects
Commit c380c634 authored by Erik Reid's avatar Erik Reid
Browse files

removed some commented code

parent bb3d9395
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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